Home
last modified time | relevance | path

Searched refs:xdp_buff (Results 1 – 25 of 76) sorted by relevance

1234

/linux/include/net/
H A Dxdp_sock_drv.h106 static inline dma_addr_t xsk_buff_xdp_get_dma(struct xdp_buff *xdp) in xsk_buff_xdp_get_dma()
113 static inline dma_addr_t xsk_buff_xdp_get_frame_dma(struct xdp_buff *xdp) in xsk_buff_xdp_get_frame_dma()
120 static inline struct xdp_buff *xsk_buff_alloc(struct xsk_buff_pool *pool) in xsk_buff_alloc()
131 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch()
141 static inline void xsk_buff_free(struct xdp_buff *xdp) in xsk_buff_free()
160 static inline bool xsk_buff_add_frag(struct xdp_buff *head, in xsk_buff_add_frag()
161 struct xdp_buff *xdp) in xsk_buff_add_frag()
177 static inline struct xdp_buff *xsk_buff_get_frag(const struct xdp_buff *first) in xsk_buff_get_frag()
180 struct xdp_buff *ret = NULL; in xsk_buff_get_frag()
193 static inline void xsk_buff_del_frag(struct xdp_buff *xdp) in xsk_buff_del_frag()
[all …]
H A Dxdp_sock.h21 struct xdp_buff;
125 int xsk_generic_rcv(struct xdp_sock *xs, struct xdp_buff *xdp);
126 int __xsk_map_redirect(struct xdp_sock *xs, struct xdp_buff *xdp);
208 static inline int xsk_generic_rcv(struct xdp_sock *xs, struct xdp_buff *xdp) in xsk_generic_rcv()
213 static inline int __xsk_map_redirect(struct xdp_sock *xs, struct xdp_buff *xdp) in __xsk_map_redirect()
/linux/drivers/net/ethernet/freescale/dpaa2/
H A Ddpaa2-xsk.c39 struct xdp_buff *xdp_buff; in dpaa2_xsk_run_xdp() local
50 xdp_buff = swa->xsk.xdp_buff; in dpaa2_xsk_run_xdp()
52 xdp_buff->data_hard_start = vaddr; in dpaa2_xsk_run_xdp()
53 xdp_buff->data = vaddr + dpaa2_fd_get_offset(fd); in dpaa2_xsk_run_xdp()
54 xdp_buff->data_end = xdp_buff->data + dpaa2_fd_get_len(fd); in dpaa2_xsk_run_xdp()
55 xdp_set_data_meta_invalid(xdp_buff); in dpaa2_xsk_run_xdp()
56 xdp_buff->rxq = &ch->xdp_rxq; in dpaa2_xsk_run_xdp()
58 xsk_buff_dma_sync_for_cpu(xdp_buff); in dpaa2_xsk_run_xdp()
59 xdp_act = bpf_prog_run_xdp(xdp_prog, xdp_buff); in dpaa2_xsk_run_xdp()
62 dpaa2_fd_set_offset(fd, xdp_buff->data - vaddr); in dpaa2_xsk_run_xdp()
[all …]
/linux/Documentation/networking/
H A Dxdp-rx-metadata.rst42 Within an XDP frame, the metadata layout (accessed via ``xdp_buff``) is
50 xdp_buff->data_meta xdp_buff->data
83 into the kernel. The kernel creates the ``skb`` out of the ``xdp_buff``
85 the descriptors and populate ``skb`` metadata when doing this ``xdp_buff->skb``
130 ``xdp_buff->data_meta`` is pointing to ``xdp_buff->data`` before presenting the
138 |<-- bpf_xdp_adjust_meta(xdp_buff, -METADATA_SIZE) --|
139 new xdp_buff->data_meta old xdp_buff->data_meta
141 | xdp_buff->data
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_xdp_bpf2bpf.c23 struct xdp_buff { struct
45 int BPF_PROG(trace_on_entry, struct xdp_buff *xdp) in BPF_PROG() argument
62 int BPF_PROG(trace_on_exit, struct xdp_buff *xdp, int ret) in BPF_PROG()
H A Dtype_cast.c26 struct xdp_buff *kctx = bpf_cast_to_kern_ctx(ctx); in md_xdp()
/linux/drivers/net/ethernet/intel/i40e/
H A Di40e_xsk.c16 static struct xdp_buff **i40e_rx_bi(struct i40e_ring *rx_ring, u32 idx) in i40e_rx_bi()
198 static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp, in i40e_run_xdp_zc()
245 struct xdp_buff **xdp; in i40e_alloc_rx_buffers_zc()
290 struct xdp_buff *xdp) in i40e_construct_skb_zc()
345 struct xdp_buff *xdp_buff, in i40e_handle_xdp_result_zc() argument
355 *rx_bytes = xdp_get_buff_len(xdp_buff); in i40e_handle_xdp_result_zc()
366 xsk_buff_free(xdp_buff); in i40e_handle_xdp_result_zc()
375 skb = i40e_construct_skb_zc(rx_ring, xdp_buff); in i40e_handle_xdp_result_zc()
412 struct xdp_buff *first = NULL; in i40e_clean_rx_irq_zc()
430 struct xdp_buff *bi; in i40e_clean_rx_irq_zc()
[all …]
H A Di40e_trace.h165 struct xdp_buff *xdp),
193 struct xdp_buff *xdp),
201 struct xdp_buff *xdp),
H A Di40e_txrx_common.h9 int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring);
H A Di40e_txrx.h336 struct xdp_buff **rx_bi_zc;
348 struct xdp_buff xdp;
/linux/drivers/net/ethernet/intel/ice/
H A Dice_xsk.c17 static struct xdp_buff **ice_xdp_buf(struct ice_rx_ring *rx_ring, u32 idx) in ice_xdp_buf()
260 static u16 ice_fill_rx_descs(struct xsk_buff_pool *pool, struct xdp_buff **xdp, in ice_fill_rx_descs()
299 struct xdp_buff **xdp; in __ice_alloc_rx_bufs_zc()
432 static int ice_xmit_xdp_tx_zc(struct xdp_buff *xdp, in ice_xmit_xdp_tx_zc()
441 struct xdp_buff *head; in ice_xmit_xdp_tx_zc()
515 ice_run_xdp_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp, in ice_run_xdp_zc()
571 struct xdp_buff *first = (struct xdp_buff *)rx_ring->xsk; in ice_clean_rx_irq_zc()
591 struct xdp_buff *xdp; in ice_clean_rx_irq_zc()
906 struct xdp_buff *xdp = *ice_xdp_buf(rx_ring, ntc); in ice_xsk_clean_rx_ring()
/linux/net/xfrm/
H A Dxfrm_state_bpf.c67 struct xdp_buff *xdp = (struct xdp_buff *)ctx; in bpf_xdp_get_xfrm_state()
/linux/drivers/net/ethernet/intel/igb/
H A Digb_xsk.c176 static u16 igb_fill_rx_descs(struct xsk_buff_pool *pool, struct xdp_buff **xdp, in igb_fill_rx_descs()
207 struct xdp_buff **xdp; in igb_alloc_rx_buffers_zc()
256 struct xdp_buff *xdp = rx_ring->rx_buffer_info_zc[ntc]; in igb_clean_rx_ring_zc()
266 struct xdp_buff *xdp, in igb_construct_skb_zc()
295 struct xdp_buff *xdp, struct xsk_buff_pool *xsk_pool, in igb_run_xdp_zc()
360 struct xdp_buff *xdp; in igb_clean_rx_irq_zc()
/linux/drivers/net/ethernet/broadcom/bnxt/
H A Dbnxt_xdp.c29 struct xdp_buff *xdp) in bnxt_xmit_bd()
97 struct xdp_buff *xdp) in __bnxt_xmit_xdp()
184 struct xdp_buff *xdp) in bnxt_xdp_buff_init()
204 struct xdp_buff *xdp) in bnxt_xdp_buff_frags_free()
225 struct xdp_buff *xdp, struct page *page, u8 **data_ptr, in bnxt_rx_xdp()
462 struct bnxt_rx_ring_info *rxr, struct xdp_buff *xdp) in bnxt_xdp_build_skb()
/linux/net/core/
H A Dxdp.c434 bool napi_direct, struct xdp_buff *xdp) in __xdp_return()
543 void xdp_return_frag(netmem_ref netmem, const struct xdp_buff *xdp) in xdp_return_frag()
549 void xdp_return_buff(struct xdp_buff *xdp) in xdp_return_buff()
576 struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp) in xdp_convert_zc_to_xdp_frame()
633 struct sk_buff *xdp_build_skb_from_buff(const struct xdp_buff *xdp) in xdp_build_skb_from_buff()
688 const struct xdp_buff *xdp, in xdp_copy_frags_from_zc()
739 struct sk_buff *xdp_build_skb_from_zc(struct xdp_buff *xdp) in xdp_build_skb_from_zc()
H A Dfilter.c3965 BPF_CALL_1(bpf_xdp_get_buff_len, struct xdp_buff*, xdp) in BPF_CALL_1() argument
3977 BTF_ID_LIST_SINGLE(bpf_xdp_get_buff_len_bpf_ids, struct, xdp_buff)
3986 static unsigned long xdp_get_metalen(const struct xdp_buff *xdp) in xdp_get_metalen()
3992 BPF_CALL_2(bpf_xdp_adjust_head, struct xdp_buff *, xdp, int, offset) in BPF_CALL_2() argument
4020 void bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, in bpf_xdp_copy_buf()
4067 void *bpf_xdp_pointer(struct xdp_buff *xdp, u32 offset, u32 len) in bpf_xdp_pointer()
4099 BPF_CALL_4(bpf_xdp_load_bytes, struct xdp_buff *, xdp, u32, offset, in BPF_CALL_4() argument
4126 int __bpf_xdp_load_bytes(struct xdp_buff *xdp, u32 offset, void *buf, u32 len) in __bpf_xdp_load_bytes()
4131 BPF_CALL_4(bpf_xdp_store_bytes, struct xdp_buff *, xdp, u32, offset, in BPF_CALL_4() argument
4158 int __bpf_xdp_store_bytes(struct xdp_buff *xdp, u32 offset, void *buf, u32 len) in __bpf_xdp_store_bytes()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_net_xsk.c18 struct xdp_buff *xdp) in nfp_net_xsk_rx_bufs_stash()
62 struct xdp_buff *xdp; in nfp_net_xsk_rx_ring_fill_freelist()
/linux/drivers/net/vmxnet3/
H A Dvmxnet3_xdp.c261 vmxnet3_run_xdp(struct vmxnet3_rx_queue *rq, struct xdp_buff *xdp, in vmxnet3_run_xdp()
314 const struct xdp_buff *xdp) in vmxnet3_build_skb()
341 struct xdp_buff xdp; in vmxnet3_process_xdp_small()
387 struct xdp_buff xdp; in vmxnet3_process_xdp()
/linux/net/xdp/
H A Dxsk_buff_pool.c578 struct xdp_buff *xp_alloc(struct xsk_buff_pool *pool) in xp_alloc()
604 static u32 xp_alloc_new_from_fq(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xp_alloc_new_from_fq()
640 static u32 xp_alloc_reused(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 nb_entries) in xp_alloc_reused()
660 static u32 xp_alloc_slow(struct xsk_buff_pool *pool, struct xdp_buff **xdp, in xp_alloc_slow()
666 struct xdp_buff *buff; in xp_alloc_slow()
678 u32 xp_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xp_alloc_batch()
H A Dxsk.c218 static int xsk_rcv_zc(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len) in xsk_rcv_zc()
259 static void *xsk_copy_xdp_start(struct xdp_buff *from) in xsk_copy_xdp_start()
295 static int __xsk_rcv(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len) in __xsk_rcv()
301 struct xdp_buff *xsk_xdp; in __xsk_rcv()
414 static int xsk_rcv_check(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len) in xsk_rcv_check()
436 int xsk_generic_rcv(struct xdp_sock *xs, struct xdp_buff *xdp) in xsk_generic_rcv()
452 static int xsk_rcv(struct xdp_sock *xs, struct xdp_buff *xdp) in xsk_rcv()
472 int __xsk_map_redirect(struct xdp_sock *xs, struct xdp_buff *xdp) in __xsk_map_redirect()
/linux/drivers/net/ethernet/freescale/enetc/
H A Denetc.c1831 struct xdp_buff *xdp_buff, u16 size) in enetc_map_rx_buff_to_xdp() argument
1839 xdp_prepare_buff(xdp_buff, hard_start - rx_ring->buffer_offset, in enetc_map_rx_buff_to_xdp()
1844 u16 size, struct xdp_buff *xdp_buff) in enetc_add_rx_buff_to_xdp() argument
1846 struct skb_shared_info *shinfo = xdp_get_shared_info_from_buff(xdp_buff); in enetc_add_rx_buff_to_xdp()
1853 if (!xdp_buff_has_frags(xdp_buff)) { in enetc_add_rx_buff_to_xdp()
1854 xdp_buff_set_frags_flag(xdp_buff); in enetc_add_rx_buff_to_xdp()
1862 xdp_buff_set_frag_pfmemalloc(xdp_buff); in enetc_add_rx_buff_to_xdp()
1873 int *cleaned_cnt, struct xdp_buff *xdp_buff) in enetc_build_xdp_buff() argument
1877 xdp_init_buff(xdp_buff, ENETC_RXB_TRUESIZE, &rx_ring->xdp.rxq); in enetc_build_xdp_buff()
1879 enetc_map_rx_buff_to_xdp(rx_ring, *i, xdp_buff, size); in enetc_build_xdp_buff()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/nfd3/
H A Dnfd3.h72 struct xdp_buff *xdp;
/linux/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac.h92 struct xdp_buff *xdp;
99 struct xdp_buff xdp;
/linux/drivers/net/ethernet/aquantia/atlantic/
H A Daq_ring.c24 struct xdp_buff *xdp) in aq_get_rxpages_xdp()
386 static struct sk_buff *aq_xdp_build_skb(struct xdp_buff *xdp, in aq_xdp_build_skb()
406 struct xdp_buff *xdp, in aq_xdp_run_prog()
487 struct xdp_buff *xdp) in aq_add_rx_fragment()
725 struct xdp_buff xdp; in __aq_ring_xdp_clean()
/linux/drivers/net/ethernet/microchip/lan966x/
H A Dlan966x_xdp.c79 struct xdp_buff xdp; in lan966x_xdp_run()

1234