Refactor XDP rxq info registration code, preparing the driver for AF_XDP zero-copy support which is added by upcoming patches. Currently, xdp_rxq and memory model are both registered during RX resource setup time by igc_xdp_register_rxq_info() helper. With AF_XDP, we want to register the memory model later on while configuring the ring because we will know which memory model type to register (MEM_TYPE_PAGE_SHARED or MEM_TYPE_XSK_BUFF_POOL). The helpers igc_xdp_register_rxq_info() and igc_xdp_unregister_rxq_ info() are not useful anymore so they are removed. Signed-off-by: Andre Guedes <andre.guedes@intel.com> Signed-off-by: Vedang Patel <vedang.patel@intel.com> Signed-off-by: Jithu Joseph <jithu.joseph@intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
16 lines
366 B
C
16 lines
366 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2020, Intel Corporation. */
|
|
|
|
#ifndef _IGC_XDP_H_
|
|
#define _IGC_XDP_H_
|
|
|
|
int igc_xdp_set_prog(struct igc_adapter *adapter, struct bpf_prog *prog,
|
|
struct netlink_ext_ack *extack);
|
|
|
|
static inline bool igc_xdp_is_enabled(struct igc_adapter *adapter)
|
|
{
|
|
return !!adapter->xdp_prog;
|
|
}
|
|
|
|
#endif /* _IGC_XDP_H_ */
|