Skip to contentSkip to conversation

batman-adv: Add extack to ndo_add_slave

PATCH In review Sven Eckelmann 4 participants 9 messages Oct 7, 2017 – Oct 16, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Sven Eckelmann

author maintainer
#0 lore raw

PATCH 1/3 batman-adv: Add extack to ndo_add_slave

From: David Ahern <[email protected]>

Pass extack to do_set_master and down to ndo_add_slave

---
 compat.h                        | 7 +++++++
 net/batman-adv/soft-interface.c | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)
compat.h +7 -0
index e43c4136..c10ad589 100644
@@ -152,4 +152,11 @@ static int __batadv_interface_kill_vid(struct net_device *dev, __be16 proto,\
 
 #endif /* < KERNEL_VERSION(4, 6, 0) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+
+#define batadv_softif_slave_add(__dev, __slave_dev, __extack) \
+	batadv_softif_slave_add(__dev, __slave_dev)
+
+#endif /* < KERNEL_VERSION(4, 15, 0) */
+
 #endif /* _NET_BATMAN_ADV_COMPAT_H_ */
net/batman-adv/soft-interface.c +2 -1
index 3af4b0b2..543d2c3e 100644
@@ -867,7 +867,8 @@ static int batadv_softif_init_late(struct net_device *dev)
  * Return: 0 if successful or error otherwise.
  */
 static int batadv_softif_slave_add(struct net_device *dev,
-				   struct net_device *slave_dev)
+				   struct net_device *slave_dev,
+				   struct netlink_ext_ack *extack)
 {
 	struct batadv_hard_iface *hard_iface;
 	struct net *net = dev_net(dev);
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 2/3 batman-adv: Add extack to upper device linking

From: David Ahern <[email protected]>

Add extack arg to netdev_upper_dev_link and netdev_master_upper_dev_link

---
 compat-include/linux/netdevice.h | 11 ++++++++---
 net/batman-adv/hard-interface.c  |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)
compat-include/linux/netdevice.h +8 -3
index 00ed5e40..c29d6d21 100644
@@ -66,15 +66,20 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
 
-#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info) \
+#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info, extack) \
 	netdev_set_master(dev, upper_dev)
 
 #elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
 
-#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info) \
+#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info, extack) \
 	netdev_master_upper_dev_link(dev, upper_dev)
 
-#endif /* < KERNEL_VERSION(4, 5, 0) */
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+
+#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info, extack) \
+	netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info)
+
+#endif /* < KERNEL_VERSION(4, 15, 0) */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
 
net/batman-adv/hard-interface.c +1 -1
index d4aa99c0..4e3d5340 100644
@@ -738,7 +738,7 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
 	bat_priv = netdev_priv(hard_iface->soft_iface);
 
 	ret = netdev_master_upper_dev_link(hard_iface->net_dev,
-					   soft_iface, NULL, NULL);
+					   soft_iface, NULL, NULL, NULL);
 	if (ret)
 		goto err_dev;
 
Signature · 1 line
2.11.0

A message that is not in the archive (sent off-list or not yet received): 20171007121853.6278-1-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org

#3 lore raw

PATCH 3/3 batman-adv: Add missing kerneldoc for extack

The parameter extack was added to batadv_softif_slave_add without adding the kernel-doc for it. This caused kernel-doc warnings.

---
 net/batman-adv/soft-interface.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/soft-interface.c +1 -0
index 543d2c3e..9f673cdf 100644
@@ -863,6 +863,7 @@ static int batadv_softif_init_late(struct net_device *dev)
  * batadv_softif_slave_add - Add a slave interface to a batadv_soft_interface
  * @dev: batadv_soft_interface used as master interface
  * @slave_dev: net_device which should become the slave interface
+ * @extack: extended ACK report struct
  *
  * Return: 0 if successful or error otherwise.
  */
Signature · 1 line
2.11.0
Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] batman-adv: Add missing kerneldoc for extack

Quoted 15 lines · Sven Eckelmann

The parameter extack was added to batadv_softif_slave_add without adding the kernel-doc for it. This caused kernel-doc warnings.

---
 net/batman-adv/soft-interface.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/soft-interface.c +0 -0
index 543d2c3e..9f673cdf 100644

net/batman-adv/soft-interface.c static int batadv_softif_init_late(struct net_device *dev) · line 869

Quoted 7 lines
net/batman-adv/soft-interface.c +1 -0
@@ -863,6 +863,7 @@ static int batadv_softif_init_late(struct net_device *dev)
  * batadv_softif_slave_add - Add a slave interface to a batadv_soft_interface
  * @dev: batadv_soft_interface used as master interface
  * @slave_dev: net_device which should become the slave interface
+ * @extack: extended ACK report struct
  *
  * Return: 0 if successful or error otherwise.
  */

Thanks for the cleanup.

maintainer
#5 lore raw

Re: [PATCH 3/3] batman-adv: Add missing kerneldoc for extack

In reply to Sven Eckelmann

From: Sven Eckelmann <[email protected]>
Date: Sat, 7 Oct 2017 14:21:22 +0200

Quoted 5 lines

The parameter extack was added to batadv_softif_slave_add without adding the kernel-doc for it. This caused kernel-doc warnings.

I'm happy to apply this but where are the other two patches of this series and the series header posting?

author maintainer
#6 lore raw

Re: [PATCH 3/3] batman-adv: Add missing kerneldoc for extack

Quoted 11 lines · On Samstag, 7. Oktober 2017 20:59:52 CEST David Miller wrote:

From: Sven Eckelmann <[email protected]>
Date: Sat, 7 Oct 2017 14:21:22 +0200

Quoted 5 lines

The parameter extack was added to batadv_softif_slave_add without adding the kernel-doc for it. This caused kernel-doc warnings.

I'm happy to apply this but where are the other two patches of this series and the series header posting?

They are on the [email protected] mailing list. And they deal with the "extack" compat problems of the out-of-tree module build.

Why were you cc'ed for the patch 3:
==================================

David Ahern and David Miller were involved in adding following changes to batman-adv:

* net: Add extack to ndo_add_slave
* net: Add extack to upper device linking

These were not posted to the batman-adv mailing list.

An automatic kernel-doc run on a build machine noticed a minor problem in the first patch. Since I was not involved in the original change (and have not checked what was discussed in the past about it), I could only guess how the kernel-doc should have looked like. But you, David Ahern or anyone else from netdev@... could have a different, more educated opinion about the correct documentation - this is why you were Cc'ed.

Why are you not Cc'ed on the patch 1+2:
======================================

The changes are about code which is not present in the upstream kernel. It only deals with changes required to build the extracted batman-adv module against a different kernel. These changes were required to get the "extack" stuff working on Linux 4.14 and below.

So, it is not really relevant for you but for some people on the [email protected] mailing list. This is why everything (including the third patch) was send directly ("To:") to the mentioned mailing list.

Are you expected to apply this change:
=====================================

I was hoping that Simon is picking the patch up and forwards it do you in a proper pull request. But I would doubt that he has a big problem with you applying this single line kernel-doc change. At least it is less work for him and less extra noise on both mailing lists...

But feel free to tell us your preferred solution.

Kind regards,
Sven

maintainer
#7 lore raw

Re: [PATCH 3/3] batman-adv: Add missing kerneldoc for extack

From: Sven Eckelmann <[email protected]>
Date: Sun, 08 Oct 2017 09:29:17 +0200

Quoted 9 lines

Are you expected to apply this change:
=====================================

I was hoping that Simon is picking the patch up and forwards it do you in a proper pull request. But I would doubt that he has a big problem with you applying this single line kernel-doc change. At least it is less work for him and less extra noise on both mailing lists...

But feel free to tell us your preferred solution.

Ok I'll wait to get this from the next batman-adv pull request then.

Thanks.

author maintainer
#8 lore raw
In reply to Sven Eckelmann
Quoted 4 lines · On Samstag, 7. Oktober 2017 14:18:52 CEST Sven Eckelmann wrote:

From: David Ahern <[email protected]>

Pass extack to do_set_master and down to ndo_add_slave

Quoted 8 lines
---
 compat.h                        | 7 +++++++
 net/batman-adv/soft-interface.c | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

All three patches applied in 7a1f25d9..0ce469be [1,2,3]

Kind regards,
Sven

[1] https://patchwork.open-mesh.org/patch/17098/
[2] https://patchwork.open-mesh.org/patch/17097/
[3] https://patchwork.open-mesh.org/patch/17099/

author maintainer
#9 lore raw
Quoted 15 lines · On Montag, 16. Oktober 2017 19:07:25 CEST Sven Eckelmann wrote:
Quoted 4 lines · On Samstag, 7. Oktober 2017 14:18:52 CEST Sven Eckelmann wrote:

From: David Ahern <[email protected]>

Pass extack to do_set_master and down to ndo_add_slave

Quoted 8 lines
---
 compat.h                        | 7 +++++++
 net/batman-adv/soft-interface.c | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)
Quoted 4 lines

All three patches applied in 7a1f25d9..0ce469be [1,2,3]

Kind regards,
Sven

[1] https://git.open-mesh.org/batman-adv.git/commit/621c17e76450528c6803c326837917d96388d992
[2] https://git.open-mesh.org/batman-adv.git/commit/93418db608c2d131ef2956aa6c436c8182183184
[3] https://git.open-mesh.org/batman-adv.git/commit/0ce469be3baf302612379995611ae285a886fb57