[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425428129-48365-1-git-send-email-roopa@cumulusnetworks.com>
Date: Tue, 3 Mar 2015 16:15:29 -0800
From: roopa@...ulusnetworks.com
To: sfeldma@...il.com, jiri@...nulli.us
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: [PATCH net-next] rocker: check for BRIDGE_FLAGS_SELF in bridge setlink handler
From: Roopa Prabhu <roopa@...ulusnetworks.com>
With the recent addition of the NETIF_F_HW_SWITCH_OFFLOAD flag
on rocker ports, the second command (bridge link set) below will turn off
learning in the rocker hw (Scott/Jiri, need some confirmation from
you that this is indeed a problem and if the below patch is ok).
ip link set dev swp1 master br0
bridge link set dev swp1 learning off master
bridge link set dev swp1 learning_sync on self
This patch fixes rocker to ignore learning setting when 'master'
is set. This makes it possible to set/unset learning in kernel and bridge
driver independently.
The below command will continue to set learning on in both kernel and rocker
hw:
bridge link set dev swp1 learning on
Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
---
drivers/net/ethernet/rocker/rocker.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index e5a15a4..d7c31d2 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -3769,6 +3769,9 @@ static int rocker_port_bridge_setlink(struct net_device *dev,
struct nlattr *attr;
int err;
+ if (flags && !(flags & BRIDGE_FLAGS_SELF))
+ return 0;
+
protinfo = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg),
IFLA_PROTINFO);
if (protinfo) {
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists