All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3.
@ 2022-03-06 21:57 Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 01/10] s390: net: Use netif_rx() Sebastian Andrzej Siewior
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Alexander Gordeev, Alexandra Winter, Andrew Lunn,
	Antonio Quartulli, b.a.t.m.a.n, Christian Borntraeger,
	Divya Koppera, Greg Kroah-Hartman, Heiko Carstens,
	Heiner Kallweit, Johan Hedberg, Jon Maloy, linux-bluetooth,
	linux-s390, linux-staging, Luiz Augusto von Dentz,
	Marcel Holtmann, Marek Lindner, Remi Denis-Courmont,
	Russell King, Simon Wunderlich, Sven Eckelmann, Sven Schnelle,
	tipc-discussion, Vasily Gorbik, Wenjia Zhang, Ying Xue

This is the third and last batch of converting netif_rx_ni() caller to
netif_rx(). The change making this possible is net-next and
netif_rx_ni() is a wrapper around netif_rx(). This is a clean up in
order to remove netif_rx_ni().

The micrel phy driver is patched twice within this series: the first is
is to replace netif_rx_ni() and second to move netif_rx() outside of the
IRQ-off section. It is probably simpler to keep it within this series.

Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Alexandra Winter <wintera@linux.ibm.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Antonio Quartulli <a@unstable.cc>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Divya Koppera <Divya.Koppera@microchip.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Jon Maloy <jmaloy@redhat.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-staging@lists.linux.dev
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: Remi Denis-Courmont <courmisch@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Cc: Sven Eckelmann <sven@narfation.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: tipc-discussion@lists.sourceforge.net
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Wenjia Zhang <wenjia@linux.ibm.com>
Cc: Ying Xue <ying.xue@windriver.com>

Sebastian



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

* [PATCH net-next 01/10] s390: net: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 02/10] staging: " Sebastian Andrzej Siewior
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Alexander Gordeev, Alexandra Winter,
	Christian Borntraeger, Heiko Carstens, Sven Schnelle,
	Vasily Gorbik, Wenjia Zhang, linux-s390

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Alexandra Winter <wintera@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Wenjia Zhang <wenjia@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/s390/net/ctcm_main.c | 2 +-
 drivers/s390/net/netiucv.c   | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index 5ea7eeb07002b..e0fdd54bfeb70 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -166,7 +166,7 @@ void ctcm_unpack_skb(struct channel *ch, struct sk_buff *pskb)
 		ch->logflags = 0;
 		priv->stats.rx_packets++;
 		priv->stats.rx_bytes += skblen;
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		if (len > 0) {
 			skb_pull(pskb, header->length);
 			if (skb_tailroom(pskb) < LL_HEADER_LENGTH) {
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 981e7b1c6b962..65aa0a96c21de 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -620,11 +620,7 @@ static void netiucv_unpack_skb(struct iucv_connection *conn,
 		pskb->ip_summed = CHECKSUM_UNNECESSARY;
 		privptr->stats.rx_packets++;
 		privptr->stats.rx_bytes += skb->len;
-		/*
-		 * Since receiving is always initiated from a tasklet (in iucv.c),
-		 * we must use netif_rx_ni() instead of netif_rx()
-		 */
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		skb_pull(pskb, header->next);
 		skb_put(pskb, NETIUCV_HDRLEN);
 	}
-- 
2.35.1


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

* [PATCH net-next 02/10] staging: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 01/10] s390: net: Use netif_rx() Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 22:12   ` Greg Kroah-Hartman
  2022-03-06 21:57 ` [PATCH net-next 03/10] tun: vxlan: " Sebastian Andrzej Siewior
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Greg Kroah-Hartman, linux-staging

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/staging/gdm724x/gdm_lte.c      | 2 +-
 drivers/staging/wlan-ng/p80211netdev.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
index 493ed4821515b..2587309da766a 100644
--- a/drivers/staging/gdm724x/gdm_lte.c
+++ b/drivers/staging/gdm724x/gdm_lte.c
@@ -78,7 +78,7 @@ static int gdm_lte_rx(struct sk_buff *skb, struct nic *nic, int nic_type)
 {
 	int ret;
 
-	ret = netif_rx_ni(skb);
+	ret = netif_rx(skb);
 	if (ret == NET_RX_DROP) {
 		nic->stats.rx_dropped++;
 	} else {
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 255500448ad3e..e04fc666d218e 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -255,7 +255,7 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev,
 	if (skb_p80211_to_ether(wlandev, wlandev->ethconv, skb) == 0) {
 		wlandev->netdev->stats.rx_packets++;
 		wlandev->netdev->stats.rx_bytes += skb->len;
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		return 0;
 	}
 
@@ -290,7 +290,7 @@ static void p80211netdev_rx_bh(struct tasklet_struct *t)
 
 				dev->stats.rx_packets++;
 				dev->stats.rx_bytes += skb->len;
-				netif_rx_ni(skb);
+				netif_rx(skb);
 				continue;
 			} else {
 				if (!p80211_convert_to_ether(wlandev, skb))
-- 
2.35.1


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

* [PATCH net-next 03/10] tun: vxlan: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 01/10] s390: net: Use netif_rx() Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 02/10] staging: " Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 04/10] tipc: " Sebastian Andrzej Siewior
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/tun.c              | 2 +-
 drivers/net/vxlan/vxlan_core.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index bab92e489fba9..2b9a22669a126 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1984,7 +1984,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 	} else if (!IS_ENABLED(CONFIG_4KSTACKS)) {
 		tun_rx_batched(tun, tfile, skb, more);
 	} else {
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 	rcu_read_unlock();
 
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 4ab09dd5a32a3..b3cbd37c4b939 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -1877,7 +1877,7 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
 		reply->ip_summed = CHECKSUM_UNNECESSARY;
 		reply->pkt_type = PACKET_HOST;
 
-		if (netif_rx_ni(reply) == NET_RX_DROP) {
+		if (netif_rx(reply) == NET_RX_DROP) {
 			dev->stats.rx_dropped++;
 			vxlan_vnifilter_count(vxlan, vni, NULL,
 					      VXLAN_VNI_STATS_RX_DROPS, 0);
@@ -2036,7 +2036,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
 		if (reply == NULL)
 			goto out;
 
-		if (netif_rx_ni(reply) == NET_RX_DROP) {
+		if (netif_rx(reply) == NET_RX_DROP) {
 			dev->stats.rx_dropped++;
 			vxlan_vnifilter_count(vxlan, vni, NULL,
 					      VXLAN_VNI_STATS_RX_DROPS, 0);
-- 
2.35.1


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

* [PATCH net-next 04/10] tipc: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (2 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 03/10] tun: vxlan: " Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 05/10] batman-adv: " Sebastian Andrzej Siewior
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Jon Maloy, Ying Xue, tipc-discussion

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Jon Maloy <jmaloy@redhat.com>
Cc: Ying Xue <ying.xue@windriver.com>
Cc: tipc-discussion@lists.sourceforge.net
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/tipc/bearer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 473a790f58943..9dfe2bdf14828 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -768,7 +768,7 @@ void tipc_clone_to_loopback(struct net *net, struct sk_buff_head *pkts)
 		skb->pkt_type = PACKET_HOST;
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 		skb->protocol = eth_type_trans(skb, dev);
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 }
 
-- 
2.35.1


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

* [PATCH net-next 05/10] batman-adv: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (3 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 04/10] tipc: " Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-07  7:26     ` Sven Eckelmann
  2022-03-06 21:57 ` [PATCH net-next 06/10] bluetooth: " Sebastian Andrzej Siewior
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Antonio Quartulli, Marek Lindner,
	Simon Wunderlich, Sven Eckelmann, b.a.t.m.a.n

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Antonio Quartulli <a@unstable.cc>
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Cc: Sven Eckelmann <sven@narfation.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/batman-adv/bridge_loop_avoidance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 337e20b6586d3..7f8a14d99cdb0 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -444,7 +444,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, const u8 *mac,
 	batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES,
 			   skb->len + ETH_HLEN);
 
-	netif_rx_any_context(skb);
+	netif_rx(skb);
 out:
 	batadv_hardif_put(primary_if);
 }
-- 
2.35.1


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

* [PATCH net-next 06/10] bluetooth: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (4 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 05/10] batman-adv: " Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 23:00   ` net: Convert user to netif_rx(), part 3 bluez.test.bot
  2022-03-06 21:57 ` [PATCH net-next 07/10] phonet: Use netif_rx() Sebastian Andrzej Siewior
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, linux-bluetooth

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/bluetooth/6lowpan.c   | 2 +-
 net/bluetooth/bnep/core.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 8e8c075411530..215af9b3b5895 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -240,7 +240,7 @@ static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev)
 	if (!skb_cp)
 		return NET_RX_DROP;
 
-	return netif_rx_ni(skb_cp);
+	return netif_rx(skb_cp);
 }
 
 static int iphc_decompress(struct sk_buff *skb, struct net_device *netdev,
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 40baa6b7321ae..5a6a49885ab66 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -400,7 +400,7 @@ static int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
 	dev->stats.rx_packets++;
 	nskb->ip_summed = CHECKSUM_NONE;
 	nskb->protocol  = eth_type_trans(nskb, dev);
-	netif_rx_ni(nskb);
+	netif_rx(nskb);
 	return 0;
 
 badframe:
-- 
2.35.1


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

* [PATCH net-next 07/10] phonet: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (5 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 06/10] bluetooth: " Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-07 15:58   ` Rémi Denis-Courmont
  2022-03-06 21:57 ` [PATCH net-next 08/10] net: phy: micrel: " Sebastian Andrzej Siewior
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Remi Denis-Courmont

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Remi Denis-Courmont <courmisch@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/phonet/af_phonet.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index 65218b7ce9f94..2b582da1e88c0 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -146,7 +146,7 @@ EXPORT_SYMBOL(phonet_header_ops);
  * Prepends an ISI header and sends a datagram.
  */
 static int pn_send(struct sk_buff *skb, struct net_device *dev,
-			u16 dst, u16 src, u8 res, u8 irq)
+			u16 dst, u16 src, u8 res)
 {
 	struct phonethdr *ph;
 	int err;
@@ -182,7 +182,7 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
 	if (skb->pkt_type == PACKET_LOOPBACK) {
 		skb_reset_mac_header(skb);
 		skb_orphan(skb);
-		err = (irq ? netif_rx(skb) : netif_rx_ni(skb)) ? -ENOBUFS : 0;
+		err = netif_rx(skb) ? -ENOBUFS : 0;
 	} else {
 		err = dev_hard_header(skb, dev, ntohs(skb->protocol),
 					NULL, NULL, skb->len);
@@ -214,7 +214,7 @@ static int pn_raw_send(const void *data, int len, struct net_device *dev,
 	skb_reserve(skb, MAX_PHONET_HEADER);
 	__skb_put(skb, len);
 	skb_copy_to_linear_data(skb, data, len);
-	return pn_send(skb, dev, dst, src, res, 1);
+	return pn_send(skb, dev, dst, src, res);
 }
 
 /*
@@ -269,7 +269,7 @@ int pn_skb_send(struct sock *sk, struct sk_buff *skb,
 	if (!pn_addr(src))
 		src = pn_object(saddr, pn_obj(src));
 
-	err = pn_send(skb, dev, dst, src, res, 0);
+	err = pn_send(skb, dev, dst, src, res);
 	dev_put(dev);
 	return err;
 
-- 
2.35.1


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

* [PATCH net-next 08/10] net: phy: micrel: Use netif_rx().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (6 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 07/10] phonet: Use netif_rx() Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 09/10] net: Remove netif_rx_any_context() and netif_rx_ni() Sebastian Andrzej Siewior
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Andrew Lunn, Heiner Kallweit,
	Russell King, Divya Koppera

Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Divya Koppera <Divya.Koppera@microchip.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/phy/micrel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 81a76322254c5..cbae1524a420f 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -2045,7 +2045,7 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv,
 		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
 		shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds,
 						  rx_ts->nsec);
-		netif_rx_ni(skb);
+		netif_rx(skb);
 
 		list_del(&rx_ts->list);
 		kfree(rx_ts);
@@ -2398,7 +2398,7 @@ static bool lan8814_match_skb(struct kszphy_ptp_priv *ptp_priv,
 		shhwtstamps = skb_hwtstamps(skb);
 		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
 		shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds, rx_ts->nsec);
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 
 	return ret;
-- 
2.35.1


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

* [PATCH net-next 09/10] net: Remove netif_rx_any_context() and netif_rx_ni().
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (7 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 08/10] net: phy: micrel: " Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-06 21:57 ` [PATCH net-next 10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section Sebastian Andrzej Siewior
  2022-03-07 12:00 ` [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 patchwork-bot+netdevbpf
  10 siblings, 0 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior

Remove netif_rx_any_context and netif_rx_ni() because there are no more
users in tree.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 include/linux/netdevice.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 19a27ac361efb..29a850a8d4604 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3718,16 +3718,6 @@ int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb);
 int netif_rx(struct sk_buff *skb);
 int __netif_rx(struct sk_buff *skb);
 
-static inline int netif_rx_ni(struct sk_buff *skb)
-{
-	return netif_rx(skb);
-}
-
-static inline int netif_rx_any_context(struct sk_buff *skb)
-{
-	return netif_rx(skb);
-}
-
 int netif_receive_skb(struct sk_buff *skb);
 int netif_receive_skb_core(struct sk_buff *skb);
 void netif_receive_skb_list_internal(struct list_head *head);
-- 
2.35.1


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

* [PATCH net-next 10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section.
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (8 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 09/10] net: Remove netif_rx_any_context() and netif_rx_ni() Sebastian Andrzej Siewior
@ 2022-03-06 21:57 ` Sebastian Andrzej Siewior
  2022-03-07 12:00 ` [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 patchwork-bot+netdevbpf
  10 siblings, 0 replies; 17+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-03-06 21:57 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Andrew Lunn, Heiner Kallweit,
	Russell King, Divya Koppera

lan8814_match_rx_ts() invokes netif_rx() with disables interrupts
outside which will create a warning. Invoking netif_rx_ni() with
disabled interrupts is wrong even without the recent rework because
netif_rx_ni() would enable interrupts while processing the softirq. This
in turn can lead to dead lock if an interrupts triggers and attempts to
acquire kszphy_ptp_priv::rx_ts_lock.

Move netif_rx() outside the IRQ-off section.

Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Divya Koppera <Divya.Koppera@microchip.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/phy/micrel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index cbae1524a420f..ce3992383766d 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -2045,8 +2045,6 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv,
 		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
 		shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds,
 						  rx_ts->nsec);
-		netif_rx(skb);
-
 		list_del(&rx_ts->list);
 		kfree(rx_ts);
 
@@ -2055,6 +2053,8 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv,
 	}
 	spin_unlock_irqrestore(&ptp_priv->rx_ts_lock, flags);
 
+	if (ret)
+		netif_rx(skb);
 	return ret;
 }
 
-- 
2.35.1


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

* Re: [PATCH net-next 02/10] staging: Use netif_rx().
  2022-03-06 21:57 ` [PATCH net-next 02/10] staging: " Sebastian Andrzej Siewior
@ 2022-03-06 22:12   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-06 22:12 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: netdev, David S. Miller, Jakub Kicinski, Thomas Gleixner, linux-staging

On Sun, Mar 06, 2022 at 10:57:45PM +0100, Sebastian Andrzej Siewior wrote:
> Since commit
>    baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")
> 
> the function netif_rx() can be used in preemptible/thread context as
> well as in interrupt context.
> 
> Use netif_rx().
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-staging@lists.linux.dev
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  drivers/staging/gdm724x/gdm_lte.c      | 2 +-
>  drivers/staging/wlan-ng/p80211netdev.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* RE: net: Convert user to netif_rx(), part 3.
  2022-03-06 21:57 ` [PATCH net-next 06/10] bluetooth: " Sebastian Andrzej Siewior
@ 2022-03-06 23:00   ` bluez.test.bot
  0 siblings, 0 replies; 17+ messages in thread
From: bluez.test.bot @ 2022-03-06 23:00 UTC (permalink / raw)
  To: linux-bluetooth, bigeasy

[-- Attachment #1: Type: text/plain, Size: 2440 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=620752

---Test result---

Test Summary:
CheckPatch                    FAIL      1.03 seconds
GitLint                       FAIL      0.45 seconds
SubjectPrefix                 FAIL      0.32 seconds
BuildKernel                   PASS      33.53 seconds
BuildKernel32                 PASS      29.85 seconds
Incremental Build with patchesPASS      39.86 seconds
TestRunner: Setup             PASS      525.29 seconds
TestRunner: l2cap-tester      PASS      16.50 seconds
TestRunner: bnep-tester       PASS      6.45 seconds
TestRunner: mgmt-tester       PASS      107.98 seconds
TestRunner: rfcomm-tester     PASS      8.33 seconds
TestRunner: sco-tester        PASS      8.05 seconds
TestRunner: smp-tester        PASS      8.16 seconds
TestRunner: userchan-tester   PASS      6.73 seconds

Details
##############################
Test: CheckPatch - FAIL - 1.03 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
[net-next,06/10] bluetooth: Use netif_rx().\WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#68: 
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

total: 0 errors, 1 warnings, 0 checks, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12770937.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL - 0.45 seconds
Run gitlint with rule in .gitlint
[net-next,06/10] bluetooth: Use netif_rx().
1: T3 Title has trailing punctuation (.): "[net-next,06/10] bluetooth: Use netif_rx()."
4: B1 Line exceeds max length (83>80): "   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")"


##############################
Test: SubjectPrefix - FAIL - 0.32 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth


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

* Re: [PATCH net-next 05/10] batman-adv: Use netif_rx().
  2022-03-06 21:57 ` [PATCH net-next 05/10] batman-adv: " Sebastian Andrzej Siewior
@ 2022-03-07  7:26     ` Sven Eckelmann
  0 siblings, 0 replies; 17+ messages in thread
From: Sven Eckelmann @ 2022-03-07  7:26 UTC (permalink / raw)
  To: netdev, Sebastian Andrzej Siewior
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Antonio Quartulli, Marek Lindner,
	Simon Wunderlich, b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

On Sunday, 6 March 2022 22:57:48 CET Sebastian Andrzej Siewior wrote:
> Since commit
>    baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")
> 
> the function netif_rx() can be used in preemptible/thread context as
> well as in interrupt context.
> 
> Use netif_rx().
> 
> Cc: Antonio Quartulli <a@unstable.cc>
> Cc: Marek Lindner <mareklindner@neomailbox.ch>
> Cc: Simon Wunderlich <sw@simonwunderlich.de>
> Cc: Sven Eckelmann <sven@narfation.org>
> Cc: b.a.t.m.a.n@lists.open-mesh.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  net/batman-adv/bridge_loop_avoidance.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


Acked-by: Sven Eckelmann <sven@narfation.org>

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH net-next 05/10] batman-adv: Use netif_rx().
@ 2022-03-07  7:26     ` Sven Eckelmann
  0 siblings, 0 replies; 17+ messages in thread
From: Sven Eckelmann @ 2022-03-07  7:26 UTC (permalink / raw)
  To: netdev, Sebastian Andrzej Siewior
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Antonio Quartulli, Marek Lindner,
	b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

On Sunday, 6 March 2022 22:57:48 CET Sebastian Andrzej Siewior wrote:
> Since commit
>    baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")
> 
> the function netif_rx() can be used in preemptible/thread context as
> well as in interrupt context.
> 
> Use netif_rx().
> 
> Cc: Antonio Quartulli <a@unstable.cc>
> Cc: Marek Lindner <mareklindner@neomailbox.ch>
> Cc: Simon Wunderlich <sw@simonwunderlich.de>
> Cc: Sven Eckelmann <sven@narfation.org>
> Cc: b.a.t.m.a.n@lists.open-mesh.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  net/batman-adv/bridge_loop_avoidance.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


Acked-by: Sven Eckelmann <sven@narfation.org>

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3.
  2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
                   ` (9 preceding siblings ...)
  2022-03-06 21:57 ` [PATCH net-next 10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section Sebastian Andrzej Siewior
@ 2022-03-07 12:00 ` patchwork-bot+netdevbpf
  10 siblings, 0 replies; 17+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-07 12:00 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: netdev, davem, kuba, tglx, agordeev, wintera, andrew, a,
	b.a.t.m.a.n, borntraeger, Divya.Koppera, gregkh, hca, hkallweit1,
	johan.hedberg, jmaloy, linux-bluetooth, linux-s390,
	linux-staging, luiz.dentz, marcel, mareklindner, courmisch,
	linux, sw, sven, svens, tipc-discussion, gor, wenjia, ying.xue

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Sun,  6 Mar 2022 22:57:43 +0100 you wrote:
> This is the third and last batch of converting netif_rx_ni() caller to
> netif_rx(). The change making this possible is net-next and
> netif_rx_ni() is a wrapper around netif_rx(). This is a clean up in
> order to remove netif_rx_ni().
> 
> The micrel phy driver is patched twice within this series: the first is
> is to replace netif_rx_ni() and second to move netif_rx() outside of the
> IRQ-off section. It is probably simpler to keep it within this series.
> 
> [...]

Here is the summary with links:
  - [net-next,01/10] s390: net: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/a70d20704ad5
  - [net-next,02/10] staging: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/4bcc4249b4cf
  - [net-next,03/10] tun: vxlan: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/3d391f6518fd
  - [net-next,04/10] tipc: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/a0f0db8292e6
  - [net-next,05/10] batman-adv: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/94da81e2fc42
  - [net-next,06/10] bluetooth: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/d33d0dc9275d
  - [net-next,07/10] phonet: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/63d57cd67454
  - [net-next,08/10] net: phy: micrel: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/e1f9e434617f
  - [net-next,09/10] net: Remove netif_rx_any_context() and netif_rx_ni().
    https://git.kernel.org/netdev/net-next/c/2655926aea9b
  - [net-next,10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section.
    https://git.kernel.org/netdev/net-next/c/67dbd6c0a2c4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH net-next 07/10] phonet: Use netif_rx().
  2022-03-06 21:57 ` [PATCH net-next 07/10] phonet: Use netif_rx() Sebastian Andrzej Siewior
@ 2022-03-07 15:58   ` Rémi Denis-Courmont
  0 siblings, 0 replies; 17+ messages in thread
From: Rémi Denis-Courmont @ 2022-03-07 15:58 UTC (permalink / raw)
  To: netdev, Sebastian Andrzej Siewior
  Cc: David S. Miller, Jakub Kicinski, Thomas Gleixner,
	Sebastian Andrzej Siewior, Remi Denis-Courmont

Le sunnuntaina 6. maaliskuuta 2022, 23.57.50 EET Sebastian Andrzej Siewior a 
écrit :
> Since commit
>    baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any
> context.")
> 
> the function netif_rx() can be used in preemptible/thread context as
> well as in interrupt context.
> 
> Use netif_rx().
> 
> Cc: Remi Denis-Courmont <courmisch@gmail.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Acked-by: Rémi Denis-Courmont <courmisch@gmail.com>

-- 
Rémi Denis-Courmont
http://www.remlab.net/




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

end of thread, other threads:[~2022-03-07 16:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-06 21:57 [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 Sebastian Andrzej Siewior
2022-03-06 21:57 ` [PATCH net-next 01/10] s390: net: Use netif_rx() Sebastian Andrzej Siewior
2022-03-06 21:57 ` [PATCH net-next 02/10] staging: " Sebastian Andrzej Siewior
2022-03-06 22:12   ` Greg Kroah-Hartman
2022-03-06 21:57 ` [PATCH net-next 03/10] tun: vxlan: " Sebastian Andrzej Siewior
2022-03-06 21:57 ` [PATCH net-next 04/10] tipc: " Sebastian Andrzej Siewior
2022-03-06 21:57 ` [PATCH net-next 05/10] batman-adv: " Sebastian Andrzej Siewior
2022-03-07  7:26   ` Sven Eckelmann
2022-03-07  7:26     ` Sven Eckelmann
2022-03-06 21:57 ` [PATCH net-next 06/10] bluetooth: " Sebastian Andrzej Siewior
2022-03-06 23:00   ` net: Convert user to netif_rx(), part 3 bluez.test.bot
2022-03-06 21:57 ` [PATCH net-next 07/10] phonet: Use netif_rx() Sebastian Andrzej Siewior
2022-03-07 15:58   ` Rémi Denis-Courmont
2022-03-06 21:57 ` [PATCH net-next 08/10] net: phy: micrel: " Sebastian Andrzej Siewior
2022-03-06 21:57 ` [PATCH net-next 09/10] net: Remove netif_rx_any_context() and netif_rx_ni() Sebastian Andrzej Siewior
2022-03-06 21:57 ` [PATCH net-next 10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section Sebastian Andrzej Siewior
2022-03-07 12:00 ` [PATCH net-next 00/10] net: Convert user to netif_rx(), part 3 patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.