History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-12-30 The following pull-request contains BPF updates for your *net-next* tree. We've added 72 non-merge commits during the last 20 day(s) which contain a total of 223 files changed, 3510 insertions(+), 1591 deletions(-). The main changes are: 1) Automatic setrlimit in libbpf when bpf is memcg's in the kernel, from Andrii. 2) Beautify and de-verbose verifier logs, from Christy. 3) Composable verifier types, from Hao. 4) bpf_strncmp helper, from Hou. 5) bpf.h header dependency cleanup, from Jakub. 6) get_func_[arg|ret|arg_cnt] helpers, from Jiri. 7) Sleepable local storage, from KP. 8) Extend kfunc with PTR_TO_CTX, PTR_TO_MEM argument support, from Kumar. ====================

David S. Miller committed 4 years ago

Commit e63a0232 parents ce2b6eb 9e6b19a221 files · +3506 −1591Browse files

Showing the changes to drivers (65 of 221 files). Show all

Unified · Split

65 files
  1. drivers/bluetooth/btqca.c +1 −0
  2. drivers/infiniband/core/cache.c +1 −0
  3. drivers/infiniband/hw/irdma/ctrl.c +2 −0
  4. drivers/infiniband/hw/irdma/uda.c +2 −0
  5. drivers/infiniband/hw/mlx5/doorbell.c +1 −0
  6. drivers/infiniband/hw/mlx5/qp.c +1 −0
  7. drivers/net/amt.c +1 −0
  8. drivers/net/appletalk/ipddp.c +1 −0
  9. drivers/net/bonding/bond_main.c +1 −0
  10. drivers/net/can/usb/peak_usb/pcan_usb.c +1 −0
  11. drivers/net/dsa/microchip/ksz8795.c +1 −0
  12. drivers/net/dsa/xrs700x/xrs700x.c +1 −0
  13. drivers/net/ethernet/amazon/ena/ena_netdev.c +1 −1
  14. drivers/net/ethernet/amazon/ena/ena_netdev.h +1 −0
  15. drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +1 −0
  16. drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +1 −1
  17. drivers/net/ethernet/cavium/thunder/nicvf_main.c +1 −1
  18. drivers/net/ethernet/cavium/thunder/nicvf_queues.c +1 −0
  19. drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +1 −1
  20. drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +1 −1
  21. drivers/net/ethernet/freescale/enetc/enetc.c +1 −1
  22. drivers/net/ethernet/huawei/hinic/hinic_tx.c +1 −0
  23. drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 −1
  24. drivers/net/ethernet/intel/i40e/i40e_xsk.c +1 −1
  25. drivers/net/ethernet/intel/i40e/i40e_xsk.h +0 −1
  26. drivers/net/ethernet/intel/ice/ice_devlink.c +2 −0
  27. drivers/net/ethernet/intel/ice/ice_txrx.c +1 −1
  28. drivers/net/ethernet/intel/ice/ice_txrx_lib.c +2 −0
  29. drivers/net/ethernet/intel/ice/ice_xsk.c +1 −1
  30. drivers/net/ethernet/intel/igb/igb_main.c +1 −1
  31. drivers/net/ethernet/intel/igc/igc_main.c +1 −1
  32. drivers/net/ethernet/intel/igc/igc_xdp.c +1 −0
  33. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 −1
  34. drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h +0 −2
  35. drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +1 −1
  36. drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 −1
  37. drivers/net/ethernet/marvell/mvneta.c +1 −1
  38. drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 −1
  39. drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c +1 −1
  40. drivers/net/ethernet/mellanox/mlx4/en_netdev.c +1 −0
  41. drivers/net/ethernet/mellanox/mlx4/en_rx.c +1 −1
  42. drivers/net/ethernet/mellanox/mlx5/core/en/qos.c +1 −0
  43. drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +1 −1
  44. drivers/net/ethernet/microsoft/mana/mana_bpf.c +1 −1
  45. drivers/net/ethernet/microsoft/mana/mana_en.c +2 −0
  46. drivers/net/ethernet/netronome/nfp/nfp_net_common.c +1 −1
  47. drivers/net/ethernet/qlogic/qede/qede_fp.c +1 −1
  48. drivers/net/ethernet/sfc/efx.c +1 −0
  49. drivers/net/ethernet/sfc/efx_channels.c +1 −0
  50. drivers/net/ethernet/sfc/efx_common.c +1 −0
  51. drivers/net/ethernet/sfc/rx.c +1 −1
  52. drivers/net/ethernet/socionext/netsec.c +1 −1
  53. drivers/net/ethernet/stmicro/stmmac/stmmac.h +1 −0
  54. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 −1
  55. drivers/net/ethernet/ti/cpsw_priv.c +1 −1
  56. drivers/net/ethernet/ti/cpsw_priv.h +2 −0
  57. drivers/net/hamradio/hdlcdrv.c +1 −0
  58. drivers/net/hamradio/scc.c +1 −0
  59. drivers/net/hyperv/netvsc_bpf.c +1 −1
  60. drivers/net/loopback.c +1 −0
  61. drivers/net/tun.c +1 −1
  62. drivers/net/veth.c +2 −2
  63. drivers/net/virtio_net.c +2 −2
  64. drivers/net/vrf.c +1 −0
  65. drivers/net/xen-netfront.c +1 −1
drivers/bluetooth/btqca.c+1−0
@@ -6,6 +6,7 @@ · 5 unmodified lines
66 */
77 #include <linux/module.h>
88 #include <linux/firmware.h>
9+#include <linux/vmalloc.h>
910
1011 #include <net/bluetooth/bluetooth.h>
1112 #include <net/bluetooth/hci_core.h>
drivers/infiniband/core/cache.c+1−0
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 * SOFTWARE.
3434 */
3535
36+#include <linux/if_vlan.h>
3637 #include <linux/module.h>
3738 #include <linux/errno.h>
3839 #include <linux/slab.h>
drivers/infiniband/hw/irdma/ctrl.c+2−0
@@ -1,5 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
22 /* Copyright (c) 2015 - 2021 Intel Corporation */
3+#include <linux/etherdevice.h>
4+
35 #include "osdep.h"
46 #include "status.h"
57 #include "hmc.h"
drivers/infiniband/hw/irdma/uda.c+2−0
@@ -1,5 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
22 /* Copyright (c) 2016 - 2021 Intel Corporation */
3+#include <linux/etherdevice.h>
4+
35 #include "osdep.h"
46 #include "status.h"
57 #include "hmc.h"
drivers/infiniband/hw/mlx5/doorbell.c+1−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232
3333 #include <linux/kref.h>
3434 #include <linux/slab.h>
35+#include <linux/sched/mm.h>
3536 #include <rdma/ib_umem.h>
3637
3738 #include "mlx5_ib.h"
drivers/infiniband/hw/mlx5/qp.c+1−0
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 * SOFTWARE.
3131 */
3232
33+#include <linux/etherdevice.h>
3334 #include <linux/module.h>
3435 #include <rdma/ib_umem.h>
3536 #include <rdma/ib_cache.h>
drivers/net/amt.c+1−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/net.h>
1212 #include <linux/igmp.h>
1313 #include <linux/workqueue.h>
14+#include <net/sch_generic.h>
1415 #include <net/net_namespace.h>
1516 #include <net/ip.h>
1617 #include <net/udp.h>
drivers/net/appletalk/ipddp.c+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 * of the GNU General Public License, incorporated herein by reference.
2424 */
2525
26+#include <linux/compat.h>
2627 #include <linux/module.h>
2728 #include <linux/kernel.h>
2829 #include <linux/init.h>
drivers/net/bonding/bond_main.c+1−0
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include <linux/module.h>
3636 #include <linux/types.h>
3737 #include <linux/fcntl.h>
38+#include <linux/filter.h>
3839 #include <linux/interrupt.h>
3940 #include <linux/ptrace.h>
4041 #include <linux/ioport.h>
drivers/net/can/usb/peak_usb/pcan_usb.c+1−0
@@ -8,6 +8,7 @@ · 7 unmodified lines
88 *
99 * Many thanks to Klaus Hitschler <klaus.hitschler@gmx.de>
1010 */
11+#include <asm/unaligned.h>
1112 #include <linux/netdevice.h>
1213 #include <linux/usb.h>
1314 #include <linux/module.h>
drivers/net/dsa/microchip/ksz8795.c+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/delay.h>
1111 #include <linux/export.h>
1212 #include <linux/gpio.h>
13+#include <linux/if_vlan.h>
1314 #include <linux/kernel.h>
1415 #include <linux/module.h>
1516 #include <linux/platform_data/microchip-ksz.h>
drivers/net/dsa/xrs700x/xrs700x.c+1−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 */
66
77 #include <net/dsa.h>
8+#include <linux/etherdevice.h>
89 #include <linux/if_bridge.h>
910 #include <linux/of_device.h>
1011 #include <linux/netdev_features.h>
drivers/net/ethernet/amazon/ena/ena_netdev.c+1−1
@@ -434,7 +434,7 @@ static int ena_xdp_execute(struct ena_ring *rx_ring, struct xdp_buff *xdp) · 433 unmodified lines
434434 xdp_stat = &rx_ring->rx_stats.xdp_pass;
435435 break;
436436 default:
437− bpf_warn_invalid_xdp_action(verdict);
437+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, verdict);
438438 xdp_stat = &rx_ring->rx_stats.xdp_invalid;
439439 }
440440
drivers/net/ethernet/amazon/ena/ena_netdev.h+1−0
@@ -14,6 +14,7 @@ · 13 unmodified lines
1414 #include <linux/interrupt.h>
1515 #include <linux/netdevice.h>
1616 #include <linux/skbuff.h>
17+#include <uapi/linux/bpf.h>
1718
1819 #include "ena_com.h"
1920 #include "ena_eth_com.h"
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c+1−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
99
1010 #include <linux/pci.h>
1111 #include <linux/netdevice.h>
12+#include <linux/vmalloc.h>
1213 #include <net/devlink.h>
1314 #include "bnxt_hsi.h"
1415 #include "bnxt.h"
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c+1−1
@@ -195,7 +195,7 @@ bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, · 194 unmodified lines
195195 *event |= BNXT_REDIRECT_EVENT;
196196 break;
197197 default:
198− bpf_warn_invalid_xdp_action(act);
198+ bpf_warn_invalid_xdp_action(bp->dev, xdp_prog, act);
199199 fallthrough;
200200 case XDP_ABORTED:
201201 trace_xdp_exception(bp->dev, xdp_prog, act);
drivers/net/ethernet/cavium/thunder/nicvf_main.c+1−1
@@ -590,7 +590,7 @@ static inline bool nicvf_xdp_rx(struct nicvf *nic, struct bpf_prog *prog, · 589 unmodified lines
590590 nicvf_xdp_sq_append_pkt(nic, sq, (u64)xdp.data, dma_addr, len);
591591 return true;
592592 default:
593− bpf_warn_invalid_xdp_action(action);
593+ bpf_warn_invalid_xdp_action(nic->netdev, prog, action);
594594 fallthrough;
595595 case XDP_ABORTED:
596596 trace_xdp_exception(nic->netdev, prog, action);
drivers/net/ethernet/cavium/thunder/nicvf_queues.c+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/iommu.h>
1111 #include <net/ip.h>
1212 #include <net/tso.h>
13+#include <uapi/linux/bpf.h>
1314
1415 #include "nic_reg.h"
1516 #include "nic.h"
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c+1−1
@@ -2623,7 +2623,7 @@ static u32 dpaa_run_xdp(struct dpaa_priv *priv, struct qm_fd *fd, void *vaddr, · 2622 unmodified lines
26232623 }
26242624 break;
26252625 default:
2626− bpf_warn_invalid_xdp_action(xdp_act);
2626+ bpf_warn_invalid_xdp_action(priv->net_dev, xdp_prog, xdp_act);
26272627 fallthrough;
26282628 case XDP_ABORTED:
26292629 trace_xdp_exception(priv->net_dev, xdp_prog, xdp_act);
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c+1−1
@@ -374,7 +374,7 @@ static u32 dpaa2_eth_run_xdp(struct dpaa2_eth_priv *priv, · 373 unmodified lines
374374 dpaa2_eth_xdp_enqueue(priv, ch, fd, vaddr, rx_fq->flowid);
375375 break;
376376 default:
377− bpf_warn_invalid_xdp_action(xdp_act);
377+ bpf_warn_invalid_xdp_action(priv->net_dev, xdp_prog, xdp_act);
378378 fallthrough;
379379 case XDP_ABORTED:
380380 trace_xdp_exception(priv->net_dev, xdp_prog, xdp_act);
drivers/net/ethernet/freescale/enetc/enetc.c+1−1
@@ -1547,7 +1547,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring, · 1546 unmodified lines
15471547
15481548 switch (xdp_act) {
15491549 default:
1550− bpf_warn_invalid_xdp_action(xdp_act);
1550+ bpf_warn_invalid_xdp_action(rx_ring->ndev, prog, xdp_act);
15511551 fallthrough;
15521552 case XDP_ABORTED:
15531553 trace_xdp_exception(rx_ring->ndev, prog, xdp_act);
drivers/net/ethernet/huawei/hinic/hinic_tx.c+1−0
@@ -4,6 +4,7 @@ · 3 unmodified lines
44 * Copyright(c) 2017 Huawei Technologies Co., Ltd
55 */
66
7+#include <linux/if_vlan.h>
78 #include <linux/kernel.h>
89 #include <linux/netdevice.h>
910 #include <linux/u64_stats_sync.h>
drivers/net/ethernet/intel/i40e/i40e_txrx.c+1−1
@@ -2322,7 +2322,7 @@ static int i40e_run_xdp(struct i40e_ring *rx_ring, struct xdp_buff *xdp) · 2321 unmodified lines
23222322 result = I40E_XDP_REDIR;
23232323 break;
23242324 default:
2325− bpf_warn_invalid_xdp_action(act);
2325+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
23262326 fallthrough;
23272327 case XDP_ABORTED:
23282328 out_failure:
drivers/net/ethernet/intel/i40e/i40e_xsk.c+1−1
@@ -176,7 +176,7 @@ static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp) · 175 unmodified lines
176176 goto out_failure;
177177 break;
178178 default:
179− bpf_warn_invalid_xdp_action(act);
179+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
180180 fallthrough;
181181 case XDP_ABORTED:
182182 out_failure:
drivers/net/ethernet/intel/i40e/i40e_xsk.h+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222
2323 struct i40e_vsi;
2424 struct xsk_buff_pool;
25−struct zero_copy_allocator;
2625
2726 int i40e_queue_pair_disable(struct i40e_vsi *vsi, int queue_pair);
2827 int i40e_queue_pair_enable(struct i40e_vsi *vsi, int queue_pair);
drivers/net/ethernet/intel/ice/ice_devlink.c+2−0
@@ -1,6 +1,8 @@
11 // SPDX-License-Identifier: GPL-2.0
22 /* Copyright (c) 2020, Intel Corporation. */
33
4+#include <linux/vmalloc.h>
5+
46 #include "ice.h"
57 #include "ice_lib.h"
68 #include "ice_devlink.h"
drivers/net/ethernet/intel/ice/ice_txrx.c+1−1
@@ -576,7 +576,7 @@ ice_run_xdp(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp, · 575 unmodified lines
576576 goto out_failure;
577577 return ICE_XDP_REDIR;
578578 default:
579− bpf_warn_invalid_xdp_action(act);
579+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
580580 fallthrough;
581581 case XDP_ABORTED:
582582 out_failure:
drivers/net/ethernet/intel/ice/ice_txrx_lib.c+2−0
@@ -1,6 +1,8 @@
11 // SPDX-License-Identifier: GPL-2.0
22 /* Copyright (c) 2019, Intel Corporation. */
33
4+#include <linux/filter.h>
5+
46 #include "ice_txrx_lib.h"
57 #include "ice_eswitch.h"
68 #include "ice_lib.h"
drivers/net/ethernet/intel/ice/ice_xsk.c+1−1
@@ -481,7 +481,7 @@ ice_run_xdp_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp, · 480 unmodified lines
481481 goto out_failure;
482482 break;
483483 default:
484− bpf_warn_invalid_xdp_action(act);
484+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
485485 fallthrough;
486486 case XDP_ABORTED:
487487 out_failure:
drivers/net/ethernet/intel/igb/igb_main.c+1−1
@@ -8500,7 +8500,7 @@ static struct sk_buff *igb_run_xdp(struct igb_adapter *adapter, · 8499 unmodified lines
85008500 result = IGB_XDP_REDIR;
85018501 break;
85028502 default:
8503− bpf_warn_invalid_xdp_action(act);
8503+ bpf_warn_invalid_xdp_action(adapter->netdev, xdp_prog, act);
85048504 fallthrough;
85058505 case XDP_ABORTED:
85068506 out_failure:
drivers/net/ethernet/intel/igc/igc_main.c+1−1
@@ -2241,7 +2241,7 @@ static int __igc_xdp_run_prog(struct igc_adapter *adapter, · 2240 unmodified lines
22412241 return IGC_XDP_REDIRECT;
22422242 break;
22432243 default:
2244− bpf_warn_invalid_xdp_action(act);
2244+ bpf_warn_invalid_xdp_action(adapter->netdev, prog, act);
22452245 fallthrough;
22462246 case XDP_ABORTED:
22472247 out_failure:
drivers/net/ethernet/intel/igc/igc_xdp.c+1−0
@@ -1,6 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0
22 /* Copyright (c) 2020, Intel Corporation. */
33
4+#include <linux/if_vlan.h>
45 #include <net/xdp_sock_drv.h>
56
67 #include "igc.h"
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+1−1
@@ -2235,7 +2235,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter, · 2234 unmodified lines
22352235 result = IXGBE_XDP_REDIR;
22362236 break;
22372237 default:
2238− bpf_warn_invalid_xdp_action(act);
2238+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
22392239 fallthrough;
22402240 case XDP_ABORTED:
22412241 out_failure:
drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h+0−2
@@ -35,8 +35,6 @@ int ixgbe_xsk_pool_setup(struct ixgbe_adapter *adapter, · 34 unmodified lines
3535 struct xsk_buff_pool *pool,
3636 u16 qid);
3737
38−void ixgbe_zca_free(struct zero_copy_allocator *alloc, unsigned long handle);
39−
4038 bool ixgbe_alloc_rx_buffers_zc(struct ixgbe_ring *rx_ring, u16 cleaned_count);
4139 int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector,
4240 struct ixgbe_ring *rx_ring,
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c+1−1
@@ -131,7 +131,7 @@ static int ixgbe_run_xdp_zc(struct ixgbe_adapter *adapter, · 130 unmodified lines
131131 goto out_failure;
132132 break;
133133 default:
134− bpf_warn_invalid_xdp_action(act);
134+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
135135 fallthrough;
136136 case XDP_ABORTED:
137137 out_failure:
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c+1−1
@@ -1070,7 +1070,7 @@ static struct sk_buff *ixgbevf_run_xdp(struct ixgbevf_adapter *adapter, · 1069 unmodified lines
10701070 goto out_failure;
10711071 break;
10721072 default:
1073− bpf_warn_invalid_xdp_action(act);
1073+ bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
10741074 fallthrough;
10751075 case XDP_ABORTED:
10761076 out_failure:
drivers/net/ethernet/marvell/mvneta.c+1−1
@@ -2240,7 +2240,7 @@ mvneta_run_xdp(struct mvneta_port *pp, struct mvneta_rx_queue *rxq, · 2239 unmodified lines
22402240 mvneta_xdp_put_buff(pp, rxq, xdp, sinfo, sync);
22412241 break;
22422242 default:
2243− bpf_warn_invalid_xdp_action(act);
2243+ bpf_warn_invalid_xdp_action(pp->dev, prog, act);
22442244 fallthrough;
22452245 case XDP_ABORTED:
22462246 trace_xdp_exception(pp->dev, prog, act);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+1−1
@@ -3823,7 +3823,7 @@ mvpp2_run_xdp(struct mvpp2_port *port, struct bpf_prog *prog, · 3822 unmodified lines
38233823 }
38243824 break;
38253825 default:
3826− bpf_warn_invalid_xdp_action(act);
3826+ bpf_warn_invalid_xdp_action(port->dev, prog, act);
38273827 fallthrough;
38283828 case XDP_ABORTED:
38293829 trace_xdp_exception(port->dev, prog, act);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c+1−1
@@ -1198,7 +1198,7 @@ static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf, · 1197 unmodified lines
11981198 put_page(page);
11991199 break;
12001200 default:
1201− bpf_warn_invalid_xdp_action(act);
1201+ bpf_warn_invalid_xdp_action(pfvf->netdev, prog, act);
12021202 break;
12031203 case XDP_ABORTED:
12041204 trace_xdp_exception(pfvf->netdev, prog, act);
drivers/net/ethernet/mellanox/mlx4/en_netdev.c+1−0
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333
3434 #include <linux/bpf.h>
3535 #include <linux/etherdevice.h>
36+#include <linux/filter.h>
3637 #include <linux/tcp.h>
3738 #include <linux/if_vlan.h>
3839 #include <linux/delay.h>
drivers/net/ethernet/mellanox/mlx4/en_rx.c+1−1
@@ -812,7 +812,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud · 811 unmodified lines
812812 trace_xdp_exception(dev, xdp_prog, act);
813813 goto xdp_drop_no_cnt; /* Drop on xmit failure */
814814 default:
815− bpf_warn_invalid_xdp_action(act);
815+ bpf_warn_invalid_xdp_action(dev, xdp_prog, act);
816816 fallthrough;
817817 case XDP_ABORTED:
818818 trace_xdp_exception(dev, xdp_prog, act);
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c+1−0
@@ -1,5 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
22 /* Copyright (c) 2020, Mellanox Technologies inc. All rights reserved. */
3+#include <net/sch_generic.h>
34
45 #include "en.h"
56 #include "params.h"
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c+1−1
@@ -151,7 +151,7 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di, · 150 unmodified lines
151151 rq->stats->xdp_redirect++;
152152 return true;
153153 default:
154− bpf_warn_invalid_xdp_action(act);
154+ bpf_warn_invalid_xdp_action(rq->netdev, prog, act);
155155 fallthrough;
156156 case XDP_ABORTED:
157157 xdp_abort:
drivers/net/ethernet/microsoft/mana/mana_bpf.c+1−1
@@ -60,7 +60,7 @@ u32 mana_run_xdp(struct net_device *ndev, struct mana_rxq *rxq, · 59 unmodified lines
6060 break;
6161
6262 default:
63− bpf_warn_invalid_xdp_action(act);
63+ bpf_warn_invalid_xdp_action(ndev, prog, act);
6464 }
6565
6666 out:
drivers/net/ethernet/microsoft/mana/mana_en.c+2−0
@@ -1,6 +1,8 @@
11 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22 /* Copyright (c) 2021, Microsoft Corporation. */
33
4+#include <uapi/linux/bpf.h>
5+
46 #include <linux/inetdevice.h>
57 #include <linux/etherdevice.h>
68 #include <linux/ethtool.h>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c+1−1
@@ -1944,7 +1944,7 @@ static int nfp_net_rx(struct nfp_net_rx_ring *rx_ring, int budget) · 1943 unmodified lines
19441944 xdp_prog, act);
19451945 continue;
19461946 default:
1947− bpf_warn_invalid_xdp_action(act);
1947+ bpf_warn_invalid_xdp_action(dp->netdev, xdp_prog, act);
19481948 fallthrough;
19491949 case XDP_ABORTED:
19501950 trace_xdp_exception(dp->netdev, xdp_prog, act);
drivers/net/ethernet/qlogic/qede/qede_fp.c+1−1
@@ -1153,7 +1153,7 @@ static bool qede_rx_xdp(struct qede_dev *edev, · 1152 unmodified lines
11531153 qede_rx_bd_ring_consume(rxq);
11541154 break;
11551155 default:
1156− bpf_warn_invalid_xdp_action(act);
1156+ bpf_warn_invalid_xdp_action(edev->ndev, prog, act);
11571157 fallthrough;
11581158 case XDP_ABORTED:
11591159 trace_xdp_exception(edev->ndev, prog, act);
drivers/net/ethernet/sfc/efx.c+1−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 * Copyright 2005-2013 Solarflare Communications Inc.
66 */
77
8+#include <linux/filter.h>
89 #include <linux/module.h>
910 #include <linux/pci.h>
1011 #include <linux/netdevice.h>
drivers/net/ethernet/sfc/efx_channels.c+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010
1111 #include "net_driver.h"
1212 #include <linux/module.h>
13+#include <linux/filter.h>
1314 #include "efx_channels.h"
1415 #include "efx.h"
1516 #include "efx_common.h"
drivers/net/ethernet/sfc/efx_common.c+1−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 */
1010
1111 #include "net_driver.h"
12+#include <linux/filter.h>
1213 #include <linux/module.h>
1314 #include <linux/netdevice.h>
1415 #include <net/gre.h>
drivers/net/ethernet/sfc/rx.c+1−1
@@ -338,7 +338,7 @@ static bool efx_do_xdp(struct efx_nic *efx, struct efx_channel *channel, · 337 unmodified lines
338338 break;
339339
340340 default:
341− bpf_warn_invalid_xdp_action(xdp_act);
341+ bpf_warn_invalid_xdp_action(efx->net_dev, xdp_prog, xdp_act);
342342 efx_free_rx_buffers(rx_queue, rx_buf, 1);
343343 channel->n_rx_xdp_bad_drops++;
344344 trace_xdp_exception(efx->net_dev, xdp_prog, xdp_act);
drivers/net/ethernet/socionext/netsec.c+1−1
@@ -933,7 +933,7 @@ static u32 netsec_run_xdp(struct netsec_priv *priv, struct bpf_prog *prog, · 932 unmodified lines
933933 }
934934 break;
935935 default:
936− bpf_warn_invalid_xdp_action(act);
936+ bpf_warn_invalid_xdp_action(priv->ndev, prog, act);
937937 fallthrough;
938938 case XDP_ABORTED:
939939 trace_xdp_exception(priv->ndev, prog, act);
drivers/net/ethernet/stmicro/stmmac/stmmac.h+1−0
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include <linux/net_tstamp.h>
2323 #include <linux/reset.h>
2424 #include <net/page_pool.h>
25+#include <uapi/linux/bpf.h>
2526
2627 struct stmmac_resources {
2728 void __iomem *addr;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+1−1
@@ -4723,7 +4723,7 @@ static int __stmmac_xdp_run_prog(struct stmmac_priv *priv, · 4722 unmodified lines
47234723 res = STMMAC_XDP_REDIRECT;
47244724 break;
47254725 default:
4726− bpf_warn_invalid_xdp_action(act);
4726+ bpf_warn_invalid_xdp_action(priv->dev, prog, act);
47274727 fallthrough;
47284728 case XDP_ABORTED:
47294729 trace_xdp_exception(priv->dev, prog, act);
drivers/net/ethernet/ti/cpsw_priv.c+1−1
@@ -1362,7 +1362,7 @@ int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp, · 1361 unmodified lines
13621362 xdp_do_flush_map();
13631363 break;
13641364 default:
1365− bpf_warn_invalid_xdp_action(act);
1365+ bpf_warn_invalid_xdp_action(ndev, prog, act);
13661366 fallthrough;
13671367 case XDP_ABORTED:
13681368 trace_xdp_exception(ndev, prog, act);
drivers/net/ethernet/ti/cpsw_priv.h+2−0
@@ -6,6 +6,8 @@ · 5 unmodified lines
66 #ifndef DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_
77 #define DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_
88
9+#include <uapi/linux/bpf.h>
10+
911 #include "davinci_cpdma.h"
1012
1113 #define CPSW_DEBUG (NETIF_MSG_HW | NETIF_MSG_WOL | \
drivers/net/hamradio/hdlcdrv.c+1−0
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 /*****************************************************************************/
3131
3232 #include <linux/capability.h>
33+#include <linux/compat.h>
3334 #include <linux/module.h>
3435 #include <linux/types.h>
3536 #include <linux/net.h>
drivers/net/hamradio/scc.c+1−0
@@ -148,6 +148,7 @@ · 147 unmodified lines
148148
149149 /* ----------------------------------------------------------------------- */
150150
151+#include <linux/compat.h>
151152 #include <linux/module.h>
152153 #include <linux/errno.h>
153154 #include <linux/signal.h>
drivers/net/hyperv/netvsc_bpf.c+1−1
@@ -68,7 +68,7 @@ u32 netvsc_run_xdp(struct net_device *ndev, struct netvsc_channel *nvchan, · 67 unmodified lines
6868 break;
6969
7070 default:
71− bpf_warn_invalid_xdp_action(act);
71+ bpf_warn_invalid_xdp_action(ndev, prog, act);
7272 }
7373
7474 out:
drivers/net/loopback.c+1−0
@@ -44,6 +44,7 @@ · 43 unmodified lines
4444 #include <linux/etherdevice.h>
4545 #include <linux/skbuff.h>
4646 #include <linux/ethtool.h>
47+#include <net/sch_generic.h>
4748 #include <net/sock.h>
4849 #include <net/checksum.h>
4950 #include <linux/if_ether.h> /* For the statistics structure. */
drivers/net/tun.c+1−1
@@ -1602,7 +1602,7 @@ static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog, · 1601 unmodified lines
16021602 case XDP_PASS:
16031603 break;
16041604 default:
1605− bpf_warn_invalid_xdp_action(act);
1605+ bpf_warn_invalid_xdp_action(tun->dev, xdp_prog, act);
16061606 fallthrough;
16071607 case XDP_ABORTED:
16081608 trace_xdp_exception(tun->dev, xdp_prog, act);
drivers/net/veth.c+2−2
@@ -644,7 +644,7 @@ static struct xdp_frame *veth_xdp_rcv_one(struct veth_rq *rq, · 643 unmodified lines
644644 rcu_read_unlock();
645645 goto xdp_xmit;
646646 default:
647− bpf_warn_invalid_xdp_action(act);
647+ bpf_warn_invalid_xdp_action(rq->dev, xdp_prog, act);
648648 fallthrough;
649649 case XDP_ABORTED:
650650 trace_xdp_exception(rq->dev, xdp_prog, act);
@@ -794,7 +794,7 @@ static struct sk_buff *veth_xdp_rcv_skb(struct veth_rq *rq, · 143 unmodified lines
794794 rcu_read_unlock();
795795 goto xdp_xmit;
796796 default:
797− bpf_warn_invalid_xdp_action(act);
797+ bpf_warn_invalid_xdp_action(rq->dev, xdp_prog, act);
798798 fallthrough;
799799 case XDP_ABORTED:
800800 trace_xdp_exception(rq->dev, xdp_prog, act);
drivers/net/virtio_net.c+2−2
@@ -812,7 +812,7 @@ static struct sk_buff *receive_small(struct net_device *dev, · 811 unmodified lines
812812 rcu_read_unlock();
813813 goto xdp_xmit;
814814 default:
815− bpf_warn_invalid_xdp_action(act);
815+ bpf_warn_invalid_xdp_action(vi->dev, xdp_prog, act);
816816 fallthrough;
817817 case XDP_ABORTED:
818818 trace_xdp_exception(vi->dev, xdp_prog, act);
@@ -1022,7 +1022,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, · 203 unmodified lines
10221022 rcu_read_unlock();
10231023 goto xdp_xmit;
10241024 default:
1025− bpf_warn_invalid_xdp_action(act);
1025+ bpf_warn_invalid_xdp_action(vi->dev, xdp_prog, act);
10261026 fallthrough;
10271027 case XDP_ABORTED:
10281028 trace_xdp_exception(vi->dev, xdp_prog, act);
drivers/net/vrf.c+1−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #include <net/addrconf.h>
3535 #include <net/l3mdev.h>
3636 #include <net/fib_rules.h>
37+#include <net/sch_generic.h>
3738 #include <net/netns/generic.h>
3839 #include <net/netfilter/nf_conntrack.h>
3940
drivers/net/xen-netfront.c+1−1
@@ -948,7 +948,7 @@ static u32 xennet_run_xdp(struct netfront_queue *queue, struct page *pdata, · 947 unmodified lines
948948 break;
949949
950950 default:
951− bpf_warn_invalid_xdp_action(act);
951+ bpf_warn_invalid_xdp_action(queue->info->netdev, prog, act);
952952 }
953953
954954 return act;