/linux/tools/lib/bpf/ |
A D | xsk.c | 119 return xsk ? xsk->fd : -EINVAL; in xsk_socket__fd() 817 if (!xsk->rx) in xsk_init_xdp_res() 980 free(xsk); in xsk_destroy_xsk_struct() 994 xsk = calloc(1, sizeof(*xsk)); in xsk_setup_xdp_prog() 995 if (!xsk) in xsk_setup_xdp_prog() 1000 free(xsk); in xsk_setup_xdp_prog() 1033 xsk = calloc(1, sizeof(*xsk)); in xsk_socket__create_shared() 1034 if (!xsk) in xsk_socket__create_shared() 1194 free(xsk); in xsk_socket__create_shared() 1233 if (!xsk) in xsk_socket__delete() [all …]
|
A D | xsk.h | 257 int xsk_socket__fd(const struct xsk_socket *xsk); 277 int xsk_socket__update_xskmap(struct xsk_socket *xsk, int xsks_map_fd); 310 int xsk_socket__create(struct xsk_socket **xsk, 330 void xsk_socket__delete(struct xsk_socket *xsk);
|
A D | Build | 2 netlink.o bpf_prog_linfo.o libbpf_probes.o xsk.o hashmap.o \
|
A D | Makefile | 238 SRC_HDRS := bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h xsk.h \
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/ |
A D | pool.c | 25 if (!xsk->pools) { in mlx5e_xsk_get_pools() 28 if (unlikely(!xsk->pools)) in mlx5e_xsk_get_pools() 32 xsk->refcnt++; in mlx5e_xsk_get_pools() 33 xsk->ever_used = true; in mlx5e_xsk_get_pools() 40 if (!--xsk->refcnt) { in mlx5e_xsk_put_pools() 41 kfree(xsk->pools); in mlx5e_xsk_put_pools() 42 xsk->pools = NULL; in mlx5e_xsk_put_pools() 54 xsk->pools[ix] = pool; in mlx5e_xsk_add_pool() 60 xsk->pools[ix] = NULL; in mlx5e_xsk_remove_pool() 62 mlx5e_xsk_put_pools(xsk); in mlx5e_xsk_remove_pool() [all …]
|
A D | setup.c | 16 struct mlx5e_xsk_param *xsk, in mlx5e_validate_xsk_param() argument 20 if (xsk->chunk_size > PAGE_SIZE || in mlx5e_validate_xsk_param() 21 xsk->chunk_size < MLX5E_MIN_XSK_CHUNK_SIZE) in mlx5e_validate_xsk_param() 25 if (mlx5e_rx_get_min_frag_sz(params, xsk) > xsk->chunk_size) in mlx5e_validate_xsk_param() 33 return mlx5e_rx_mpwqe_is_linear_skb(mdev, params, xsk); in mlx5e_validate_xsk_param() 35 return mlx5e_rx_is_linear_skb(params, xsk); in mlx5e_validate_xsk_param() 41 struct mlx5e_xsk_param *xsk, in mlx5e_build_xsk_cparam() argument 52 struct mlx5e_xsk_param *xsk, in mlx5e_init_xsk_rq() argument 74 err = mlx5e_rq_set_handlers(rq, params, xsk); in mlx5e_init_xsk_rq() 83 struct mlx5e_xsk_param *xsk) in mlx5e_open_xsk_rq() argument [all …]
|
A D | pool.h | 10 struct mlx5e_xsk *xsk, u16 ix) in mlx5e_xsk_get_pool() argument 12 if (!xsk || !xsk->pools) in mlx5e_xsk_get_pool() 18 return xsk->pools[ix]; in mlx5e_xsk_get_pool() 22 void mlx5e_build_xsk_param(struct xsk_buff_pool *pool, struct mlx5e_xsk_param *xsk);
|
A D | rx.h | 25 dma_info->xsk = xsk_buff_alloc(rq->xsk_pool); in mlx5e_xsk_page_alloc_pool() 26 if (!dma_info->xsk) in mlx5e_xsk_page_alloc_pool() 34 dma_info->addr = xsk_buff_xdp_get_frame_dma(dma_info->xsk); in mlx5e_xsk_page_alloc_pool()
|
A D | setup.h | 12 struct mlx5e_xsk_param *xsk, 15 struct mlx5e_xsk_param *xsk, struct xsk_buff_pool *pool,
|
A D | rx.c | 32 struct xdp_buff *xdp = wi->umr.dma_info[page_idx].xsk; in mlx5e_xsk_skb_from_cqe_mpwrq_linear() 85 struct xdp_buff *xdp = wi->di->xsk; in mlx5e_xsk_skb_from_cqe_linear()
|
/linux/samples/bpf/ |
A D | xdpsock_user.c | 149 struct xsk_socket *xsk; member 859 xsk = calloc(1, sizeof(*xsk)); in xsk_configure_socket() 860 if (!xsk) in xsk_configure_socket() 863 xsk->umem = umem; in xsk_configure_socket() 875 ret = xsk_socket__create(&xsk->xsk, opt_if, opt_queue, umem->umem, in xsk_configure_socket() 895 return xsk; in xsk_configure_socket() 1142 kick_tx(xsk); in complete_tx_l2fwd() 1160 recvfrom(xsk_socket__fd(xsk->xsk), NULL, 0, MSG_DONTWAIT, NULL, in complete_tx_l2fwd() 1187 kick_tx(xsk); in complete_tx_only() 1385 kick_tx(xsk); in l2fwd() [all …]
|
A D | xsk_fwd.c | 448 struct xsk_socket *xsk; member 466 if (p->xsk) in port_free() 467 xsk_socket__delete(p->xsk); in port_free() 499 status = xsk_socket__create_shared(&p->xsk, in port_init() 543 .fd = xsk_socket__fd(p->xsk), in port_rx_burst() 570 .fd = xsk_socket__fd(p->xsk), in port_rx_burst() 615 sendto(xsk_socket__fd(p->xsk), NULL, 0, MSG_DONTWAIT, in port_tx_burst() 626 sendto(xsk_socket__fd(p->xsk), NULL, 0, MSG_DONTWAIT, NULL, 0); in port_tx_burst()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
A D | params.c | 12 struct mlx5e_xsk_param *xsk) in mlx5e_rx_is_xdp() argument 14 return params->xdp_prog || xsk; in mlx5e_rx_is_xdp() 18 struct mlx5e_xsk_param *xsk) in mlx5e_get_linear_rq_headroom() argument 22 if (xsk) in mlx5e_get_linear_rq_headroom() 23 return xsk->headroom; in mlx5e_get_linear_rq_headroom() 26 if (mlx5e_rx_is_xdp(params, xsk)) in mlx5e_get_linear_rq_headroom() 35 struct mlx5e_xsk_param *xsk) in mlx5e_rx_get_min_frag_sz() argument 49 if (!xsk) in mlx5e_rx_get_linear_frag_sz() 61 if (mlx5e_rx_is_xdp(params, xsk)) in mlx5e_rx_get_linear_frag_sz() 67 if (xsk) in mlx5e_rx_get_linear_frag_sz() [all …]
|
A D | params.h | 102 struct mlx5e_xsk_param *xsk); 104 struct mlx5e_xsk_param *xsk); 106 struct mlx5e_xsk_param *xsk); 108 struct mlx5e_xsk_param *xsk); 111 struct mlx5e_xsk_param *xsk); 113 struct mlx5e_xsk_param *xsk); 128 struct mlx5e_xsk_param *xsk); 131 struct mlx5e_xsk_param *xsk); 134 struct mlx5e_xsk_param *xsk); 141 struct mlx5e_xsk_param *xsk,
|
A D | xdp.h | 49 int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk);
|
A D | xdp.c | 38 int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk) in mlx5e_xdp_max_mtu() argument 40 int hr = mlx5e_get_linear_rq_headroom(params, xsk); in mlx5e_xdp_max_mtu()
|
/linux/tools/testing/selftests/bpf/ |
A D | xdpxceiver.c | 269 xsk->umem = umem; in xsk_configure_socket() 723 kick_tx(xsk); in complete_pkts() 811 struct xsk_socket_info *xsk = ifobject->xsk; in __send_pkts() local 834 kick_tx(xsk); in __send_pkts() 858 fds.fd = xsk_socket__fd(ifobject->xsk->xsk); in send_pkts() 882 struct xsk_socket *xsk = ifobject->xsk->xsk; in rx_stats_are_valid() local 923 struct xsk_socket *xsk = ifobject->xsk->xsk; in tx_stats_validate() local 988 xsk_socket__delete(ifobj->xsk->xsk); in testapp_cleanup_xsk_res() 1055 fds.fd = xsk_socket__fd(ifobject->xsk->xsk); in worker_testapp_validate_rx() 1138 xsk_socket__delete(ifobj_tx->xsk->xsk); in swap_xsk_resources() [all …]
|
A D | xdpxceiver.h | 101 struct xsk_socket *xsk; member 125 struct xsk_socket_info *xsk; member
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
A D | Makefile | 29 en/reporter_tx.o en/reporter_rx.o en/params.o en/xsk/pool.o \ 30 en/xsk/setup.o en/xsk/rx.o en/xsk/tx.o en/devlink.o en/ptp.o \
|
A D | en.h | 312 struct mlx5e_xsk *xsk; member 456 struct xdp_buff *xsk; member 625 int mlx5e_rq_set_handlers(struct mlx5e_rq *rq, struct mlx5e_params *params, bool xsk); 944 struct mlx5e_xsk xsk; member 1011 struct mlx5e_xsk_param *xsk, int node, 1197 void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16 mtu);
|
A D | en_main.c | 551 struct mlx5e_xsk_param *xsk, in mlx5e_alloc_rq() argument 642 if (xsk) { in mlx5e_alloc_rq() 2204 struct mlx5e_xsk_param xsk; in mlx5e_open_channel() local 2238 mlx5e_build_xsk_param(xsk_pool, &xsk); in mlx5e_open_channel() 3529 if (enable && priv->xsk.refcnt) { in set_feature_lro() 3531 priv->xsk.refcnt); in set_feature_lro() 3865 struct mlx5e_xsk_param xsk; in mlx5e_xsk_validate_mtu() local 3870 mlx5e_build_xsk_param(xsk_pool, &xsk); in mlx5e_xsk_validate_mtu() 3920 if (priv->xsk.refcnt && in mlx5e_change_mtu() 4483 xdp->xsk.queue_id); in mlx5e_xdp() [all …]
|
A D | en_rx.c | 332 xsk_buff_free(dma_info->xsk); in mlx5e_page_release() 2328 int mlx5e_rq_set_handlers(struct mlx5e_rq *rq, struct mlx5e_params *params, bool xsk) in mlx5e_rq_set_handlers() argument 2336 rq->mpwqe.skb_from_cqe_mpwrq = xsk ? in mlx5e_rq_set_handlers() 2364 rq->wqe.skb_from_cqe = xsk ? in mlx5e_rq_set_handlers()
|
A D | en_stats.c | 2145 (NUM_XSKRQ_STATS * max_nch * priv->xsk.ever_used) + in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS() 2146 (NUM_XSKSQ_STATS * max_nch * priv->xsk.ever_used); in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS() 2151 bool is_xsk = priv->xsk.ever_used; in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS() 2193 bool is_xsk = priv->xsk.ever_used; in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
|
/linux/net/xdp/ |
A D | Makefile | 2 obj-$(CONFIG_XDP_SOCKETS) += xsk.o xdp_umem.o xsk_queue.o xskmap.o
|
A D | xsk_buff_pool.c | 118 bpf.xsk.pool = NULL; in xp_disable_drv_zc() 119 bpf.xsk.queue_id = pool->queue_id; in xp_disable_drv_zc() 173 bpf.xsk.pool = pool; in xp_assign_dev() 174 bpf.xsk.queue_id = queue_id; in xp_assign_dev()
|