You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we create OPTE ports, one step is to create an xde device. However, we only call delete_xde in the Drop implementation on the port objects. If the create_port function fails after having created the xde device, the xde data link will never be cleaned up.
We need to be sure to call delete_xde if create_port fails, before returning from the function.
This is actually not an issue. The first fallible operation after creating the xde device is creating the guest VNIC over it. We call delete_xde if that fails here. After that, the next operation is updating the secondary MACs of the underlay NIC, done here. At that point, we've created an actual Port object here. If any of the following fallible operations actually do fail, the Drop implementation for that port object will ensure that we call delete_xde. So we do correctly call delete_xde if the PortManager::create_port function fails after it calls create_xde.
Activity
bnaecker commentedon Sep 8, 2022
This is actually not an issue. The first fallible operation after creating the
xdedevice is creating the guest VNIC over it. We calldelete_xdeif that fails here. After that, the next operation is updating the secondary MACs of the underlay NIC, done here. At that point, we've created an actualPortobject here. If any of the following fallible operations actually do fail, theDropimplementation for that port object will ensure that we calldelete_xde. So we do correctly calldelete_xdeif thePortManager::create_portfunction fails after it callscreate_xde.Update crucible and propolis
Update crucible and propolis (#7877)