Message ID | 20231017070227.3560105-9-amcohen@nvidia.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | David Ahern |
Headers | show |
Series | Extend flush command to support VXLAN attributes | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On 10/17/23 10:02, Amit Cohen wrote: > When 'master' and 'self' keywords are used, the command will be handled > by the driver of the device itself and by the driver that the device is > master on. For VXLAN, such command will be handled by VXLAN driver and by > bridge driver in case that the VXLAN is master on a bridge. > > The bridge driver and VXLAN driver do not support the same arguments for > flush command, for example - "vlan" is supported by bridge and not by > VXLAN and "vni" is supported by VXLAN and not by bridge. > > The following command returns an error: > $ bridge fdb flush dev vx10 vlan 1 self master > Error: Unsupported attribute. > > This error comes from the VXLAN driver, which does not support flush by > VLAN, but this command is handled by bridge driver, so entries in bridge > are flushed even though user gets an error. > > Note in the man page that such command is not recommended, instead, user > should run flush command twice - once with 'self' and once with 'master', > and each one with the supported attributes. > > Signed-off-by: Amit Cohen <amcohen@nvidia.com> > --- > man/man8/bridge.8 | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 > index f76bf96b..ee6f2260 100644 > --- a/man/man8/bridge.8 > +++ b/man/man8/bridge.8 > @@ -943,6 +943,11 @@ command can also be used on the bridge device itself. The flag is set by default > .B master > if the specified network device is a port that belongs to a master device > such as a bridge, the operation is fulfilled by the master device's driver. > +Flush with both 'master' and 'self' is not recommended with attributes that are > +not supported by all devices (e.g., vlan, vni). Such command will be handled by > +bridge or VXLAN driver, but will return an error from the driver that does not > +support the attribute. Instead, run flush twice - once with 'self' and once > +with 'master', and each one with the supported attributes. > > .TP > .B [no]permanent Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index f76bf96b..ee6f2260 100644 --- a/man/man8/bridge.8 +++ b/man/man8/bridge.8 @@ -943,6 +943,11 @@ command can also be used on the bridge device itself. The flag is set by default .B master if the specified network device is a port that belongs to a master device such as a bridge, the operation is fulfilled by the master device's driver. +Flush with both 'master' and 'self' is not recommended with attributes that are +not supported by all devices (e.g., vlan, vni). Such command will be handled by +bridge or VXLAN driver, but will return an error from the driver that does not +support the attribute. Instead, run flush twice - once with 'self' and once +with 'master', and each one with the supported attributes. .TP .B [no]permanent
When 'master' and 'self' keywords are used, the command will be handled by the driver of the device itself and by the driver that the device is master on. For VXLAN, such command will be handled by VXLAN driver and by bridge driver in case that the VXLAN is master on a bridge. The bridge driver and VXLAN driver do not support the same arguments for flush command, for example - "vlan" is supported by bridge and not by VXLAN and "vni" is supported by VXLAN and not by bridge. The following command returns an error: $ bridge fdb flush dev vx10 vlan 1 self master Error: Unsupported attribute. This error comes from the VXLAN driver, which does not support flush by VLAN, but this command is handled by bridge driver, so entries in bridge are flushed even though user gets an error. Note in the man page that such command is not recommended, instead, user should run flush command twice - once with 'self' and once with 'master', and each one with the supported attributes. Signed-off-by: Amit Cohen <amcohen@nvidia.com> --- man/man8/bridge.8 | 5 +++++ 1 file changed, 5 insertions(+)