|
@@ -2318,12 +2318,14 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
|
|
#endif /* IXGBE_FCOE */
|
|
|
u16 cleaned_count = ixgbe_desc_unused(rx_ring);
|
|
|
bool xdp_xmit = false;
|
|
|
+ struct xdp_buff xdp;
|
|
|
+
|
|
|
+ xdp.rxq = &rx_ring->xdp_rxq;
|
|
|
|
|
|
while (likely(total_rx_packets < budget)) {
|
|
|
union ixgbe_adv_rx_desc *rx_desc;
|
|
|
struct ixgbe_rx_buffer *rx_buffer;
|
|
|
struct sk_buff *skb;
|
|
|
- struct xdp_buff xdp;
|
|
|
unsigned int size;
|
|
|
|
|
|
/* return some buffers to hardware, one at a time is too slow */
|
|
@@ -6444,6 +6446,11 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
|
|
|
rx_ring->next_to_clean = 0;
|
|
|
rx_ring->next_to_use = 0;
|
|
|
|
|
|
+ /* XDP RX-queue info */
|
|
|
+ if (xdp_rxq_info_reg(&rx_ring->xdp_rxq, adapter->netdev,
|
|
|
+ rx_ring->queue_index) < 0)
|
|
|
+ goto err;
|
|
|
+
|
|
|
rx_ring->xdp_prog = adapter->xdp_prog;
|
|
|
|
|
|
return 0;
|
|
@@ -6541,6 +6548,7 @@ void ixgbe_free_rx_resources(struct ixgbe_ring *rx_ring)
|
|
|
ixgbe_clean_rx_ring(rx_ring);
|
|
|
|
|
|
rx_ring->xdp_prog = NULL;
|
|
|
+ xdp_rxq_info_unreg(&rx_ring->xdp_rxq);
|
|
|
vfree(rx_ring->rx_buffer_info);
|
|
|
rx_ring->rx_buffer_info = NULL;
|
|
|
|