bridge: add flags argument to ndo_bridge_setlink and ndo_bridge_dellink
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Fri, 30 Jan 2015 06:40:12 +0000 (22:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Feb 2015 07:16:33 +0000 (23:16 -0800)
bridge flags are needed inside ndo_bridge_setlink/dellink handlers to
avoid another call to parse IFLA_AF_SPEC inside these handlers

This is used later in this series

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/rocker/rocker.c
include/linux/netdevice.h
net/bridge/br_netlink.c
net/bridge/br_private.h
net/core/rtnetlink.c

index 598c5070c62926cfec0fbe3a88497947c18ec477..efed92c7b7316e5148f5c02f228b7e93e26fa107 100644 (file)
@@ -4327,7 +4327,8 @@ fw_exit:
        return status;
 }
 
-static int be_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh)
+static int be_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
+                                u16 flags)
 {
        struct be_adapter *adapter = netdev_priv(dev);
        struct nlattr *attr, *br_spec;
index 7bb421bfd84ee71e93865de2ca845a4880d2d9cb..e4086fea4be2fcb4a96428f071fc6c29770fc8da 100644 (file)
@@ -7786,7 +7786,7 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
 }
 
 static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
-                                   struct nlmsghdr *nlh)
+                                   struct nlmsghdr *nlh, u16 flags)
 {
        struct ixgbe_adapter *adapter = netdev_priv(dev);
        struct nlattr *attr, *br_spec;
index 11f4ffcc113d83813b92599147fb93084a5da0b0..f0d607ca5e7353dac92f805316337ab4ad3f723c 100644 (file)
@@ -3722,7 +3722,7 @@ skip:
 }
 
 static int rocker_port_bridge_setlink(struct net_device *dev,
-                                     struct nlmsghdr *nlh)
+                                     struct nlmsghdr *nlh, u16 flags)
 {
        struct rocker_port *rocker_port = netdev_priv(dev);
        struct nlattr *protinfo;
index 3d37c6eb173247c382994a1895b71f09c97a15f6..16251e96e6aa506f0f19a8b0f3f38d06c6a5aee1 100644 (file)
@@ -1154,13 +1154,15 @@ struct net_device_ops {
                                                int idx);
 
        int                     (*ndo_bridge_setlink)(struct net_device *dev,
-                                                     struct nlmsghdr *nlh);
+                                                     struct nlmsghdr *nlh,
+                                                     u16 flags);
        int                     (*ndo_bridge_getlink)(struct sk_buff *skb,
                                                      u32 pid, u32 seq,
                                                      struct net_device *dev,
                                                      u32 filter_mask);
        int                     (*ndo_bridge_dellink)(struct net_device *dev,
-                                                     struct nlmsghdr *nlh);
+                                                     struct nlmsghdr *nlh,
+                                                     u16 flags);
        int                     (*ndo_change_carrier)(struct net_device *dev,
                                                      bool new_carrier);
        int                     (*ndo_get_phys_port_id)(struct net_device *dev,
index e08b260f33fe032d114bf05a5320ac5d253889d3..088e8020384592d7b227aee7ad2714f174b02971 100644 (file)
@@ -494,7 +494,7 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[])
 }
 
 /* Change state and parameters on port. */
-int br_setlink(struct net_device *dev, struct nlmsghdr *nlh)
+int br_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
 {
        struct nlattr *protinfo;
        struct nlattr *afspec;
@@ -550,7 +550,7 @@ out:
 }
 
 /* Delete port information */
-int br_dellink(struct net_device *dev, struct nlmsghdr *nlh)
+int br_dellink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
 {
        struct nlattr *afspec;
        struct net_bridge_port *p;
index e8e3f3681680d89d56aae7bf7d5bd6bb369607f3..de0919975a25318093cfa640231239f58c113f61 100644 (file)
@@ -819,8 +819,8 @@ extern struct rtnl_link_ops br_link_ops;
 int br_netlink_init(void);
 void br_netlink_fini(void);
 void br_ifinfo_notify(int event, struct net_bridge_port *port);
-int br_setlink(struct net_device *dev, struct nlmsghdr *nlmsg);
-int br_dellink(struct net_device *dev, struct nlmsghdr *nlmsg);
+int br_setlink(struct net_device *dev, struct nlmsghdr *nlmsg, u16 flags);
+int br_dellink(struct net_device *dev, struct nlmsghdr *nlmsg, u16 flags);
 int br_getlink(struct sk_buff *skb, u32 pid, u32 seq, struct net_device *dev,
               u32 filter_mask);
 
index fedd7ab4085a767c7f855bf60cb79412886d0bc7..673cb4c6f391b3d07d57dc378bb2c228d223fdb8 100644 (file)
@@ -2991,7 +2991,7 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
                        goto out;
                }
 
-               err = br_dev->netdev_ops->ndo_bridge_setlink(dev, nlh);
+               err = br_dev->netdev_ops->ndo_bridge_setlink(dev, nlh, flags);
                if (err)
                        goto out;
 
@@ -3002,7 +3002,8 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
                if (!dev->netdev_ops->ndo_bridge_setlink)
                        err = -EOPNOTSUPP;
                else
-                       err = dev->netdev_ops->ndo_bridge_setlink(dev, nlh);
+                       err = dev->netdev_ops->ndo_bridge_setlink(dev, nlh,
+                                                                 flags);
                if (!err) {
                        flags &= ~BRIDGE_FLAGS_SELF;
 
@@ -3064,7 +3065,7 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
                        goto out;
                }
 
-               err = br_dev->netdev_ops->ndo_bridge_dellink(dev, nlh);
+               err = br_dev->netdev_ops->ndo_bridge_dellink(dev, nlh, flags);
                if (err)
                        goto out;
 
@@ -3075,7 +3076,8 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
                if (!dev->netdev_ops->ndo_bridge_dellink)
                        err = -EOPNOTSUPP;
                else
-                       err = dev->netdev_ops->ndo_bridge_dellink(dev, nlh);
+                       err = dev->netdev_ops->ndo_bridge_dellink(dev, nlh,
+                                                                 flags);
 
                if (!err) {
                        flags &= ~BRIDGE_FLAGS_SELF;