[ovs-discuss] Problems with vsctl vhost-del/connected device, OVS 2.4.0 with corrections from 2.4

Jan Wickbom jan.wickbom at ericsson.com
Wed Feb 24 15:33:47 UTC 2016


Hi,
If a vhost-user port is deleted (vsctl del-port) while the vhost device is still attached to a VM, the port is ending up in some "semi-deleted" state. Even though we indicate a reject of the command in netdev_dpdk_vhost_destruct() by an ERROR log, we still run netdev_close()/netdev_unref() meaning the name is removed from netdev_shash and the memory is also freed (!), given back to dpdk. However, the device is NOT linked out from dpdk_list, meaning it will be handled in the dpdk_watchdog thread. Since the name is removed from netdev_shash, it is treated as not existing from an operators view. Whenever this newly freed memory is allocated again, a lot of strange things may happen to the "ghost device" present in the dpdk_list.

I think the check for an attached vhost device should be done a lot earlier, maybe
ofproto_port_delete() is a good place?

I have only checked the vhost-user port type, may the same problem exists for other  types as well?
 
Anyone else seen the problem?
 
BR
/jaw



More information about the discuss mailing list