netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, idosch@mellanox.com, eladr@mellanox.com,
	yotamg@mellanox.com, ogerlitz@mellanox.com
Subject: [patch net 08/11] mlxsw: spectrum: Use correct netdev when notifying bridge
Date: Wed, 27 Jan 2016 15:20:23 +0100	[thread overview]
Message-ID: <1453904426-4960-9-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1453904426-4960-1-git-send-email-jiri@resnulli.us>

From: Ido Schimmel <idosch@mellanox.com>

LAG FDB entries pointing to VLAN devices should be reported to the
bridge with the matching VLAN device and not the underlying LAG device.

Fixes: aac78a440887 ("mlxsw: spectrum: Adjust FDB notifications for VLAN devices")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 594fc60..10a0270 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -1280,6 +1280,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
 						bool adding)
 {
 	struct mlxsw_sp_port *mlxsw_sp_port;
+	struct net_device *dev;
 	char mac[ETH_ALEN];
 	u16 lag_vid = 0;
 	u16 lag_id;
@@ -1306,10 +1307,12 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
 		}
 
 		lag_vid = mlxsw_sp_vport_vid_get(mlxsw_sp_vport);
+		dev = mlxsw_sp_vport->dev;
 		vid = 0;
 		/* Override the physical port with the vPort. */
 		mlxsw_sp_port = mlxsw_sp_vport;
 	} else {
+		dev = mlxsw_sp_lag_get(mlxsw_sp, lag_id)->dev;
 		vid = fid;
 	}
 
@@ -1327,8 +1330,7 @@ do_fdb_op:
 	if (!do_notification)
 		return;
 	mlxsw_sp_fdb_call_notifiers(mlxsw_sp_port->learning_sync, adding, mac,
-				    vid,
-				    mlxsw_sp_lag_get(mlxsw_sp, lag_id)->dev);
+				    vid, dev);
 	return;
 
 just_remove:
-- 
1.9.3

  parent reply	other threads:[~2016-01-27 14:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 14:20 [patch net 00/11] mlxsw: driver fixes Jiri Pirko
2016-01-27 14:20 ` [patch net 01/11] mlxsw: spectrum: Handle port leaving LAG while bridged Jiri Pirko
2016-01-27 14:20 ` [patch net 02/11] mlxsw: reg: Add the Switch Filtering DB Flush register Jiri Pirko
2016-01-27 14:20 ` [patch net 03/11] mlxsw: spectrum: Flush FDB when leaving bridge Jiri Pirko
2016-01-27 14:20 ` [patch net 04/11] mlxsw: spectrum: Don't forward packets when STP state is DISABLED Jiri Pirko
2016-01-27 14:20 ` [patch net 05/11] mlxsw: spectrum: Disable learning according to STP state Jiri Pirko
2016-01-27 14:20 ` [patch net 06/11] mlxsw: spectrum: Notify bridge's FDB only based on learning_sync Jiri Pirko
2016-01-27 14:20 ` [patch net 07/11] mlxsw: spectrum: Don't report VLAN for 802.1D FDB entries Jiri Pirko
2016-01-27 14:20 ` Jiri Pirko [this message]
2016-01-27 14:20 ` [patch net 09/11] mlxsw: spectrum: Dump LAG FDB records only once Jiri Pirko
2016-01-27 14:20 ` [patch net 10/11] mlxsw: spectrum: Compare local ports instead of pointers Jiri Pirko
2016-01-27 14:20 ` [patch net 11/11] mlxsw: reg: Use correct offset in field definiton Jiri Pirko
2016-01-28 23:57 ` [patch net 00/11] mlxsw: driver fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453904426-4960-9-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=eladr@mellanox.com \
    --cc=idosch@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=yotamg@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).