On Wed, 14 Apr 2021 17:30:01 -0700 Tony Nguyen wrote: > From: Anirudh Venkataramanan <anirudh.venkatarama...@intel.com> > > Add two new VSI states, one to track if a netdev for the VSI has been > allocated and the other to track if the netdev has been registered. > Call unregister_netdev/free_netdev only when the corresponding state > bits are set.
Why? netdev already has a reg_state member. You can also assign a NULL to the pointer to indicate it was freed.