diff mbox

linux-next: manual merge of the rdma tree with the net-next tree

Message ID 20150828112650.50b2ae58@canb.auug.org.au
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Rothwell Aug. 28, 2015, 1:26 a.m. UTC
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(-)

Comments

Jiri Pirko Aug. 28, 2015, 6:35 a.m. UTC | #1
Fri, Aug 28, 2015 at 03:26:50AM CEST, sfr@canb.auug.org.au wrote:
>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>
>---

<snip>

>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,
>+};
>+

I have this handled by "bool linking". So this is not needed.


> struct netdev_notifier_changeupper_info {
> 	struct netdev_notifier_info info; /* must be first */
>+	enum netdev_changeupper_event event;

	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



Other than this, looks good. Thanks

> 	struct net_device *upper_dev; /* new upper dev */
> 	bool master; /* is upper dev master */
> 	bool linking; /* is the nofication for link or unlink */
> };
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;