Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright(c) 2018 Intel Corporation. */
0003 
0004 #ifndef _IXGBE_TXRX_COMMON_H_
0005 #define _IXGBE_TXRX_COMMON_H_
0006 
0007 #define IXGBE_XDP_PASS      0
0008 #define IXGBE_XDP_CONSUMED  BIT(0)
0009 #define IXGBE_XDP_TX        BIT(1)
0010 #define IXGBE_XDP_REDIR     BIT(2)
0011 #define IXGBE_XDP_EXIT      BIT(3)
0012 
0013 #define IXGBE_TXD_CMD (IXGBE_TXD_CMD_EOP | \
0014                IXGBE_TXD_CMD_RS)
0015 
0016 int ixgbe_xmit_xdp_ring(struct ixgbe_ring *ring,
0017             struct xdp_frame *xdpf);
0018 bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring,
0019                union ixgbe_adv_rx_desc *rx_desc,
0020                struct sk_buff *skb);
0021 void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
0022                   union ixgbe_adv_rx_desc *rx_desc,
0023                   struct sk_buff *skb);
0024 void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,
0025           struct sk_buff *skb);
0026 void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring);
0027 void ixgbe_xdp_ring_update_tail_locked(struct ixgbe_ring *ring);
0028 void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter, u64 qmask);
0029 
0030 void ixgbe_txrx_ring_disable(struct ixgbe_adapter *adapter, int ring);
0031 void ixgbe_txrx_ring_enable(struct ixgbe_adapter *adapter, int ring);
0032 
0033 struct xsk_buff_pool *ixgbe_xsk_pool(struct ixgbe_adapter *adapter,
0034                      struct ixgbe_ring *ring);
0035 int ixgbe_xsk_pool_setup(struct ixgbe_adapter *adapter,
0036              struct xsk_buff_pool *pool,
0037              u16 qid);
0038 
0039 bool ixgbe_alloc_rx_buffers_zc(struct ixgbe_ring *rx_ring, u16 cleaned_count);
0040 int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector,
0041               struct ixgbe_ring *rx_ring,
0042               const int budget);
0043 void ixgbe_xsk_clean_rx_ring(struct ixgbe_ring *rx_ring);
0044 bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector,
0045                 struct ixgbe_ring *tx_ring, int napi_budget);
0046 int ixgbe_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags);
0047 void ixgbe_xsk_clean_tx_ring(struct ixgbe_ring *tx_ring);
0048 
0049 #endif /* #define _IXGBE_TXRX_COMMON_H_ */