[Devel] [PATCH vz9] vlan, gre: set NETIF_F_VIRTUAL flag before it is checked
Nikita Yushchenko
nikita.yushchenko at virtuozzo.com
Mon Feb 21 15:31:53 MSK 2022
> We should better just move our "if (!ve_is_super(net->owner_ve) && ve_is_dev_movable(dev))" check
> below in register_netdevice() to the same place we check for "dev->hw_features | dev->features".
Ok
Indeed that may be cleaner.
Although I absolutely disagree about "unnatural complexity"
Feature bits are configured in setup method for most interface types, but in .ndo_init only for vlan and
gre. That is where inconsistency lies.
And, NETIF_F_VIRTUAL flag has nothing to do with "features" (i.e. some additional functionality to
support). It's only use is to allow non-netns-local interface to be registered in CT's netns. Naming it
a "feature" is one more place where inconsistency lies. And "virtual" in it's name is also misleading.
As for initializing this flag in setup method of all interface files - this decreases inconsistency, not
increases it. Although then better to rename the flag.
More information about the Devel
mailing list