mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-10-23 07:34:24 +02:00
MA-20441-3 Revert "libbpf: add Tx headroom support for AF_XDP buffers"
This patch breaks KMI, and do not work for us.
This reverts commit 24ef30acda
.
Change-Id: I4ec11b9576375d697bd12f454f68f39068034b0a
This commit is contained in:
parent
57c100eb17
commit
90f2644bde
|
@ -21,7 +21,6 @@ struct xdp_umem {
|
|||
void *addrs;
|
||||
u64 size;
|
||||
u32 headroom;
|
||||
u32 tx_headroom;
|
||||
u32 chunk_size;
|
||||
u32 chunks;
|
||||
u32 npgs;
|
||||
|
|
|
@ -67,7 +67,6 @@ struct xsk_buff_pool {
|
|||
u32 dma_pages_cnt;
|
||||
u32 free_heads_cnt;
|
||||
u32 headroom;
|
||||
u32 tx_headroom;
|
||||
u32 chunk_size;
|
||||
u32 frame_len;
|
||||
u8 cached_need_wakeup;
|
||||
|
|
|
@ -70,7 +70,6 @@ struct xdp_umem_reg {
|
|||
__u32 chunk_size;
|
||||
__u32 headroom;
|
||||
__u32 flags;
|
||||
__u32 tx_headroom;
|
||||
};
|
||||
|
||||
struct xdp_statistics {
|
||||
|
|
|
@ -69,7 +69,6 @@ struct xdp_diag_umem {
|
|||
__u32 queue_id;
|
||||
__u32 flags;
|
||||
__u32 refs;
|
||||
__u32 tx_headroom;
|
||||
};
|
||||
|
||||
struct xdp_diag_stats {
|
||||
|
|
|
@ -152,8 +152,7 @@ static int xdp_umem_account_pages(struct xdp_umem *umem)
|
|||
|
||||
static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
|
||||
{
|
||||
u32 npgs_rem, chunk_size = mr->chunk_size;
|
||||
u32 headroom = mr->headroom, tx_headroom = mr->tx_headroom;
|
||||
u32 npgs_rem, chunk_size = mr->chunk_size, headroom = mr->headroom;
|
||||
bool unaligned_chunks = mr->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG;
|
||||
u64 npgs, addr = mr->addr, size = mr->len;
|
||||
unsigned int chunks, chunks_rem;
|
||||
|
@ -209,7 +208,6 @@ static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
|
|||
umem->pgs = NULL;
|
||||
umem->user = NULL;
|
||||
umem->flags = mr->flags;
|
||||
umem->tx_headroom = tx_headroom;
|
||||
|
||||
INIT_LIST_HEAD(&umem->xsk_dma_list);
|
||||
refcount_set(&umem->users, 1);
|
||||
|
|
|
@ -1054,7 +1054,6 @@ struct xdp_umem_reg_v1 {
|
|||
__u64 len; /* Length of packet data area */
|
||||
__u32 chunk_size;
|
||||
__u32 headroom;
|
||||
__u32 tx_headroom;
|
||||
};
|
||||
|
||||
static int xsk_setsockopt(struct socket *sock, int level, int optname,
|
||||
|
|
|
@ -77,7 +77,6 @@ struct xsk_buff_pool *xp_create_and_assign_umem(struct xdp_sock *xs,
|
|||
pool->heads_cnt = umem->chunks;
|
||||
pool->free_heads_cnt = umem->chunks;
|
||||
pool->headroom = umem->headroom;
|
||||
pool->tx_headroom = umem->tx_headroom;
|
||||
pool->chunk_size = umem->chunk_size;
|
||||
pool->unaligned = umem->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG;
|
||||
pool->frame_len = umem->chunk_size - umem->headroom -
|
||||
|
|
|
@ -65,7 +65,6 @@ static int xsk_diag_put_umem(const struct xdp_sock *xs, struct sk_buff *nlskb)
|
|||
if (umem->zc)
|
||||
du.flags |= XDP_DU_F_ZEROCOPY;
|
||||
du.refs = refcount_read(&umem->users);
|
||||
du.tx_headroom = umem->tx_headroom;
|
||||
|
||||
err = nla_put(nlskb, XDP_DIAG_UMEM, sizeof(du), &du);
|
||||
if (!err && pool && pool->fq)
|
||||
|
|
|
@ -816,7 +816,6 @@ static struct xsk_umem_info *xsk_configure_umem(void *buffer, u64 size)
|
|||
.frame_size = opt_xsk_frame_size,
|
||||
.frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM,
|
||||
.flags = opt_umem_flags
|
||||
.tx_frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM,
|
||||
};
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -721,7 +721,6 @@ static const struct xsk_umem_config umem_cfg_default = {
|
|||
.frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE,
|
||||
.frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM,
|
||||
.flags = 0,
|
||||
.tx_frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM,
|
||||
};
|
||||
|
||||
static const struct port_params port_params_default = {
|
||||
|
|
|
@ -70,7 +70,6 @@ struct xdp_umem_reg {
|
|||
__u32 chunk_size;
|
||||
__u32 headroom;
|
||||
__u32 flags;
|
||||
__u32 tx_headroom;
|
||||
};
|
||||
|
||||
struct xdp_statistics {
|
||||
|
|
|
@ -135,7 +135,6 @@ static void xsk_set_umem_config(struct xsk_umem_config *cfg,
|
|||
cfg->frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE;
|
||||
cfg->frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM;
|
||||
cfg->flags = XSK_UMEM__DEFAULT_FLAGS;
|
||||
cfg->tx_frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -144,7 +143,6 @@ static void xsk_set_umem_config(struct xsk_umem_config *cfg,
|
|||
cfg->frame_size = usr_cfg->frame_size;
|
||||
cfg->frame_headroom = usr_cfg->frame_headroom;
|
||||
cfg->flags = usr_cfg->flags;
|
||||
cfg->tx_frame_headroom = usr_cfg->tx_frame_headroom;
|
||||
}
|
||||
|
||||
static int xsk_set_xdp_socket_config(struct xsk_socket_config *cfg,
|
||||
|
@ -317,7 +315,6 @@ int xsk_umem__create_v0_0_4(struct xsk_umem **umem_ptr, void *umem_area,
|
|||
mr.chunk_size = umem->config.frame_size;
|
||||
mr.headroom = umem->config.frame_headroom;
|
||||
mr.flags = umem->config.flags;
|
||||
mr.tx_headroom = umem->config.tx_frame_headroom;
|
||||
|
||||
err = setsockopt(umem->fd, SOL_XDP, XDP_UMEM_REG, &mr, sizeof(mr));
|
||||
if (err) {
|
||||
|
@ -346,7 +343,6 @@ struct xsk_umem_config_v1 {
|
|||
__u32 comp_size;
|
||||
__u32 frame_size;
|
||||
__u32 frame_headroom;
|
||||
__u32 tx_frame_headroom;
|
||||
};
|
||||
|
||||
int xsk_umem__create_v0_0_2(struct xsk_umem **umem_ptr, void *umem_area,
|
||||
|
|
|
@ -261,7 +261,6 @@ struct xsk_umem_config {
|
|||
__u32 frame_size;
|
||||
__u32 frame_headroom;
|
||||
__u32 flags;
|
||||
__u32 tx_frame_headroom;
|
||||
};
|
||||
|
||||
LIBBPF_API int xsk_setup_xdp_prog(int ifindex,
|
||||
|
|
|
@ -243,7 +243,6 @@ static void xsk_configure_umem(struct ifobject *data, void *buffer, u64 size, in
|
|||
.frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE,
|
||||
.frame_headroom = umem->frame_headroom,
|
||||
.flags = XSK_UMEM__DEFAULT_FLAGS
|
||||
.tx_frame_headroom = umem->tx_frame_headroom,
|
||||
};
|
||||
struct xsk_umem_info *umem;
|
||||
int ret;
|
||||
|
|
|
@ -86,7 +86,6 @@ struct xsk_umem_info {
|
|||
struct xsk_umem *umem;
|
||||
u32 num_frames;
|
||||
u32 frame_headroom;
|
||||
u32 tx_frame_headroom;
|
||||
void *buffer;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user