netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap
@ 2018-06-02 18:09 Ido Schimmel
  2018-06-02 18:09 ` [PATCH net-next 1/2] mlxsw: spectrum_switchdev: Postpone respin on object deletion Ido Schimmel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ido Schimmel @ 2018-06-02 18:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

Petr says:

These two patches fix issues in offloading of mirror-to-gretap when
bridge is present in the underlay.

In patch #1, reconsideration of SPAN configuration is not done right at
the point that SWITCHDEV_OBJ_ID_PORT_VLAN deletion notification is
distributed, but is postponed, because the notifications are actually
distributed before the relevant change is implemented in the bridge.

In patch #2, a problem in configuring VLAN tagging in situations when a
VLAN device is on top of an 802.1Q bridge whose egress port is marked as
"egress untagged". In that case, mlxsw would neglect to suppress the
tagging implicitly assumed after the VLAN device was seen.

Petr Machata (2):
  mlxsw: spectrum_switchdev: Postpone respin on object deletion
  mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED

 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c      | 4 +++-
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next 1/2] mlxsw: spectrum_switchdev: Postpone respin on object deletion
  2018-06-02 18:09 [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap Ido Schimmel
@ 2018-06-02 18:09 ` Ido Schimmel
  2018-06-02 18:09 ` [PATCH net-next 2/2] mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED Ido Schimmel
  2018-06-04 19:34 ` [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2018-06-02 18:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Petr Machata <petrm@mellanox.com>

VLAN deletion notifications are emitted before the relevant change is
projected to bridge configuration. Thus, like with VLAN addition,
schedule SPAN respin for later.

Fixes: c520bc698647 ("mlxsw: Respin SPAN on switchdev events")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 8a15ac49cb5a..e97652c40d13 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -1856,7 +1856,7 @@ static int mlxsw_sp_port_obj_del(struct net_device *dev,
 		break;
 	}
 
-	mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp);
+	mlxsw_sp_span_respin_schedule(mlxsw_sp_port->mlxsw_sp);
 
 	return err;
 }
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next 2/2] mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED
  2018-06-02 18:09 [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap Ido Schimmel
  2018-06-02 18:09 ` [PATCH net-next 1/2] mlxsw: spectrum_switchdev: Postpone respin on object deletion Ido Schimmel
@ 2018-06-02 18:09 ` Ido Schimmel
  2018-06-04 19:34 ` [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2018-06-02 18:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Petr Machata <petrm@mellanox.com>

When offloading mirroring to gretap or ip6gretap netdevices, an 802.1q
bridge is one of the soft devices permissible in the underlay when
resolving the packet path. After the packet path is resolved to a
particular bridge egress device, flags on packet VLAN determine whether
the egressed packet should be tagged.

The current logic however only ever sets the VLAN tag, never suppresses
it. Thus if there's a VLAN netdevice above the bridge that determines
the packet VLAN, that VLAN is never unset, and mirroring is configured
with VLAN tagging.

Fix by setting the packet VLAN on both branches: set to zero (for unset)
when BRIDGE_VLAN_INFO_UNTAGGED, copy the resolved VLAN (e.g. from bridge
PVID) otherwise.

Fixes: 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap mirror")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
index da3f7f527360..3d187d88cc7c 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
@@ -191,7 +191,9 @@ mlxsw_sp_span_entry_bridge_8021q(const struct net_device *br_dev,
 
 	if (br_vlan_get_info(edev, vid, &vinfo))
 		return NULL;
-	if (!(vinfo.flags & BRIDGE_VLAN_INFO_UNTAGGED))
+	if (vinfo.flags & BRIDGE_VLAN_INFO_UNTAGGED)
+		*p_vid = 0;
+	else
 		*p_vid = vid;
 	return edev;
 }
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap
  2018-06-02 18:09 [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap Ido Schimmel
  2018-06-02 18:09 ` [PATCH net-next 1/2] mlxsw: spectrum_switchdev: Postpone respin on object deletion Ido Schimmel
  2018-06-02 18:09 ` [PATCH net-next 2/2] mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED Ido Schimmel
@ 2018-06-04 19:34 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-06-04 19:34 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, petrm, mlxsw

From: Ido Schimmel <idosch@mellanox.com>
Date: Sat,  2 Jun 2018 21:09:33 +0300

> Petr says:
> 
> These two patches fix issues in offloading of mirror-to-gretap when
> bridge is present in the underlay.
> 
> In patch #1, reconsideration of SPAN configuration is not done right at
> the point that SWITCHDEV_OBJ_ID_PORT_VLAN deletion notification is
> distributed, but is postponed, because the notifications are actually
> distributed before the relevant change is implemented in the bridge.
> 
> In patch #2, a problem in configuring VLAN tagging in situations when a
> VLAN device is on top of an 802.1Q bridge whose egress port is marked as
> "egress untagged". In that case, mlxsw would neglect to suppress the
> tagging implicitly assumed after the VLAN device was seen.

Series applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-04 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-02 18:09 [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap Ido Schimmel
2018-06-02 18:09 ` [PATCH net-next 1/2] mlxsw: spectrum_switchdev: Postpone respin on object deletion Ido Schimmel
2018-06-02 18:09 ` [PATCH net-next 2/2] mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED Ido Schimmel
2018-06-04 19:34 ` [PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).