Removed unnecessary content for ease of reading...ok, i am very confused in that case. The whole moving of bridge attributes from the bridge driver to rtnetlink.c was to make the bridge attributes accessible to any driver who wants to set l2/bridge attributes on their switch ports. So, its unclear to me why we are doing this parallel thing again.
Roopa, one of the comments I got from Thomas Graf on my v1 patch was that your patch and mine were supplementary ("I think Roopa's patches are supplementary. Not all switchdev users will be backed with a Linux Bridge. I therefore welcome your patches very much")... I also understood by others that the patch made sense for the same reason. I simply do not understand why these attributes (and maybe others in the future) could not be configured directly on a standard port but have to go through a bridge.'self'necessarily.Yes, because the user may _not_ want to go through a bridge+/* Switch Port Attributes section */Any reason you want learning here ?. This is covered as part of
+
+enum {
+ IFLA_ATTR_UNSPEC,
+ IFLA_ATTR_LEARNING,
the bridge setlink attributes.
interface
But, the bridge setlink/getlink interface was changed to accommodate
in my case - it is like all other attributes: a port attribute (as you said, portfor exactly such cases.Maybe, I am missing something so you might help. The learning attribute -
I kind of understand your case for the other attributes (these are
per port settings that switch asics provide).
However, i don't understand the reason to pull in bridge attributes here.
settings that the switch provides per port).
So, what I was saying is "why the user shall go through a bridge to configurethe learning attribute"? From my perspective, it is as any other attribute and
as such configurable on the port.
Thinking about this some more, i don't see why any of these attributes
(except loopback. I dont understand the loopback attribute) cant be part of
the birdge port attributes.
With this we will end up adding l2 attributes in two places: the general link
attributes and bridge attributes.
And since we have gone down the path of using ndo_bridge_setlink/getlink
with 'self'....we should stick to that for all l2 attributes.
The idea of overloading ndo_bridge_set/getlink, was to have the same set of
attributes but support both cases where the user wants to go through the
bridge driver or directly to the switch port driver. So, you are not really going
through the bridge driver if you use 'self' and ndo_bridge_setlink/getlink.