| /linux/include/net/ |
| H A D | xdp_sock_drv.h | 85 static inline dma_addr_t xsk_buff_xdp_get_dma(struct xdp_buff *xdp) in xsk_buff_xdp_get_dma() 92 static inline dma_addr_t xsk_buff_xdp_get_frame_dma(struct xdp_buff *xdp) in xsk_buff_xdp_get_frame_dma() 99 static inline struct xdp_buff *xsk_buff_alloc(struct xsk_buff_pool *pool) in xsk_buff_alloc() 110 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch() 120 static inline void xsk_buff_free(struct xdp_buff *xdp) in xsk_buff_free() 139 static inline bool xsk_buff_add_frag(struct xdp_buff *head, in xsk_buff_add_frag() 140 struct xdp_buff *xdp) in xsk_buff_add_frag() 156 static inline struct xdp_buff *xsk_buff_get_frag(const struct xdp_buff *first) in xsk_buff_get_frag() 159 struct xdp_buff *ret = NULL; in xsk_buff_get_frag() 172 static inline void xsk_buff_del_frag(struct xdp_buff *xdp) in xsk_buff_del_frag() [all …]
|
| H A D | xdp_sock.h | 21 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()
|
| H A D | xsk_buff_pool.h | 26 struct xdp_buff xdp; 141 struct xdp_buff *xp_alloc(struct xsk_buff_pool *pool); 142 u32 xp_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max);
|
| /linux/drivers/net/ethernet/freescale/dpaa2/ |
| H A D | dpaa2-xsk.c | 39 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 D | xdp-rx-metadata.rst | 42 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 D | test_xdp_bpf2bpf.c | 23 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 D | type_cast.c | 26 struct xdp_buff *kctx = bpf_cast_to_kern_ctx(ctx); in md_xdp()
|
| /linux/drivers/net/ethernet/intel/i40e/ |
| H A D | i40e_xsk.c | 16 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 D | i40e_trace.h | 165 struct xdp_buff *xdp), 193 struct xdp_buff *xdp), 201 struct xdp_buff *xdp),
|
| H A D | i40e_txrx.h | 336 struct xdp_buff **rx_bi_zc; 348 struct xdp_buff xdp;
|
| H A D | i40e_txrx_common.h | 9 int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring);
|
| /linux/drivers/net/ethernet/intel/ice/ |
| H A D | ice_xsk.c | 17 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/drivers/net/ethernet/broadcom/bnxt/ |
| H A D | bnxt_xdp.c | 29 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() 463 struct bnxt_rx_ring_info *rxr, struct xdp_buff *xdp) in bnxt_xdp_build_skb()
|
| /linux/drivers/net/ethernet/intel/igb/ |
| H A D | igb_xsk.c | 176 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/net/xfrm/ |
| H A D | xfrm_state_bpf.c | 67 struct xdp_buff *xdp = (struct xdp_buff *)ctx; in bpf_xdp_get_xfrm_state()
|
| /linux/net/netfilter/ |
| H A D | nf_flow_table_bpf.c | 62 struct xdp_buff *xdp = (struct xdp_buff *)ctx; in bpf_xdp_flow_lookup()
|
| H A D | nf_conntrack_bpf.c | 295 struct xdp_buff *ctx = (struct xdp_buff *)xdp_ctx; in bpf_xdp_ct_alloc() 328 struct xdp_buff *ctx = (struct xdp_buff *)xdp_ctx; in bpf_xdp_ct_lookup()
|
| /linux/net/core/ |
| H A D | xdp.c | 434 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 D | filter.c | 3957 BPF_CALL_1(bpf_xdp_get_buff_len, struct xdp_buff*, xdp) in BPF_CALL_1() argument 3969 BTF_ID_LIST_SINGLE(bpf_xdp_get_buff_len_bpf_ids, struct, xdp_buff) 3978 static unsigned long xdp_get_metalen(const struct xdp_buff *xdp) in xdp_get_metalen() 3984 BPF_CALL_2(bpf_xdp_adjust_head, struct xdp_buff *, xdp, int, offset) in BPF_CALL_2() argument 4012 void bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, in bpf_xdp_copy_buf() 4059 void *bpf_xdp_pointer(struct xdp_buff *xdp, u32 offset, u32 len) in bpf_xdp_pointer() 4091 BPF_CALL_4(bpf_xdp_load_bytes, struct xdp_buff *, xdp, u32, offset, in BPF_CALL_4() argument 4118 int __bpf_xdp_load_bytes(struct xdp_buff *xdp, u32 offset, void *buf, u32 len) in __bpf_xdp_load_bytes() 4123 BPF_CALL_4(bpf_xdp_store_bytes, struct xdp_buff *, xdp, u32, offset, in BPF_CALL_4() argument 4150 int __bpf_xdp_store_bytes(struct xdp_buff *xdp, u32 offset, void *buf, u32 len) in __bpf_xdp_store_bytes() [all …]
|
| /linux/drivers/net/vmxnet3/ |
| H A D | vmxnet3_xdp.c | 261 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/drivers/net/ethernet/netronome/nfp/ |
| H A D | nfp_net_xsk.c | 18 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/net/xdp/ |
| H A D | xsk_buff_pool.c | 549 struct xdp_buff *xp_alloc(struct xsk_buff_pool *pool) in xp_alloc() 575 static u32 xp_alloc_new_from_fq(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xp_alloc_new_from_fq() 611 static u32 xp_alloc_reused(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 nb_entries) in xp_alloc_reused() 631 static u32 xp_alloc_slow(struct xsk_buff_pool *pool, struct xdp_buff **xdp, in xp_alloc_slow() 637 struct xdp_buff *buff; in xp_alloc_slow() 649 u32 xp_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xp_alloc_batch()
|
| /linux/drivers/net/ethernet/freescale/enetc/ |
| H A D | enetc.c | 1831 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/net/bpf/ |
| H A D | test_run.c | 91 struct xdp_buff orig_ctx; 92 struct xdp_buff ctx; 101 struct xdp_buff *orig_ctx; 123 struct xdp_buff *new_ctx, *orig_ctx; in xdp_test_run_init_page() 150 static int xdp_test_run_setup(struct xdp_test_data *xdp, struct xdp_buff *orig_ctx) in xdp_test_run_setup() 284 struct xdp_buff *ctx; in xdp_test_run_batch() 361 static int bpf_test_run_xdp_live(struct bpf_prog *prog, struct xdp_buff *ctx, in bpf_test_run_xdp_live() 1208 static int xdp_convert_md_to_buff(struct xdp_md *xdp_md, struct xdp_buff *xdp) in xdp_convert_md_to_buff() 1254 static void xdp_convert_buff_to_md(struct xdp_buff *xdp, struct xdp_md *xdp_md) in xdp_convert_buff_to_md() 1278 struct xdp_buff xdp = {}; in bpf_prog_test_run_xdp()
|
| /linux/drivers/net/ethernet/netronome/nfp/nfd3/ |
| H A D | nfd3.h | 72 struct xdp_buff *xdp;
|