Home
last modified time | relevance | path

Searched full:xdp (Results 1 – 25 of 357) sorted by relevance

12345678910>>...15

/linux/include/net/
H A Dxdp.h2 /* include/net/xdp.h
17 * DOC: XDP RX-queue information
19 * The XDP RX-queue info (xdp_rxq_info) is associated with the driver
24 * reference to this xdp_rxq_info structure. This provides the XDP
34 * The struct is not directly tied to the XDP prog. A new XDP prog
45 MEM_TYPE_PAGE_ORDER0, /* Orig XDP full page model */
51 /* XDP flags for ndo_xdp_xmit */
75 XDP_FLAGS_HAS_FRAGS = BIT(0), /* non-linear xdp buff */
76 XDP_FLAGS_FRAGS_PF_MEMALLOC = BIT(1), /* xdp page
92 xdp_buff_has_frags(const struct xdp_buff * xdp) xdp_buff_has_frags() argument
97 xdp_buff_set_frags_flag(struct xdp_buff * xdp) xdp_buff_set_frags_flag() argument
102 xdp_buff_clear_frags_flag(struct xdp_buff * xdp) xdp_buff_clear_frags_flag() argument
108 xdp_buff_is_frag_pfmemalloc(const struct xdp_buff * xdp) xdp_buff_is_frag_pfmemalloc() argument
113 xdp_buff_set_frag_pfmemalloc(struct xdp_buff * xdp) xdp_buff_set_frag_pfmemalloc() argument
119 xdp_init_buff(struct xdp_buff * xdp,u32 frame_sz,struct xdp_rxq_info * rxq) xdp_init_buff() argument
127 xdp_prepare_buff(struct xdp_buff * xdp,unsigned char * hard_start,int headroom,int data_len,const bool meta_valid) xdp_prepare_buff() argument
144 xdp_data_hard_end(xdp) global() argument
149 xdp_get_shared_info_from_buff(const struct xdp_buff * xdp) xdp_get_shared_info_from_buff() argument
155 xdp_get_buff_len(const struct xdp_buff * xdp) xdp_get_buff_len() argument
190 __xdp_buff_add_frag(struct xdp_buff * xdp,netmem_ref netmem,u32 offset,u32 size,u32 truesize,bool try_coalesce) __xdp_buff_add_frag() argument
244 xdp_buff_add_frag(struct xdp_buff * xdp,netmem_ref netmem,u32 offset,u32 size,u32 truesize) xdp_buff_add_frag() argument
350 xdp_convert_frame_to_buff(const struct xdp_frame * frame,struct xdp_buff * xdp) xdp_convert_frame_to_buff() argument
361 xdp_update_frame_from_buff(const struct xdp_buff * xdp,struct xdp_frame * xdp_frame) xdp_update_frame_from_buff() argument
391 xdp_convert_buff_to_frame(struct xdp_buff * xdp) xdp_convert_buff_to_frame() argument
498 xdp_set_data_meta_invalid(struct xdp_buff * xdp) xdp_set_data_meta_invalid() argument
504 xdp_data_meta_unsupported(const struct xdp_buff * xdp) xdp_data_meta_unsupported() argument
647 bpf_prog_run_xdp(const struct bpf_prog * prog,struct xdp_buff * xdp) bpf_prog_run_xdp() argument
[all...]
H A Dxdp_sock_drv.h76 static inline dma_addr_t xsk_buff_xdp_get_dma(struct xdp_buff *xdp) in xsk_buff_xdp_get_dma() argument
78 struct xdp_buff_xsk *xskb = container_of(xdp, struct xdp_buff_xsk, xdp); in xsk_buff_xdp_get_dma()
83 static inline dma_addr_t xsk_buff_xdp_get_frame_dma(struct xdp_buff *xdp) in xsk_buff_xdp_get_frame_dma() argument
85 struct xdp_buff_xsk *xskb = container_of(xdp, struct xdp_buff_xsk, xdp); in xsk_buff_xdp_get_frame_dma()
101 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch() argument
103 return xp_alloc_batch(pool, xdp, max); in xsk_buff_alloc_batch()
111 static inline void xsk_buff_free(struct xdp_buff *xdp) in xsk_buff_free() argument
113 struct xdp_buff_xsk *xskb = container_of(xdp, struct xdp_buff_xsk, xdp); in xsk_buff_free()
117 if (likely(!xdp_buff_has_frags(xdp))) in xsk_buff_free()
125 xdp_get_shared_info_from_buff(xdp)->nr_frags = 0; in xsk_buff_free()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dxdp_features.c65 xdp_process_echo_packet(struct xdp_md *xdp, bool dut) in xdp_process_echo_packet() argument
67 void *data_end = (void *)(long)xdp->data_end; in xdp_process_echo_packet()
68 void *data = (void *)(long)xdp->data; in xdp_process_echo_packet()
135 xdp_update_stats(struct xdp_md *xdp, bool tx, bool dut) in xdp_update_stats() argument
139 if (xdp_process_echo_packet(xdp, tx)) in xdp_update_stats()
155 SEC("xdp")
156 int xdp_tester_check_tx(struct xdp_md *xdp) in xdp_tester_check_tx() argument
158 xdp_update_stats(xdp, true, false); in xdp_tester_check_tx()
163 SEC("xdp")
164 int xdp_tester_check_rx(struct xdp_md *xdp) in xdp_tester_check_rx() argument
[all …]
H A Dverifier_xdp_direct_packet_access.c8 SEC("xdp")
9 __description("XDP pkt read, pkt_end mangling, bad access 1")
29 SEC("xdp")
30 __description("XDP pkt read, pkt_end mangling, bad access 2")
50 SEC("xdp")
51 __description("XDP pkt read, pkt_data' > pkt_end, corner case, good access")
70 SEC("xdp")
71 __description("XDP pkt read, pkt_data' > pkt_end, bad access 1")
91 SEC("xdp")
92 __description("XDP pkt read, pkt_data' > pkt_end, bad access 2")
[all …]
H A Dtest_xdp_do_redirect.c11 * @MARK_IN: frame is being processed by the input XDP prog.
28 SEC("xdp")
29 int xdp_redirect(struct xdp_md *xdp) in xdp_redirect() argument
31 __u32 *metadata = (void *)(long)xdp->data_meta; in xdp_redirect()
32 void *data_end = (void *)(long)xdp->data_end; in xdp_redirect()
33 void *data = (void *)(long)xdp->data; in xdp_redirect()
41 if (xdp->ingress_ifindex != (__u32)ifindex_in) in xdp_redirect()
55 if (bpf_xdp_adjust_meta(xdp, sizeof(__u64))) in xdp_redirect()
85 SEC("xdp")
86 int xdp_count_pkts(struct xdp_md *xdp) in xdp_count_pkts() argument
[all …]
H A Dxsk_xdp_progs.c22 SEC("xdp.frags") int xsk_def_prog(struct xdp_md *xdp) in xsk_def_prog()
27 SEC("xdp.frags") int xsk_xdp_drop(struct xdp_md *xdp) in xsk_xdp_drop()
36 SEC("xdp.frags") int xsk_xdp_populate_metadata(struct xdp_md *xdp) in xsk_xdp_populate_metadata()
43 err = bpf_xdp_adjust_meta(xdp, -(int)sizeof(struct xdp_info)); in xsk_xdp_populate_metadata()
47 data = (void *)(long)xdp->data; in xsk_xdp_populate_metadata()
48 data_meta = (void *)(long)xdp->data_meta; in xsk_xdp_populate_metadata()
59 SEC("xdp") in in xsk_xdp_shared_umem()
19 xsk_def_prog(struct xdp_md * xdp) xsk_def_prog() argument
24 xsk_xdp_drop(struct xdp_md * xdp) xsk_xdp_drop() argument
33 xsk_xdp_populate_metadata(struct xdp_md * xdp) xsk_xdp_populate_metadata() argument
56 xsk_xdp_shared_umem(struct xdp_md * xdp) xsk_xdp_shared_umem() argument
[all...]
H A Dtest_xdp.c79 static __always_inline int handle_ipv4(struct xdp_md *xdp) in handle_ipv4() argument
81 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4()
82 void *data = (void *)(long)xdp->data; in handle_ipv4()
112 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct iphdr))) in handle_ipv4()
115 data = (void *)(long)xdp->data; in handle_ipv4()
116 data_end = (void *)(long)xdp->data_end; in handle_ipv4()
152 static __always_inline int handle_ipv6(struct xdp_md *xdp) in handle_ipv6() argument
154 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6()
155 void *data = (void *)(long)xdp->data; in handle_ipv6()
182 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct ipv6hdr))) in handle_ipv6()
[all …]
H A Dtest_xdp_loop.c75 static __always_inline int handle_ipv4(struct xdp_md *xdp) in handle_ipv4() argument
77 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4()
78 void *data = (void *)(long)xdp->data; in handle_ipv4()
108 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct iphdr))) in handle_ipv4()
111 data = (void *)(long)xdp->data; in handle_ipv4()
112 data_end = (void *)(long)xdp->data_end; in handle_ipv4()
148 static __always_inline int handle_ipv6(struct xdp_md *xdp) in handle_ipv6() argument
150 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6()
151 void *data = (void *)(long)xdp->data; in handle_ipv6()
178 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct ipv6hdr))) in handle_ipv6()
[all …]
/linux/Documentation/bpf/
H A Dredirect.rst25 :doc: xdp redirect
29 those that do, not all of them support non-linear frames. Non-linear xdp
41 The following bpftrace command can be used to capture and count all XDP tracepoints:
45 sudo bpftrace -e 'tracepoint:xdp:* { @cnt[probe] = count(); }'
49 @cnt[tracepoint:xdp:mem_connect]: 18
50 @cnt[tracepoint:xdp:mem_disconnect]: 18
51 @cnt[tracepoint:xdp:xdp_exception]: 19605
52 @cnt[tracepoint:xdp:xdp_devmap_xmit]: 1393604
53 @cnt[tracepoint:xdp:xdp_redirect]: 22292200
56 The various xdp tracepoints can be found in ``source/include/trace/events/xdp.h``
[all …]
H A Dbpf_prog_run.rst49 returned to userspace. A separate mode for live execution of XDP programs is
52 Running XDP programs in "live frame mode"
55 The ``BPF_PROG_RUN`` command has a separate mode for running live XDP programs,
56 which can be used to execute XDP programs in a way where packets will actually
57 be processed by the kernel after the execution of the XDP program as if they
59 ``BPF_F_TEST_XDP_LIVE_FRAMES`` flag when supplying an XDP program to
63 XDP program many times (suitable for, e.g., running as a traffic generator),
67 - When executing an XDP program in live frame mode, the result of the execution
77 via the same trace points as for regular XDP programs.
80 the regular (non-live) mode. The XDP program will be executed as though the
[all …]
/linux/net/core/
H A Dxdp.c2 /* net/core/xdp.c
21 #include <net/xdp.h>
23 #include <trace/events/xdp.h>
372 * xdp_reg_page_pool - register &page_pool as a memory provider for XDP
375 * Can be used to register pools manually without connecting to any XDP RxQ
376 * info, so that the XDP layer will be aware of them. Then, they can be
409 * @xdp_rxq: XDP RxQ info to attach the pool to
427 /* XDP RX runs under NAPI protection, and in different delivery error
434 bool napi_direct, struct xdp_buff *xdp) in __xdp_return()
455 xsk_buff_free(xdp); in __xdp_return()
433 __xdp_return(netmem_ref netmem,enum xdp_mem_type mem_type,bool napi_direct,struct xdp_buff * xdp) __xdp_return() argument
542 xdp_return_frag(netmem_ref netmem,const struct xdp_buff * xdp) xdp_return_frag() argument
548 xdp_return_buff(struct xdp_buff * xdp) xdp_return_buff() argument
575 xdp_convert_zc_to_xdp_frame(struct xdp_buff * xdp) xdp_convert_zc_to_xdp_frame() argument
632 xdp_build_skb_from_buff(const struct xdp_buff * xdp) xdp_build_skb_from_buff() argument
688 xdp_copy_frags_from_zc(struct sk_buff * skb,const struct xdp_buff * xdp,struct page_pool * pp) xdp_copy_frags_from_zc() argument
738 xdp_build_skb_from_zc(struct xdp_buff * xdp) xdp_build_skb_from_zc() argument
[all...]
/linux/Documentation/networking/
H A Dxdp-rx-metadata.rst4 XDP RX Metadata
7 This document describes how an eXpress Data Path (XDP) program can access
14 XDP has access to a set of kfuncs to manipulate the metadata in an XDP frame.
16 implement these kfuncs. The set of kfuncs is declared in ``include/net/xdp.h``
22 .. kernel-doc:: net/core/xdp.c
25 .. kernel-doc:: net/core/xdp.c
28 .. kernel-doc:: net/core/xdp.c
31 An XDP program can use these kfuncs to read the metadata into stack
33 consumers, an XDP program can store it into the metadata area carried
42 Within an XDP frame, the metadata layout (accessed via ``xdp_buff``) is
[all …]
/linux/drivers/net/vmxnet3/
H A Dvmxnet3_xdp.c48 NL_SET_ERR_MSG_FMT_MOD(extack, "MTU %u too large for XDP", in vmxnet3_xdp_set()
54 NL_SET_ERR_MSG_MOD(extack, "LRO is not supported with XDP"); in vmxnet3_xdp_set()
86 "failed to re-create rx queues for XDP."); in vmxnet3_xdp_set()
92 "failed to activate device for XDP."); in vmxnet3_xdp_set()
100 /* This is the main xdp call used by kernel to set/unset eBPF program. */
152 } else { /* XDP buffer from page pool */ in vmxnet3_xdp_xmit_frame()
261 vmxnet3_run_xdp(struct vmxnet3_rx_queue *rq, struct xdp_buff *xdp, in vmxnet3_run_xdp() argument
270 act = bpf_prog_run_xdp(prog, xdp); in vmxnet3_run_xdp()
271 page = virt_to_page(xdp->data_hard_start); in vmxnet3_run_xdp()
277 err = xdp_do_redirect(rq->adapter->netdev, xdp, prog); in vmxnet3_run_xdp()
[all …]
/linux/drivers/net/ethernet/intel/ice/
H A Dice_xsk.c7 #include <net/xdp.h>
341 * ice_realloc_zc_buf - reallocate XDP ZC queue pairs
346 * XDP requires more memory, than rx_buf provides.
427 * @xdp: SW ring of xdp_buff that will hold the buffers
438 static u16 ice_fill_rx_descs(struct xsk_buff_pool *pool, struct xdp_buff **xdp, in ice_fill_rx_descs() argument
445 buffs = xsk_buff_alloc_batch(pool, xdp, count); in ice_fill_rx_descs()
447 dma = xsk_buff_xdp_get_dma(*xdp); in ice_fill_rx_descs()
454 ice_xdp_meta_set_desc(*xdp, rx_desc); in ice_fill_rx_descs()
457 xdp++; in ice_fill_rx_descs()
482 struct xdp_buff **xdp; in __ice_alloc_rx_bufs_zc() local
[all …]
H A Dice_txrx_lib.c264 * ice_clean_xdp_tx_buf - Free and unmap XDP Tx buffer
267 * @bq: XDP bulk flush struct
290 * ice_clean_xdp_irq - Reclaim resources after transmit completes on XDP ring
291 * @xdp_ring: XDP ring to clean
363 * __ice_xmit_xdp_ring - submit frame to XDP ring for transmission
364 * @xdp: XDP buffer to be placed onto Tx descriptors
365 * @xdp_ring: XDP ring for transmission
368 int __ice_xmit_xdp_ring(struct xdp_buff *xdp, struct ice_tx_ring *xdp_ring, in __ice_xmit_xdp_ring() argument
372 u32 size = xdp->data_end - xdp->data; in __ice_xmit_xdp_ring()
379 void *data = xdp->data; in __ice_xmit_xdp_ring()
[all …]
/linux/drivers/net/hyperv/
H A Dnetvsc_bpf.c17 #include <net/xdp.h>
25 struct xdp_buff *xdp) in netvsc_run_xdp() argument
35 xdp->data_hard_start = NULL; in netvsc_run_xdp()
56 xdp_init_buff(xdp, PAGE_SIZE, &nvchan->xdp_rxq); in netvsc_run_xdp()
57 xdp_prepare_buff(xdp, page_address(page), NETVSC_XDP_HDRM, len, false); in netvsc_run_xdp()
59 memcpy(xdp->data, data, len); in netvsc_run_xdp()
61 act = bpf_prog_run_xdp(prog, xdp); in netvsc_run_xdp()
73 if (!xdp_do_redirect(ndev, xdp, prog)) { in netvsc_run_xdp()
107 xdp->data_hard_start = NULL; in netvsc_run_xdp()
138 netdev_err(dev, "XDP: mtu:%u too large, buf_max:%u\n", in netvsc_xdp_set()
[all …]
/linux/drivers/net/ethernet/microchip/lan966x/
H A Dlan966x_xdp.c9 static int lan966x_xdp_setup(struct net_device *dev, struct netdev_bpf *xdp) in lan966x_xdp_setup() argument
18 NL_SET_ERR_MSG_MOD(xdp->extack, in lan966x_xdp_setup()
19 "Allow to set xdp only when using fdma"); in lan966x_xdp_setup()
24 old_prog = xchg(&port->xdp_prog, xdp->prog); in lan966x_xdp_setup()
43 int lan966x_xdp(struct net_device *dev, struct netdev_bpf *xdp) in lan966x_xdp() argument
45 switch (xdp->command) { in lan966x_xdp()
47 return lan966x_xdp_setup(dev, xdp); in lan966x_xdp()
79 struct xdp_buff xdp; in lan966x_xdp_run() local
82 xdp_init_buff(&xdp, PAGE_SIZE << lan966x->rx.page_order, in lan966x_xdp_run()
84 xdp_prepare_buff(&xdp, page_address(page), in lan966x_xdp_run()
[all …]
/linux/samples/bpf/
H A Dxdp_tx_iptunnel_kern.c77 static __always_inline int handle_ipv4(struct xdp_md *xdp) in handle_ipv4() argument
79 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4()
80 void *data = (void *)(long)xdp->data; in handle_ipv4()
112 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct iphdr))) in handle_ipv4()
115 data = (void *)(long)xdp->data; in handle_ipv4()
116 data_end = (void *)(long)xdp->data_end; in handle_ipv4()
152 static __always_inline int handle_ipv6(struct xdp_md *xdp) in handle_ipv6() argument
154 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6()
155 void *data = (void *)(long)xdp->data; in handle_ipv6()
184 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct ipv6hdr))) in handle_ipv6()
[all …]
H A Dxdp2skb_meta_kern.c4 * Example howto transfer info from XDP to SKB, e.g. skb->mark
6 * This uses the XDP data_meta infrastructure, and is a cooperation
7 * between two bpf-programs (1) XDP and (2) clsact at TC-ingress hook.
18 * This struct is stored in the XDP 'data_meta' area, which is located
21 * channel. XDP adjust/increase the area via a bpf-helper, and TC use
69 /* Check XDP gave us some data_meta */ in _tc_mark()
77 ctx->mark = meta->mark; /* Transfer XDP-mark to SKB-mark */ in _tc_mark()
92 # XDP via IP command:
93 ip link set dev $DEV xdp off
94 ip link set dev $DEV xdp obj $FILE sec xdp_mark
[all …]
H A Dxdp2skb_meta.sh7 # eBPF programs, both for XDP and clsbpf. Shell script function
12 # that need to collaborate between XDP and TC hooks. Thus, it is
26 echo " --flush : Cleanup flush TC and XDP progs"
27 echo " --list : (\$LIST) List TC and XDP progs"
155 info "Listing current XDP device($device) setting"
156 call_ip link show dev $device | grep --color=auto xdp
172 info "Flush XDP on device: $device"
173 call_ip link set dev $device xdp off
199 # Remove XDP prog in-case it's already loaded
200 # TODO: Need ip-link option to override/replace existing XDP prog
[all …]
/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-net.rst32 | *ATTACH_TYPE* := { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** | **tcx_ingress** | **t…
39 Currently, device driver xdp attachments, tcx, netkit and old-style tc
52 The current output will start with all xdp program attachments, followed by
54 flow_dissector and finally netfilter programs. Both xdp programs and
64 command used with **overwrite** option. Currently, only XDP-related modes
68 **xdp** - try native XDP and fallback to generic XDP if NIC driver does not support it;
69 …**xdpgeneric** - Generic XDP. runs at generic XDP hook when packet already enters receive path as …
70 **xdpdrv** - Native XDP. runs earliest point in driver's receive path;
71 **xdpoffload** - Offload XDP. runs directly on NIC on each packet reception;
78 for attach must be specified. Currently, only XDP-related modes are
[all …]
/linux/drivers/net/ethernet/intel/i40e/
H A Di40e_xsk.c57 * XDP requires more memory, than rx_buf provides.
191 * i40e_run_xdp_zc - Executes an XDP program on an xdp_buff
193 * @xdp: xdp_buff used as input to the XDP program
194 * @xdp_prog: XDP program to run
198 static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp, in i40e_run_xdp_zc() argument
205 act = bpf_prog_run_xdp(xdp_prog, xdp); in i40e_run_xdp_zc()
208 err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog); in i40e_run_xdp_zc()
223 result = i40e_xmit_xdp_tx_ring(xdp, xdp_ring); in i40e_run_xdp_zc()
245 struct xdp_buff **xdp; in i40e_alloc_rx_buffers_zc() local
250 xdp = i40e_rx_bi(rx_ring, ntu); in i40e_alloc_rx_buffers_zc()
[all …]
/linux/net/bpf/
H A Dtest_run.c25 #include <net/xdp.h>
136 struct xdp_test_data *xdp = arg; in xdp_test_run_init_page() local
141 orig_ctx = xdp->orig_ctx; in xdp_test_run_init_page()
151 xdp_init_buff(new_ctx, TEST_XDP_FRAME_SIZE, &xdp->rxq); in xdp_test_run_init_page()
161 static int xdp_test_run_setup(struct xdp_test_data *xdp, struct xdp_buff *orig_ctx) in xdp_test_run_setup() argument
168 .pool_size = xdp->batch_size, in xdp_test_run_setup()
171 .init_arg = xdp, in xdp_test_run_setup()
174 xdp->frames = kvmalloc_array(xdp->batch_size, sizeof(void *), GFP_KERNEL); in xdp_test_run_setup()
175 if (!xdp in xdp_test_run_setup()
215 xdp_test_run_teardown(struct xdp_test_data * xdp) xdp_test_run_teardown() argument
285 xdp_test_run_batch(struct xdp_test_data * xdp,struct bpf_prog * prog,u32 repeat) xdp_test_run_batch() argument
376 struct xdp_test_data xdp = { .batch_size = batch_size }; bpf_test_run_xdp_live() local
401 bpf_test_run(struct bpf_prog * prog,void * ctx,u32 repeat,u32 * retval,u32 * time,bool xdp) bpf_test_run() argument
1141 xdp_convert_md_to_buff(struct xdp_md * xdp_md,struct xdp_buff * xdp) xdp_convert_md_to_buff() argument
1187 xdp_convert_buff_to_md(struct xdp_buff * xdp,struct xdp_md * xdp_md) xdp_convert_buff_to_md() argument
1211 struct xdp_buff xdp = {}; bpf_prog_test_run_xdp() local
[all...]
/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_net_xsk.c9 #include <trace/events/xdp.h>
18 struct xdp_buff *xdp) in nfp_net_xsk_rx_bufs_stash() argument
27 rx_ring->xsk_rxbufs[idx].xdp = xdp; in nfp_net_xsk_rx_bufs_stash()
29 xsk_buff_xdp_get_frame_dma(xdp) + headroom; in nfp_net_xsk_rx_bufs_stash()
35 rxbuf->xdp = NULL; in nfp_net_xsk_rx_unstash()
40 if (rxbuf->xdp) in nfp_net_xsk_rx_free()
41 xsk_buff_free(rxbuf->xdp); in nfp_net_xsk_rx_free()
62 struct xdp_buff *xdp; in nfp_net_xsk_rx_ring_fill_freelist() local
67 xdp = xsk_buff_alloc(pool); in nfp_net_xsk_rx_ring_fill_freelist()
68 if (!xdp) in nfp_net_xsk_rx_ring_fill_freelist()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/
H A Drx.c5 #include "en/xdp.h"
11 static struct mlx5e_xdp_buff *xsk_buff_to_mxbuf(struct xdp_buff *xdp) in xsk_buff_to_mxbuf() argument
16 return (struct mlx5e_xdp_buff *)xdp; in xsk_buff_to_mxbuf()
225 static struct sk_buff *mlx5e_xsk_construct_skb(struct mlx5e_rq *rq, struct xdp_buff *xdp) in mlx5e_xsk_construct_skb() argument
227 u32 totallen = xdp->data_end - xdp->data_meta; in mlx5e_xsk_construct_skb()
228 u32 metalen = xdp->data - xdp->data_meta; in mlx5e_xsk_construct_skb()
237 skb_put_data(skb, xdp->data_meta, totallen); in mlx5e_xsk_construct_skb()
263 /* head_offset is not used in this function, because xdp->data and the in mlx5e_xsk_skb_from_cqe_mpwrq_linear()
272 xsk_buff_set_size(&mxbuf->xdp, cqe_bcnt); in mlx5e_xsk_skb_from_cqe_mpwrq_linear()
273 xsk_buff_dma_sync_for_cpu(&mxbuf->xdp); in mlx5e_xsk_skb_from_cqe_mpwrq_linear()
[all …]

12345678910>>...15