Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'netif_rx-conversions-part2'

Sebastian Andrzej Siewior says:

====================
net: Convert user to netif_rx(), part 2.

This is the second 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 brcmfmac changes are slilghtly larger because the inirq parameter
can be removed.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+45 -54
+1 -1
drivers/net/can/dev/dev.c
··· 154 154 155 155 cf->can_id |= CAN_ERR_RESTARTED; 156 156 157 - netif_rx_ni(skb); 157 + netif_rx(skb); 158 158 159 159 restart: 160 160 netdev_dbg(dev, "restarted\n");
+1 -1
drivers/net/can/slcan.c
··· 221 221 if (!(cf.can_id & CAN_RTR_FLAG)) 222 222 sl->dev->stats.rx_bytes += cf.len; 223 223 224 - netif_rx_ni(skb); 224 + netif_rx(skb); 225 225 } 226 226 227 227 /* parse tty input stream */
+3 -3
drivers/net/can/spi/hi311x.c
··· 356 356 357 357 can_led_event(priv->net, CAN_LED_EVENT_RX); 358 358 359 - netif_rx_ni(skb); 359 + netif_rx(skb); 360 360 } 361 361 362 362 static void hi3110_hw_sleep(struct spi_device *spi) ··· 677 677 tx_state = txerr >= rxerr ? new_state : 0; 678 678 rx_state = txerr <= rxerr ? new_state : 0; 679 679 can_change_state(net, cf, tx_state, rx_state); 680 - netif_rx_ni(skb); 680 + netif_rx(skb); 681 681 682 682 if (new_state == CAN_STATE_BUS_OFF) { 683 683 can_bus_off(net); ··· 718 718 cf->data[6] = hi3110_read(spi, HI3110_READ_TEC); 719 719 cf->data[7] = hi3110_read(spi, HI3110_READ_REC); 720 720 netdev_dbg(priv->net, "Bus Error\n"); 721 - netif_rx_ni(skb); 721 + netif_rx(skb); 722 722 } 723 723 } 724 724
+2 -2
drivers/net/can/spi/mcp251x.c
··· 740 740 741 741 can_led_event(priv->net, CAN_LED_EVENT_RX); 742 742 743 - netif_rx_ni(skb); 743 + netif_rx(skb); 744 744 } 745 745 746 746 static void mcp251x_hw_sleep(struct spi_device *spi) ··· 987 987 if (skb) { 988 988 frame->can_id |= can_id; 989 989 frame->data[1] = data1; 990 - netif_rx_ni(skb); 990 + netif_rx(skb); 991 991 } else { 992 992 netdev_err(net, "cannot allocate error skb\n"); 993 993 }
+1 -1
drivers/net/can/vcan.c
··· 80 80 skb->dev = dev; 81 81 skb->ip_summed = CHECKSUM_UNNECESSARY; 82 82 83 - netif_rx_ni(skb); 83 + netif_rx(skb); 84 84 } 85 85 86 86 static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev)
+1 -1
drivers/net/can/vxcan.c
··· 63 63 skb->ip_summed = CHECKSUM_UNNECESSARY; 64 64 65 65 len = cfd->can_id & CAN_RTR_FLAG ? 0 : cfd->len; 66 - if (netif_rx_ni(skb) == NET_RX_SUCCESS) { 66 + if (netif_rx(skb) == NET_RX_SUCCESS) { 67 67 srcstats->tx_packets++; 68 68 srcstats->tx_bytes += len; 69 69 peerstats = &peer->stats;
+1 -1
drivers/net/mctp/mctp-serial.c
··· 286 286 cb = __mctp_cb(skb); 287 287 cb->halen = 0; 288 288 289 - netif_rx_ni(skb); 289 + netif_rx(skb); 290 290 dev->netdev->stats.rx_packets++; 291 291 dev->netdev->stats.rx_bytes += dev->rxlen; 292 292 }
+3 -3
drivers/net/phy/dp83640.c
··· 886 886 spin_unlock_irqrestore(&dp83640->rx_lock, flags); 887 887 888 888 if (shhwtstamps) 889 - netif_rx_ni(skb); 889 + netif_rx(skb); 890 890 } 891 891 892 892 static void decode_txts(struct dp83640_private *dp83640, ··· 1329 1329 break; 1330 1330 } 1331 1331 1332 - netif_rx_ni(skb); 1332 + netif_rx(skb); 1333 1333 } 1334 1334 1335 1335 if (!skb_queue_empty(&dp83640->rx_queue)) ··· 1380 1380 skb_queue_tail(&dp83640->rx_queue, skb); 1381 1381 schedule_delayed_work(&dp83640->ts_work, SKB_TIMESTAMP_TIMEOUT); 1382 1382 } else { 1383 - netif_rx_ni(skb); 1383 + netif_rx(skb); 1384 1384 } 1385 1385 1386 1386 return true;
+1 -1
drivers/net/phy/mscc/mscc_ptp.c
··· 1212 1212 ts.tv_sec--; 1213 1213 1214 1214 shhwtstamps->hwtstamp = ktime_set(ts.tv_sec, ns); 1215 - netif_rx_ni(skb); 1215 + netif_rx(skb); 1216 1216 1217 1217 return true; 1218 1218 }
+1 -1
drivers/net/phy/nxp-c45-tja11xx.c
··· 478 478 shhwtstamps_rx = skb_hwtstamps(skb); 479 479 shhwtstamps_rx->hwtstamp = ns_to_ktime(timespec64_to_ns(&ts)); 480 480 NXP_C45_SKB_CB(skb)->header->reserved2 = 0; 481 - netif_rx_ni(skb); 481 + netif_rx(skb); 482 482 } 483 483 484 484 if (priv->extts) {
+1 -1
drivers/net/plip/plip.c
··· 676 676 case PLIP_PK_DONE: 677 677 /* Inform the upper layer for the arrival of a packet. */ 678 678 rcv->skb->protocol=plip_type_trans(rcv->skb, dev); 679 - netif_rx_ni(rcv->skb); 679 + netif_rx(rcv->skb); 680 680 dev->stats.rx_bytes += rcv->length.h; 681 681 dev->stats.rx_packets++; 682 682 rcv->skb = NULL;
+1 -1
drivers/net/slip/slip.c
··· 368 368 skb_put_data(skb, sl->rbuff, count); 369 369 skb_reset_mac_header(skb); 370 370 skb->protocol = htons(ETH_P_IP); 371 - netif_rx_ni(skb); 371 + netif_rx(skb); 372 372 dev->stats.rx_packets++; 373 373 } 374 374
+1 -1
drivers/net/wireless/ath/ath6kl/txrx.c
··· 839 839 840 840 skb->protocol = eth_type_trans(skb, skb->dev); 841 841 842 - netif_rx_ni(skb); 842 + netif_rx(skb); 843 843 } 844 844 845 845 static void ath6kl_alloc_netbufs(struct sk_buff_head *q, u16 num)
+1 -1
drivers/net/wireless/ath/wil6210/txrx.c
··· 958 958 if (gro) 959 959 napi_gro_receive(&wil->napi_rx, skb); 960 960 else 961 - netif_rx_ni(skb); 961 + netif_rx(skb); 962 962 } 963 963 ndev->stats.rx_packets++; 964 964 stats->rx_packets++;
+1 -1
drivers/net/wireless/ath/wil6210/wmi.c
··· 1199 1199 eth->h_proto = cpu_to_be16(ETH_P_PAE); 1200 1200 skb_put_data(skb, evt->eapol, eapol_len); 1201 1201 skb->protocol = eth_type_trans(skb, ndev); 1202 - if (likely(netif_rx_ni(skb) == NET_RX_SUCCESS)) { 1202 + if (likely(netif_rx(skb) == NET_RX_SUCCESS)) { 1203 1203 ndev->stats.rx_packets++; 1204 1204 ndev->stats.rx_bytes += sz; 1205 1205 if (stats) {
+2 -2
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
··· 397 397 } 398 398 399 399 static void brcmf_proto_bcdc_rxreorder(struct brcmf_if *ifp, 400 - struct sk_buff *skb, bool inirq) 400 + struct sk_buff *skb) 401 401 { 402 - brcmf_fws_rxreorder(ifp, skb, inirq); 402 + brcmf_fws_rxreorder(ifp, skb); 403 403 } 404 404 405 405 static void
+5 -13
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
··· 400 400 spin_unlock_irqrestore(&ifp->netif_stop_lock, flags); 401 401 } 402 402 403 - void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq) 403 + void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb) 404 404 { 405 405 /* Most of Broadcom's firmwares send 802.11f ADD frame every time a new 406 406 * STA connects to the AP interface. This is an obsoleted standard most ··· 423 423 ifp->ndev->stats.rx_packets++; 424 424 425 425 brcmf_dbg(DATA, "rx proto=0x%X\n", ntohs(skb->protocol)); 426 - if (inirq) { 427 - netif_rx(skb); 428 - } else { 429 - /* If the receive is not processed inside an ISR, 430 - * the softirqd must be woken explicitly to service 431 - * the NET_RX_SOFTIRQ. This is handled by netif_rx_ni(). 432 - */ 433 - netif_rx_ni(skb); 434 - } 426 + netif_rx(skb); 435 427 } 436 428 437 429 void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb) ··· 472 480 skb->pkt_type = PACKET_OTHERHOST; 473 481 skb->protocol = htons(ETH_P_802_2); 474 482 475 - brcmf_netif_rx(ifp, skb, false); 483 + brcmf_netif_rx(ifp, skb); 476 484 } 477 485 478 486 static int brcmf_rx_hdrpull(struct brcmf_pub *drvr, struct sk_buff *skb, ··· 507 515 return; 508 516 509 517 if (brcmf_proto_is_reorder_skb(skb)) { 510 - brcmf_proto_rxreorder(ifp, skb, inirq); 518 + brcmf_proto_rxreorder(ifp, skb); 511 519 } else { 512 520 /* Process special event packets */ 513 521 if (handle_event) { ··· 516 524 brcmf_fweh_process_skb(ifp->drvr, skb, 517 525 BCMILCP_SUBTYPE_VENDOR_LONG, gfp); 518 526 } 519 - brcmf_netif_rx(ifp, skb, inirq); 527 + brcmf_netif_rx(ifp, skb); 520 528 } 521 529 } 522 530
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
··· 208 208 void brcmf_txflowblock_if(struct brcmf_if *ifp, 209 209 enum brcmf_netif_stop_reason reason, bool state); 210 210 void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); 211 - void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq); 211 + void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); 212 212 void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb); 213 213 void brcmf_net_detach(struct net_device *ndev, bool locked); 214 214 int brcmf_net_mon_attach(struct brcmf_if *ifp);
+5 -5
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
··· 1664 1664 rfi->pend_pkts -= skb_queue_len(skb_list); 1665 1665 } 1666 1666 1667 - void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt, bool inirq) 1667 + void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt) 1668 1668 { 1669 1669 struct brcmf_pub *drvr = ifp->drvr; 1670 1670 u8 *reorder_data; ··· 1682 1682 /* validate flags and flow id */ 1683 1683 if (flags == 0xFF) { 1684 1684 bphy_err(drvr, "invalid flags...so ignore this packet\n"); 1685 - brcmf_netif_rx(ifp, pkt, inirq); 1685 + brcmf_netif_rx(ifp, pkt); 1686 1686 return; 1687 1687 } 1688 1688 ··· 1694 1694 if (rfi == NULL) { 1695 1695 brcmf_dbg(INFO, "received flags to cleanup, but no flow (%d) yet\n", 1696 1696 flow_id); 1697 - brcmf_netif_rx(ifp, pkt, inirq); 1697 + brcmf_netif_rx(ifp, pkt); 1698 1698 return; 1699 1699 } 1700 1700 ··· 1719 1719 rfi = kzalloc(buf_size, GFP_ATOMIC); 1720 1720 if (rfi == NULL) { 1721 1721 bphy_err(drvr, "failed to alloc buffer\n"); 1722 - brcmf_netif_rx(ifp, pkt, inirq); 1722 + brcmf_netif_rx(ifp, pkt); 1723 1723 return; 1724 1724 } 1725 1725 ··· 1833 1833 netif_rx: 1834 1834 skb_queue_walk_safe(&reorder_list, pkt, pnext) { 1835 1835 __skb_unlink(pkt, &reorder_list); 1836 - brcmf_netif_rx(ifp, pkt, inirq); 1836 + brcmf_netif_rx(ifp, pkt); 1837 1837 } 1838 1838 } 1839 1839
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h
··· 42 42 void brcmf_fws_del_interface(struct brcmf_if *ifp); 43 43 void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb); 44 44 void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked); 45 - void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq); 45 + void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb); 46 46 47 47 #endif /* FWSIGNAL_H_ */
+2 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
··· 536 536 return -ENODEV; 537 537 } 538 538 539 - static void brcmf_msgbuf_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb, 540 - bool inirq) 539 + static void brcmf_msgbuf_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb) 541 540 { 542 541 } 543 542 ··· 1190 1191 } 1191 1192 1192 1193 skb->protocol = eth_type_trans(skb, ifp->ndev); 1193 - brcmf_netif_rx(ifp, skb, false); 1194 + brcmf_netif_rx(ifp, skb); 1194 1195 } 1195 1196 1196 1197 static void brcmf_msgbuf_process_gen_status(struct brcmf_msgbuf *msgbuf,
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h
··· 32 32 u8 peer[ETH_ALEN]); 33 33 void (*add_tdls_peer)(struct brcmf_pub *drvr, int ifidx, 34 34 u8 peer[ETH_ALEN]); 35 - void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq); 35 + void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb); 36 36 void (*add_if)(struct brcmf_if *ifp); 37 37 void (*del_if)(struct brcmf_if *ifp); 38 38 void (*reset_if)(struct brcmf_if *ifp); ··· 109 109 } 110 110 111 111 static inline void 112 - brcmf_proto_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq) 112 + brcmf_proto_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb) 113 113 { 114 - ifp->drvr->proto->rxreorder(ifp, skb, inirq); 114 + ifp->drvr->proto->rxreorder(ifp, skb); 115 115 } 116 116 117 117 static inline void
+2 -2
drivers/net/wireless/marvell/libertas/rx.c
··· 147 147 dev->stats.rx_packets++; 148 148 149 149 skb->protocol = eth_type_trans(skb, dev); 150 - netif_rx_any_context(skb); 150 + netif_rx(skb); 151 151 152 152 ret = 0; 153 153 done: ··· 262 262 dev->stats.rx_packets++; 263 263 264 264 skb->protocol = eth_type_trans(skb, priv->dev); 265 - netif_rx_any_context(skb); 265 + netif_rx(skb); 266 266 267 267 ret = 0; 268 268
+1 -1
drivers/net/wireless/marvell/mwifiex/uap_txrx.c
··· 350 350 skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); 351 351 352 352 /* Forward multicast/broadcast packet to upper layer*/ 353 - netif_rx_any_context(skb); 353 + netif_rx(skb); 354 354 return 0; 355 355 } 356 356
+1 -1
drivers/net/wireless/marvell/mwifiex/util.c
··· 488 488 (skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)) 489 489 skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); 490 490 491 - netif_rx_any_context(skb); 491 + netif_rx(skb); 492 492 return 0; 493 493 } 494 494
+1 -1
net/can/af_can.c
··· 284 284 } 285 285 286 286 if (newskb) 287 - netif_rx_ni(newskb); 287 + netif_rx(newskb); 288 288 289 289 /* update statistics */ 290 290 pkg_stats->tx_frames++;
+1 -1
net/wireless/util.c
··· 2153 2153 skb->dev = dev; 2154 2154 skb->protocol = eth_type_trans(skb, dev); 2155 2155 memset(skb->cb, 0, sizeof(skb->cb)); 2156 - netif_rx_ni(skb); 2156 + netif_rx(skb); 2157 2157 } 2158 2158 EXPORT_SYMBOL(cfg80211_send_layer2_update); 2159 2159