Willem de Bruijn [[email protected]] wrote: > On Thu, Jan 28, 2021 at 10:51 PM Sukadev Bhattiprolu > <[email protected]> wrote: > > > > If two or more instances of 'ip link set' commands race and first one > > already brings the interface up (or down), the subsequent instances > > can simply return without redoing the up/down operation. > > > > Fixes: ed651a10875f ("ibmvnic: Updated reset handling") > > Reported-by: Abdul Haleem <[email protected]> > > Tested-by: Abdul Haleem <[email protected]> > > Signed-off-by: Sukadev Bhattiprolu <[email protected]> > > Isn't this handled in the rtnetlink core based on IFF_UP? > > if ((old_flags ^ flags) & IFF_UP) { > if (old_flags & IFF_UP) > __dev_close(dev); > else > ret = __dev_open(dev, extack); > }
Good question. During our testing we hit the "adapter already open" debug message a few times. Without this change, the core layer and dirver disagree on the state and the adapter becomes unsuable. I will debug this at the core layer also later this week. We are working on rewriting parts of driver surrounding locking/adapter state and not sure if that will reveal any other cause for this behavior. Sukadev
