Netdev List
 help / color / mirror / Atom feed
* linux-next: manual merge of the rdma tree with the net-next tree
@ 2015-08-28  1:26 Stephen Rothwell
  2015-08-28  6:35 ` Jiri Pirko
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2015-08-28  1:26 UTC (permalink / raw)
  To: Doug Ledford, David Miller, netdev
  Cc: linux-next, linux-kernel, Matan Barak, Jiri Pirko

Hi Doug,

Today's linux-next merge of the rdma tree got a conflict in:

  net/core/dev.c

between commit:

  0e4ead9d7b36 ("net: introduce change upper device notifier change info")

from the net-next tree and commit:

  133b5b93c734 ("net: Add info for NETDEV_CHANGEUPPER event")

from the rdma tree.

They are doing very similar things, but not identical.

I fixed it up (see bottom of email and the below extra patch) and can
carry the fix as necessary (no action is required unless something more
correct is supplied, of course).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 28 Aug 2015 11:14:38 +1000
Subject: [PATCH] net: merge change upper notifier changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/infiniband/core/roce_gid_mgmt.c | 12 ++++++------
 include/linux/netdevice.h               | 23 +++++++++--------------
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/drivers/infiniband/core/roce_gid_mgmt.c b/drivers/infiniband/core/roce_gid_mgmt.c
index 6eecdfbf3aef..69e2ffa35d91 100644
--- a/drivers/infiniband/core/roce_gid_mgmt.c
+++ b/drivers/infiniband/core/roce_gid_mgmt.c
@@ -529,7 +529,7 @@ static const struct netdev_event_work_cmd add_cmd = {
 static const struct netdev_event_work_cmd add_cmd_upper_ips = {
 	.cb = add_netdev_upper_ips, .filter = is_eth_port_of_netdev};
 
-static void netdevice_event_changeupper(struct netdev_changeupper_info *changeupper_info,
+static void netdevice_event_changeupper(struct netdev_notifier_changeupper_info *changeupper_info,
 					struct netdev_event_work_cmd *cmds)
 {
 	static const struct netdev_event_work_cmd upper_ips_del_cmd = {
@@ -540,15 +540,15 @@ static void netdevice_event_changeupper(struct netdev_changeupper_info *changeup
 	if (changeupper_info->event ==
 	    NETDEV_CHANGEUPPER_UNLINK) {
 		cmds[0] = upper_ips_del_cmd;
-		cmds[0].ndev = changeupper_info->upper;
+		cmds[0].ndev = changeupper_info->upper_dev;
 		cmds[1] = add_cmd;
 	} else if (changeupper_info->event ==
 		   NETDEV_CHANGEUPPER_LINK) {
 		cmds[0] = bonding_default_del_cmd;
-		cmds[0].ndev = changeupper_info->upper;
+		cmds[0].ndev = changeupper_info->upper_dev;
 		cmds[1] = add_cmd_upper_ips;
-		cmds[1].ndev = changeupper_info->upper;
-		cmds[1].filter_ndev = changeupper_info->upper;
+		cmds[1].ndev = changeupper_info->upper_dev;
+		cmds[1].filter_ndev = changeupper_info->upper_dev;
 	}
 }
 
@@ -590,7 +590,7 @@ static int netdevice_event(struct notifier_block *this, unsigned long event,
 
 	case NETDEV_CHANGEUPPER:
 		netdevice_event_changeupper(
-			container_of(ptr, struct netdev_changeupper_info, info),
+			container_of(ptr, struct netdev_notifier_changeupper_info, info),
 			cmds);
 		break;
 
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0aa7d19ac85e..4ce420487d07 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2115,13 +2115,22 @@ struct netdev_notifier_change_info {
 	unsigned int flags_changed;
 };
 
+enum netdev_changeupper_event {
+	NETDEV_CHANGEUPPER_LINK,
+	NETDEV_CHANGEUPPER_UNLINK,
+};
+
 struct netdev_notifier_changeupper_info {
 	struct netdev_notifier_info info; /* must be first */
+	enum netdev_changeupper_event event;
 	struct net_device *upper_dev; /* new upper dev */
 	bool master; /* is upper dev master */
 	bool linking; /* is the nofication for link or unlink */
 };
 
+void netdev_changeupper_info_change(struct net_device *dev,
+				    struct netdev_notifier_changeupper_info *info);
+
 static inline void netdev_notifier_info_init(struct netdev_notifier_info *info,
 					     struct net_device *dev)
 {
@@ -3606,20 +3615,6 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
 struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb,
 				    netdev_features_t features);
 
-enum netdev_changeupper_event {
-	NETDEV_CHANGEUPPER_LINK,
-	NETDEV_CHANGEUPPER_UNLINK,
-};
-
-struct netdev_changeupper_info {
-	struct netdev_notifier_info	info; /* must be first */
-	enum netdev_changeupper_event	event;
-	struct net_device		*upper;
-};
-
-void netdev_changeupper_info_change(struct net_device *dev,
-				    struct netdev_changeupper_info *info);
-
 struct netdev_bonding_info {
 	ifslave	slave;
 	ifbond	master;
-- 
2.5.0



-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/core/dev.c
index a8e6cf4298d3,6e6f14e5d44f..000000000000
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@@ -5330,10 -5320,6 +5330,11 @@@ static int __netdev_upper_dev_link(stru
  	if (master && netdev_master_upper_dev_get(dev))
  		return -EBUSY;
  
++	changeupper_info.event = NETDEV_CHANGEUPPER_LINK;
 +	changeupper_info.upper_dev = upper_dev;
 +	changeupper_info.master = master;
 +	changeupper_info.linking = true;
 +
  	ret = __netdev_adjacent_dev_link_neighbour(dev, upper_dev, private,
  						   master);
  	if (ret)
@@@ -5468,14 -5456,10 +5469,15 @@@ EXPORT_SYMBOL(netdev_master_upper_dev_l
  void netdev_upper_dev_unlink(struct net_device *dev,
  			     struct net_device *upper_dev)
  {
 +	struct netdev_notifier_changeupper_info changeupper_info;
  	struct netdev_adjacent *i, *j;
 -	struct netdev_changeupper_info changeupper_info;
  	ASSERT_RTNL();
  
++	changeupper_info.event = NETDEV_CHANGEUPPER_UNLINK;
 +	changeupper_info.upper_dev = upper_dev;
 +	changeupper_info.master = netdev_master_upper_dev_get(dev) == upper_dev;
 +	changeupper_info.linking = false;
 +
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
  	/* Here is the tricky part. We must remove all dev's lower

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* linux-next: manual merge of the rdma tree with the net-next tree
@ 2016-01-05  1:51 Stephen Rothwell
  2016-01-05 17:05 ` Or Gerlitz
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2016-01-05  1:51 UTC (permalink / raw)
  To: Doug Ledford, David Miller, netdev
  Cc: linux-next, linux-kernel, Saeed Mahameed, Achiad Shochat,
	Or Gerlitz

Hi Doug,

Today's linux-next merge of the rdma tree got conflicts in:

  drivers/net/ethernet/mellanox/mlx5/core/vport.c
  include/linux/mlx5/mlx5_ifc.h
  include/linux/mlx5/vport.h

between commits:

  e1d7d349c69d ("net/mlx5: Update access functions to Query/Modify vport MAC address")
  e75465148b7d ("net/mlx5: Introduce access functions to modify/query vport state")

from the net-next tree and commit:

  e5f6175c5b66 ("net/mlx5_core: Break down the vport mac address query function")

from the rdma tree and maybe some others.

I have no hope of fixing this stuff up, so I have dropped the rdma tree
again for today.  There is similar functionality being introduced in
both trees ... please sort this mess out ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 16+ messages in thread
* linux-next: manual merge of the rdma tree with the net-next tree
@ 2016-03-16  0:58 Stephen Rothwell
  2016-03-16 14:27 ` Maor Gottlieb
  2016-03-16 17:18 ` Linus Torvalds
  0 siblings, 2 replies; 16+ messages in thread
From: Stephen Rothwell @ 2016-03-16  0:58 UTC (permalink / raw)
  To: Doug Ledford, David Miller, netdev
  Cc: linux-next, linux-kernel, Amir Vadai, Maor Gottlieb

Hi all,

Today's linux-next merge of the rdma tree got a conflict in:

  drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

between commit:

  60ab4584f5bf ("net/mlx5_core: Set flow steering dest only for forward rules")

from the net-next tree and commit:

  b3638e1a7664 ("net/mlx5_core: Introduce forward to next priority action")

from the rdma tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index e848d708d2b7,bf3446794bd5..000000000000
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@@ -73,10 -73,13 +73,13 @@@
  #define BY_PASS_MIN_LEVEL (KENREL_MIN_LEVEL + MLX5_BY_PASS_NUM_PRIOS +\
  			   LEFTOVERS_MAX_FT)
  
 -#define KERNEL_MAX_FT 2
 -#define KERNEL_NUM_PRIOS 1
 +#define KERNEL_MAX_FT 3
 +#define KERNEL_NUM_PRIOS 2
  #define KENREL_MIN_LEVEL 2
  
+ #define ANCHOR_MAX_FT 1
+ #define ANCHOR_NUM_PRIOS 1
+ #define ANCHOR_MIN_LEVEL (BY_PASS_MIN_LEVEL + 1)
  struct node_caps {
  	size_t	arr_sz;
  	long	*caps;
@@@ -360,8 -367,13 +367,13 @@@ static void del_rule(struct fs_node *no
  	memcpy(match_value, fte->val, sizeof(fte->val));
  	fs_get_obj(ft, fg->node.parent);
  	list_del(&rule->node.list);
+ 	if (rule->sw_action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) {
+ 		mutex_lock(&rule->dest_attr.ft->lock);
+ 		list_del(&rule->next_ft);
+ 		mutex_unlock(&rule->dest_attr.ft->lock);
+ 	}
 -	fte->dests_size--;
 -	if (fte->dests_size) {
 +	if ((fte->action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) &&
 +	    --fte->dests_size) {
  		err = mlx5_cmd_update_fte(dev, ft,
  					  fg->id, fte);
  		if (err)
@@@ -762,9 -835,9 +835,10 @@@ static struct mlx5_flow_rule *alloc_rul
  	if (!rule)
  		return NULL;
  
+ 	INIT_LIST_HEAD(&rule->next_ft);
  	rule->node.type = FS_TYPE_FLOW_DEST;
 -	memcpy(&rule->dest_attr, dest, sizeof(*dest));
 +	if (dest)
 +		memcpy(&rule->dest_attr, dest, sizeof(*dest));
  
  	return rule;
  }
@@@ -783,12 -856,16 +857,17 @@@ static struct mlx5_flow_rule *add_rule_
  		return ERR_PTR(-ENOMEM);
  
  	fs_get_obj(ft, fg->node.parent);
- 	/* Add dest to dests list- added as first element after the head */
+ 	/* Add dest to dests list- we need flow tables to be in the
+ 	 * end of the list for forward to next prio rules.
+ 	 */
  	tree_init_node(&rule->node, 1, del_rule);
- 	list_add_tail(&rule->node.list, &fte->node.children);
+ 	if (dest && dest->type != MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE)
+ 		list_add(&rule->node.list, &fte->node.children);
+ 	else
+ 		list_add_tail(&rule->node.list, &fte->node.children);
 -	fte->dests_size++;
 -	if (fte->dests_size == 1)
 +	if (dest)
 +		fte->dests_size++;
 +	if (fte->dests_size == 1 || !dest)
  		err = mlx5_cmd_create_fte(get_dev(&ft->node),
  					  ft, fg->id, fte);
  	else

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

end of thread, other threads:[~2016-03-23 23:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28  1:26 linux-next: manual merge of the rdma tree with the net-next tree Stephen Rothwell
2015-08-28  6:35 ` Jiri Pirko
  -- strict thread matches above, loose matches on Subject: below --
2016-01-05  1:51 Stephen Rothwell
2016-01-05 17:05 ` Or Gerlitz
2016-01-05 20:51   ` Stephen Rothwell
2016-03-16  0:58 Stephen Rothwell
2016-03-16 14:27 ` Maor Gottlieb
2016-03-16 17:18 ` Linus Torvalds
2016-03-16 17:35   ` Doug Ledford
2016-03-16 17:44     ` Linus Torvalds
2016-03-23 23:04       ` Or Gerlitz
2016-03-23 23:23         ` Linus Torvalds
2016-03-16 20:52   ` Stephen Rothwell
2016-03-16 21:01     ` Linus Torvalds
2016-03-16 21:15     ` Andrew Lunn
2016-03-16 22:35       ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox