Message ID | 42319f7ab2f535e4b05857fdf48ae9a45e828f4d.1525792392.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Ido Schimmel |
Headers | show |
On Tue, May 08, 2018 at 06:02:25PM +0200, Petr Machata wrote:
> Allow lookup of information of bridge VLANs.
Can you add a sentence about motivation? "This is needed in order to
..."
I'll fix up the commit message myself because the series looks fine
otherwise. No need for v3.
Ido Schimmel <idosch@mellanox.com> writes: > On Tue, May 08, 2018 at 06:02:25PM +0200, Petr Machata wrote: >> Allow lookup of information of bridge VLANs. > > Can you add a sentence about motivation? "This is needed in order to > ..." > > I'll fix up the commit message myself because the series looks fine > otherwise. No need for v3. net: bridge: Allow bridge master in br_vlan_get_info() Mirroring offload in mlxsw needs to check that a given VLAN is allowed to ingress the bridge device. br_vlan_get_info() is the function that is used for this, however currently it only supports bridge port devices. Extend it to support bridge masters as well. Signed-off-by: Petr Machata <petrm@mellanox.com>
On Wed, May 09, 2018 at 05:59:54PM +0300, Petr Machata wrote: > Ido Schimmel <idosch@mellanox.com> writes: > > > On Tue, May 08, 2018 at 06:02:25PM +0200, Petr Machata wrote: > >> Allow lookup of information of bridge VLANs. > > > > Can you add a sentence about motivation? "This is needed in order to > > ..." > > > > I'll fix up the commit message myself because the series looks fine > > otherwise. No need for v3. > > net: bridge: Allow bridge master in br_vlan_get_info() > > Mirroring offload in mlxsw needs to check that a given VLAN is allowed > to ingress the bridge device. br_vlan_get_info() is the function that is > used for this, however currently it only supports bridge port devices. > Extend it to support bridge masters as well. > > Signed-off-by: Petr Machata <petrm@mellanox.com> Thanks. Both patchsets passed my tests. Will submit upstream tomorrow assuming the nightly regression is OK.
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index df37a51..dc832c09 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -1176,6 +1176,8 @@ int br_vlan_get_info(const struct net_device *dev, u16 vid, p = br_port_get_check_rtnl(dev); if (p) vg = nbp_vlan_group(p); + else if (netif_is_bridge_master(dev)) + vg = br_vlan_group(netdev_priv(dev)); else return -EINVAL;
Allow lookup of information of bridge VLANs. Signed-off-by: Petr Machata <petrm@mellanox.com> --- net/bridge/br_vlan.c | 2 ++ 1 file changed, 2 insertions(+)