mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 05:55:02 +08:00
1742b3d528
Replace the explicit umem reference passed to the driver in AF_XDP zero-copy mode with the buffer pool instead. This in preparation for extending the functionality of the zero-copy mode so that umems can be shared between queues on the same netdev and also between netdevs. In this commit, only an umem reference has been added to the buffer pool struct. But later commits will add other entities to it. These are going to be entities that are different between different queue ids and netdevs even though the umem is shared between them. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Björn Töpel <bjorn.topel@intel.com> Link: https://lore.kernel.org/bpf/1598603189-32145-2-git-send-email-magnus.karlsson@intel.com
24 lines
836 B
C
24 lines
836 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright(c) 2018 Intel Corporation. */
|
|
|
|
#ifndef _I40E_XSK_H_
|
|
#define _I40E_XSK_H_
|
|
|
|
struct i40e_vsi;
|
|
struct xsk_buff_pool;
|
|
struct zero_copy_allocator;
|
|
|
|
int i40e_queue_pair_disable(struct i40e_vsi *vsi, int queue_pair);
|
|
int i40e_queue_pair_enable(struct i40e_vsi *vsi, int queue_pair);
|
|
int i40e_xsk_pool_setup(struct i40e_vsi *vsi, struct xsk_buff_pool *pool,
|
|
u16 qid);
|
|
bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 cleaned_count);
|
|
int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget);
|
|
|
|
bool i40e_clean_xdp_tx_irq(struct i40e_vsi *vsi, struct i40e_ring *tx_ring);
|
|
int i40e_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags);
|
|
int i40e_alloc_rx_bi_zc(struct i40e_ring *rx_ring);
|
|
void i40e_clear_rx_bi_zc(struct i40e_ring *rx_ring);
|
|
|
|
#endif /* _I40E_XSK_H_ */
|