1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright(c) 2018 Intel Corporation. */ 3 4 #ifndef _IXGBE_TXRX_COMMON_H_ 5 #define _IXGBE_TXRX_COMMON_H_ 6 7 #define IXGBE_XDP_PASS 0 8 #define IXGBE_XDP_CONSUMED BIT(0) 9 #define IXGBE_XDP_TX BIT(1) 10 #define IXGBE_XDP_REDIR BIT(2) 11 12 #define IXGBE_TXD_CMD (IXGBE_TXD_CMD_EOP | \ 13 IXGBE_TXD_CMD_RS) 14 15 int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter, 16 struct xdp_frame *xdpf); 17 bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring, 18 union ixgbe_adv_rx_desc *rx_desc, 19 struct sk_buff *skb); 20 void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring, 21 union ixgbe_adv_rx_desc *rx_desc, 22 struct sk_buff *skb); 23 void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector, 24 struct sk_buff *skb); 25 void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring); 26 void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter, u64 qmask); 27 28 void ixgbe_txrx_ring_disable(struct ixgbe_adapter *adapter, int ring); 29 void ixgbe_txrx_ring_enable(struct ixgbe_adapter *adapter, int ring); 30 31 struct xdp_umem *ixgbe_xsk_umem(struct ixgbe_adapter *adapter, 32 struct ixgbe_ring *ring); 33 int ixgbe_xsk_umem_setup(struct ixgbe_adapter *adapter, struct xdp_umem *umem, 34 u16 qid); 35 36 void ixgbe_zca_free(struct zero_copy_allocator *alloc, unsigned long handle); 37 38 bool ixgbe_alloc_rx_buffers_zc(struct ixgbe_ring *rx_ring, u16 cleaned_count); 39 int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector, 40 struct ixgbe_ring *rx_ring, 41 const int budget); 42 void ixgbe_xsk_clean_rx_ring(struct ixgbe_ring *rx_ring); 43 bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector, 44 struct ixgbe_ring *tx_ring, int napi_budget); 45 int ixgbe_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags); 46 void ixgbe_xsk_clean_tx_ring(struct ixgbe_ring *tx_ring); 47 48 #endif /* #define _IXGBE_TXRX_COMMON_H_ */ 49