Skip to contentSkip to conversation

net: Convert user to netif_rx().

PATCH Applied Sebastian Andrzej Siewior 6 participants 15 messages Mar 3, 2022 – Mar 8, 2022

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

cover net: Convert user to netif_rx().

This is the first 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().

Cc: Andrew Lunn <[email protected]>
Cc: [email protected]
Cc: Chris Zankel <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Horatiu Vultur <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Kurt Kanzenbach <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Łukasz Stelmach <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Mike Travis <[email protected]>
Cc: Nikolay Aleksandrov <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Roopa Prabhu <[email protected]>
Cc: Steve Wahl <[email protected]>
Cc: [email protected]
Cc: Vivien Didelot <[email protected]>
Cc: Vladimir Oltean <[email protected]>
Sebastian

#1 lore raw

PATCH 1/9 docs: networking: Use netif_rx().

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().

---
 Documentation/networking/timestamping.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/networking/timestamping.rst +1 -1
index f5809206eb93d..be4eb12420570 100644
@@ -668,7 +668,7 @@ In the generic layer, DSA provides the following infrastructure for PTP
   (through another RX timestamping FIFO). Deferral on RX is typically
   necessary when retrieving the timestamp needs a sleepable context. In
   that case, it is the responsibility of the DSA driver to call
-  ``netif_rx_ni()`` on the freshly timestamped skb.
+  ``netif_rx()`` on the freshly timestamped skb.
 
 3.2.2 Ethernet PHYs
 ^^^^^^^^^^^^^^^^^^^
Signature · 1 line
2.35.1
#2 lore raw

PATCH 2/9 net: xtensa: Use netif_rx().

In reply to 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().

---
 arch/xtensa/platforms/iss/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/xtensa/platforms/iss/network.c +1 -1
index 962e5e1452097..9fb99d18e3c22 100644
@@ -304,7 +304,7 @@ static int iss_net_rx(struct net_device *dev)
 
 		lp->stats.rx_bytes += skb->len;
 		lp->stats.rx_packets++;
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		return pkt_len;
 	}
 	kfree_skb(skb);
Signature · 1 line
2.35.1
maintainer Acked-by on v1 2/9
#3 lore raw

Re: [PATCH net-next 2/9] net: xtensa: Use netif_rx().

Quoted 9 lines · 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().

Quoted 7 lines
---
 arch/xtensa/platforms/iss/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
Thanks.
-- Max
#4 lore raw

PATCH 3/9 net: sgi-xp: Use netif_rx().

In reply to 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().

---
 drivers/misc/sgi-xp/xpnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/sgi-xp/xpnet.c +1 -1
index dab7b92db790a..50644f83e78ce 100644
@@ -247,7 +247,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
 	xpnet_device->stats.rx_packets++;
 	xpnet_device->stats.rx_bytes += skb->len + ETH_HLEN;
 
-	netif_rx_ni(skb);
+	netif_rx(skb);
 	xpc_received(partid, channel, (void *)msg);
 }
 
Signature · 1 line
2.35.1
Reviewed-by on v1 3/9
#5 lore raw

Re: [PATCH net-next 3/9] net: sgi-xp: Use netif_rx().

Quoted 32 lines · 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().

---
 drivers/misc/sgi-xp/xpnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/sgi-xp/xpnet.c +1 -1
index dab7b92db790a..50644f83e78ce 100644
@@ -247,7 +247,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
 	xpnet_device->stats.rx_packets++;
 	xpnet_device->stats.rx_bytes += skb->len + ETH_HLEN;
 
-	netif_rx_ni(skb);
+	netif_rx(skb);
 	xpc_received(partid, channel, (void *)msg);
 }
 
Signature · 1 line
2.35.1
Signature · 1 line
Steve Wahl, Hewlett Packard Enterprise
#6 lore raw

PATCH 4/9 net: caif: Use netif_rx().

In reply to 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().

---
 drivers/net/caif/caif_serial.c | 2 +-
 net/caif/chnl_net.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/caif/caif_serial.c +1 -1
index 2a7af611d43a5..688075859ae47 100644
@@ -196,7 +196,7 @@ static void ldisc_receive(struct tty_struct *tty, const u8 *data,
 	skb_reset_mac_header(skb);
 	debugfs_rx(ser, data, count);
 	/* Push received packet up the stack. */
-	ret = netif_rx_ni(skb);
+	ret = netif_rx(skb);
 	if (!ret) {
 		ser->dev->stats.rx_packets++;
 		ser->dev->stats.rx_bytes += count;
net/caif/chnl_net.c +1 -1
index 414dc5671c45e..4d63ef13a1fd7 100644
@@ -99,7 +99,7 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
 	else
 		skb->ip_summed = CHECKSUM_NONE;
 
-	netif_rx_any_context(skb);
+	netif_rx(skb);
 
 	/* Update statistics. */
 	priv->netdev->stats.rx_packets++;
Signature · 1 line
2.35.1
#7 lore raw

PATCH 5/9 net: dsa: Use netif_rx().

In reply to 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().

Cc Kurt Kanzenbach <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Vivien Didelot <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Vladimir Oltean <[email protected]>
---
 drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c | 2 +-
 drivers/net/dsa/mv88e6xxx/hwtstamp.c            | 2 +-
 drivers/net/dsa/sja1105/sja1105_ptp.c           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c +1 -1
index b3bc948d6145b..ffd06cf8c44f0 100644
@@ -331,7 +331,7 @@ static void hellcreek_get_rxts(struct hellcreek *hellcreek,
 		shwt = skb_hwtstamps(skb);
 		memset(shwt, 0, sizeof(*shwt));
 		shwt->hwtstamp = ns_to_ktime(ns);
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 }
 
drivers/net/dsa/mv88e6xxx/hwtstamp.c +1 -1
index 389f8a6ec0ab3..331b4ca089ffa 100644
@@ -301,7 +301,7 @@ static void mv88e6xxx_get_rxts(struct mv88e6xxx_chip *chip,
 			shwt->hwtstamp = ns_to_ktime(ns);
 			status &= ~MV88E6XXX_PTP_TS_VALID;
 		}
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 }
 
drivers/net/dsa/sja1105/sja1105_ptp.c +1 -1
index be3068a935af5..30fb2cc40164b 100644
@@ -399,7 +399,7 @@ static long sja1105_rxtstamp_work(struct ptp_clock_info *ptp)
 		ts = sja1105_tstamp_reconstruct(ds, ticks, ts);
 
 		shwt->hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts));
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 
 	if (ptp_data->extts_enabled)
Signature · 1 line
2.35.1
maintainer Acked-by on v1 5/9
#8 lore raw

Re: [PATCH net-next 5/9] net: dsa: Use netif_rx().

Quoted 6 lines · 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.

Quoted 8 lines

Use netif_rx().

Cc Kurt Kanzenbach <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Vivien Didelot <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Vladimir Oltean <[email protected]>
#9 lore raw

PATCH 6/9 net: ethernet: Use netif_rx().

In reply to 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().

---
 drivers/net/ethernet/asix/ax88796c_main.c             | 2 +-
 drivers/net/ethernet/davicom/dm9051.c                 | 2 +-
 drivers/net/ethernet/micrel/ks8851_spi.c              | 2 +-
 drivers/net/ethernet/microchip/enc28j60.c             | 2 +-
 drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 2 +-
 drivers/net/ethernet/qualcomm/qca_spi.c               | 2 +-
 drivers/net/ethernet/qualcomm/qca_uart.c              | 2 +-
 drivers/net/ethernet/vertexcom/mse102x.c              | 2 +-
 drivers/net/ethernet/wiznet/w5100.c                   | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/ethernet/asix/ax88796c_main.c +1 -1
index bf70481bb1cad..6ba5b024a7be7 100644
@@ -433,7 +433,7 @@ ax88796c_skb_return(struct ax88796c_device *ax_local,
 	netif_info(ax_local, rx_status, ndev, "< rx, len %zu, type 0x%x\n",
 		   skb->len + sizeof(struct ethhdr), skb->protocol);
 
-	status = netif_rx_ni(skb);
+	status = netif_rx(skb);
 	if (status != NET_RX_SUCCESS && net_ratelimit())
 		netif_info(ax_local, rx_err, ndev,
 			   "netif_rx status %d\n", status);
drivers/net/ethernet/davicom/dm9051.c +1 -1
index 8ebcb35bbc0e1..a523ddda76093 100644
@@ -804,7 +804,7 @@ static int dm9051_loop_rx(struct board_info *db)
 		skb->protocol = eth_type_trans(skb, db->ndev);
 		if (db->ndev->features & NETIF_F_RXCSUM)
 			skb_checksum_none_assert(skb);
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		db->ndev->stats.rx_bytes += rxlen;
 		db->ndev->stats.rx_packets++;
 		scanrr++;
drivers/net/ethernet/micrel/ks8851_spi.c +1 -1
index d167d93e4c12f..82d55fc27edc6 100644
@@ -293,7 +293,7 @@ static void ks8851_wrfifo_spi(struct ks8851_net *ks, struct sk_buff *txp,
  */
 static void ks8851_rx_skb_spi(struct ks8851_net *ks, struct sk_buff *skb)
 {
-	netif_rx_ni(skb);
+	netif_rx(skb);
 }
 
 /**
drivers/net/ethernet/microchip/enc28j60.c +1 -1
index db5a3edb4c3c0..559ad94a44d03 100644
@@ -975,7 +975,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
 			/* update statistics */
 			ndev->stats.rx_packets++;
 			ndev->stats.rx_bytes += len;
-			netif_rx_ni(skb);
+			netif_rx(skb);
 		}
 	}
 	/*
drivers/net/ethernet/microchip/lan966x/lan966x_main.c +1 -1
index 4e877d9859bff..ad310c95bf5c9 100644
@@ -600,7 +600,7 @@ static irqreturn_t lan966x_xtr_irq_handler(int irq, void *args)
 				skb->offload_fwd_mark = 0;
 		}
 
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		dev->stats.rx_bytes += len;
 		dev->stats.rx_packets++;
 
drivers/net/ethernet/qualcomm/qca_spi.c +1 -1
index 3c5494afd3c04..c865a4be05eec 100644
@@ -435,7 +435,7 @@ qcaspi_receive(struct qcaspi *qca)
 				qca->rx_skb->protocol = eth_type_trans(
 					qca->rx_skb, qca->rx_skb->dev);
 				skb_checksum_none_assert(qca->rx_skb);
-				netif_rx_ni(qca->rx_skb);
+				netif_rx(qca->rx_skb);
 				qca->rx_skb = netdev_alloc_skb_ip_align(net_dev,
 					net_dev->mtu + VLAN_ETH_HLEN);
 				if (!qca->rx_skb) {
drivers/net/ethernet/qualcomm/qca_uart.c +1 -1
index 27c4f43176aaa..26646cb6a20a6 100644
@@ -108,7 +108,7 @@ qca_tty_receive(struct serdev_device *serdev, const unsigned char *data,
 			qca->rx_skb->protocol = eth_type_trans(
 						qca->rx_skb, qca->rx_skb->dev);
 			skb_checksum_none_assert(qca->rx_skb);
-			netif_rx_ni(qca->rx_skb);
+			netif_rx(qca->rx_skb);
 			qca->rx_skb = netdev_alloc_skb_ip_align(netdev,
 								netdev->mtu +
 								VLAN_ETH_HLEN);
drivers/net/ethernet/vertexcom/mse102x.c +1 -1
index 25739b182ac7b..eb39a45de0121 100644
@@ -362,7 +362,7 @@ static void mse102x_rx_pkt_spi(struct mse102x_net *mse)
 		mse102x_dump_packet(__func__, skb->len, skb->data);
 
 	skb->protocol = eth_type_trans(skb, mse->ndev);
-	netif_rx_ni(skb);
+	netif_rx(skb);
 
 	mse->ndev->stats.rx_packets++;
 	mse->ndev->stats.rx_bytes += rxlen;
drivers/net/ethernet/wiznet/w5100.c +1 -1
index ae24d6b868031..4fd7c39e11233 100644
@@ -883,7 +883,7 @@ static void w5100_rx_work(struct work_struct *work)
 	struct sk_buff *skb;
 
 	while ((skb = w5100_rx_skb(priv->ndev)))
-		netif_rx_ni(skb);
+		netif_rx(skb);
 
 	w5100_enable_intr(priv);
 }
Signature · 1 line
2.35.1
maintainer Acked-by on v1 6/9
#10 lore raw

Re: [PATCH net-next 6/9] net: ethernet: Use netif_rx().

Quoted 12 lines · when 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().

Quoted 12 lines
---
 drivers/net/ethernet/asix/ax88796c_main.c             | 2 +-
 drivers/net/ethernet/davicom/dm9051.c                 | 2 +-
 drivers/net/ethernet/micrel/ks8851_spi.c              | 2 +-
 drivers/net/ethernet/microchip/enc28j60.c             | 2 +-
 drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 2 +-
 drivers/net/ethernet/qualcomm/qca_spi.c               | 2 +-
 drivers/net/ethernet/qualcomm/qca_uart.c              | 2 +-
 drivers/net/ethernet/vertexcom/mse102x.c              | 2 +-
 drivers/net/ethernet/wiznet/w5100.c                   | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
Quoted 117 lines
drivers/net/ethernet/asix/ax88796c_main.c +1 -1
index bf70481bb1cad..6ba5b024a7be7 100644
@@ -433,7 +433,7 @@ ax88796c_skb_return(struct ax88796c_device *ax_local,
 	netif_info(ax_local, rx_status, ndev, "< rx, len %zu, type 0x%x\n",
 		   skb->len + sizeof(struct ethhdr), skb->protocol);
 
-	status = netif_rx_ni(skb);
+	status = netif_rx(skb);
 	if (status != NET_RX_SUCCESS && net_ratelimit())
 		netif_info(ax_local, rx_err, ndev,
 			   "netif_rx status %d\n", status);
drivers/net/ethernet/davicom/dm9051.c +1 -1
index 8ebcb35bbc0e1..a523ddda76093 100644
@@ -804,7 +804,7 @@ static int dm9051_loop_rx(struct board_info *db)
 		skb->protocol = eth_type_trans(skb, db->ndev);
 		if (db->ndev->features & NETIF_F_RXCSUM)
 			skb_checksum_none_assert(skb);
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		db->ndev->stats.rx_bytes += rxlen;
 		db->ndev->stats.rx_packets++;
 		scanrr++;
drivers/net/ethernet/micrel/ks8851_spi.c +1 -1
index d167d93e4c12f..82d55fc27edc6 100644
@@ -293,7 +293,7 @@ static void ks8851_wrfifo_spi(struct ks8851_net *ks, struct sk_buff *txp,
  */
 static void ks8851_rx_skb_spi(struct ks8851_net *ks, struct sk_buff *skb)
 {
-	netif_rx_ni(skb);
+	netif_rx(skb);
 }
 
 /**
drivers/net/ethernet/microchip/enc28j60.c +1 -1
index db5a3edb4c3c0..559ad94a44d03 100644
@@ -975,7 +975,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
 			/* update statistics */
 			ndev->stats.rx_packets++;
 			ndev->stats.rx_bytes += len;
-			netif_rx_ni(skb);
+			netif_rx(skb);
 		}
 	}
 	/*
drivers/net/ethernet/microchip/lan966x/lan966x_main.c +1 -1
index 4e877d9859bff..ad310c95bf5c9 100644
@@ -600,7 +600,7 @@ static irqreturn_t lan966x_xtr_irq_handler(int irq, void *args)
 				skb->offload_fwd_mark = 0;
 		}
 
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		dev->stats.rx_bytes += len;
 		dev->stats.rx_packets++;
 
drivers/net/ethernet/qualcomm/qca_spi.c +1 -1
index 3c5494afd3c04..c865a4be05eec 100644
@@ -435,7 +435,7 @@ qcaspi_receive(struct qcaspi *qca)
 				qca->rx_skb->protocol = eth_type_trans(
 					qca->rx_skb, qca->rx_skb->dev);
 				skb_checksum_none_assert(qca->rx_skb);
-				netif_rx_ni(qca->rx_skb);
+				netif_rx(qca->rx_skb);
 				qca->rx_skb = netdev_alloc_skb_ip_align(net_dev,
 					net_dev->mtu + VLAN_ETH_HLEN);
 				if (!qca->rx_skb) {
drivers/net/ethernet/qualcomm/qca_uart.c +1 -1
index 27c4f43176aaa..26646cb6a20a6 100644
@@ -108,7 +108,7 @@ qca_tty_receive(struct serdev_device *serdev, const unsigned char *data,
 			qca->rx_skb->protocol = eth_type_trans(
 						qca->rx_skb, qca->rx_skb->dev);
 			skb_checksum_none_assert(qca->rx_skb);
-			netif_rx_ni(qca->rx_skb);
+			netif_rx(qca->rx_skb);
 			qca->rx_skb = netdev_alloc_skb_ip_align(netdev,
 								netdev->mtu +
 								VLAN_ETH_HLEN);
drivers/net/ethernet/vertexcom/mse102x.c +1 -1
index 25739b182ac7b..eb39a45de0121 100644
@@ -362,7 +362,7 @@ static void mse102x_rx_pkt_spi(struct mse102x_net *mse)
 		mse102x_dump_packet(__func__, skb->len, skb->data);
 
 	skb->protocol = eth_type_trans(skb, mse->ndev);
-	netif_rx_ni(skb);
+	netif_rx(skb);
 
 	mse->ndev->stats.rx_packets++;
 	mse->ndev->stats.rx_bytes += rxlen;
drivers/net/ethernet/wiznet/w5100.c +1 -1
index ae24d6b868031..4fd7c39e11233 100644
@@ -883,7 +883,7 @@ static void w5100_rx_work(struct work_struct *work)
 	struct sk_buff *skb;
 
 	while ((skb = w5100_rx_skb(priv->ndev)))
-		netif_rx_ni(skb);
+		netif_rx(skb);
 
 	w5100_enable_intr(priv);
 }
Signature · 3 lines
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics
#11 lore raw

PATCH 7/9 net: macvlan: Use netif_rx().

In reply to 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().

---
 drivers/net/macvlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/macvlan.c +1 -1
index d87c06c317ede..33753a2fde292 100644
@@ -285,7 +285,7 @@ static void macvlan_broadcast(struct sk_buff *skb,
 		if (likely(nskb))
 			err = macvlan_broadcast_one(nskb, vlan, eth,
 					mode == MACVLAN_MODE_BRIDGE) ?:
-			      netif_rx_ni(nskb);
+			      netif_rx(nskb);
 		macvlan_count_rx(vlan, skb->len + ETH_HLEN,
 				 err == NET_RX_SUCCESS, true);
 	}
Signature · 1 line
2.35.1
#12 lore raw

PATCH 8/9 net: bridge: Use netif_rx().

In reply to 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().

---
 net/bridge/br_arp_nd_proxy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/bridge/br_arp_nd_proxy.c +2 -2
index 3db1def4437b3..e5e48c6e35d78 100644
@@ -84,7 +84,7 @@ static void br_arp_send(struct net_bridge *br, struct net_bridge_port *p,
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 		skb->pkt_type = PACKET_HOST;
 
-		netif_rx_ni(skb);
+		netif_rx(skb);
 	}
 }
 
@@ -364,7 +364,7 @@ static void br_nd_send(struct net_bridge *br, struct net_bridge_port *p,
 		reply->ip_summed = CHECKSUM_UNNECESSARY;
 		reply->pkt_type = PACKET_HOST;
 
-		netif_rx_ni(reply);
+		netif_rx(reply);
 	}
 }
 
Signature · 1 line
2.35.1
#13 lore raw

PATCH 9/9 net: dev: Use netif_rx().

In reply to 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().

---
 net/core/dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/core/dev.c +3 -3
index c9e54e5ad48df..59b3ab7485d65 100644
@@ -3858,7 +3858,7 @@ int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *skb)
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 	WARN_ON(!skb_dst(skb));
 	skb_dst_force(skb);
-	netif_rx_ni(skb);
+	netif_rx(skb);
 	return 0;
 }
 EXPORT_SYMBOL(dev_loopback_xmit);
@@ -10947,11 +10947,11 @@ static int dev_cpu_dead(unsigned int oldcpu)
 
 	/* Process offline CPU's input_pkt_queue */
 	while ((skb = __skb_dequeue(&oldsd->process_queue))) {
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		input_queue_head_incr(oldsd);
 	}
 	while ((skb = skb_dequeue(&oldsd->input_pkt_queue))) {
-		netif_rx_ni(skb);
+		netif_rx(skb);
 		input_queue_head_incr(oldsd);
 	}
 
Signature · 1 line
2.35.1
#14 lore raw
In reply to Sebastian Andrzej Siewior
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 17 lines · On Thu, 3 Mar 2022 18:14:56 +0100 you wrote:

This is the first 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().

Cc: Andrew Lunn <[email protected]>
Cc: [email protected]
Cc: Chris Zankel <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Horatiu Vultur <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Kurt Kanzenbach <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Łukasz Stelmach <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Mike Travis <[email protected]>

Quoted 8 lines

Cc: Nikolay Aleksandrov <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Roopa Prabhu <[email protected]>
Cc: Steve Wahl <[email protected]>
Cc: [email protected]
Cc: Vivien Didelot <[email protected]>
Cc: Vladimir Oltean <[email protected]>
Sebastian

Here is the summary with links:
- [net-next,1/9] docs: networking: Use netif_rx().

    https://git.kernel.org/netdev/net-next/c/21f95a88eab4
  - [net-next,2/9] net: xtensa: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/aa4e5761bff5
  - [net-next,3/9] net: sgi-xp: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/4343b866aa94
  - [net-next,4/9] net: caif: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/3fb4430e73bf
  - [net-next,5/9] net: dsa: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/db00cc9da079
  - [net-next,6/9] net: ethernet: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/90f77c1c512f
  - [net-next,7/9] net: macvlan: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/566214f44697
  - [net-next,8/9] net: bridge: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/2e83bdd5d6cf
  - [net-next,9/9] net: dev: Use netif_rx().
    https://git.kernel.org/netdev/net-next/c/ad0a043fc26c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html