Commit a9a7d129 authored by David S. Miller's avatar David S. Miller

Merge branch 'ena-xdp-fixes'

Sameeh Jubran says:

====================
Fix xdp in ena driver

This patchset includes 2 XDP related bug fixes

Difference from v1:
* Fixed "Fixes" tag
====================
Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bb986a50 3921a81c
......@@ -355,7 +355,7 @@ static int ena_xdp_xmit_buff(struct net_device *dev,
ena_unmap_tx_buff(xdp_ring, tx_info);
tx_info->xdpf = NULL;
error_drop_packet:
__free_page(tx_info->xdp_rx_page);
return NETDEV_TX_OK;
}
......@@ -1646,11 +1646,9 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
&next_to_clean);
if (unlikely(!skb)) {
if (xdp_verdict == XDP_TX) {
if (xdp_verdict == XDP_TX)
ena_free_rx_page(rx_ring,
&rx_ring->rx_buffer_info[rx_ring->ena_bufs[0].req_id]);
res_budget--;
}
for (i = 0; i < ena_rx_ctx.descs; i++) {
rx_ring->free_ids[next_to_clean] =
rx_ring->ena_bufs[i].req_id;
......@@ -1658,8 +1656,10 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
ENA_RX_RING_IDX_NEXT(next_to_clean,
rx_ring->ring_size);
}
if (xdp_verdict == XDP_TX || xdp_verdict == XDP_DROP)
if (xdp_verdict != XDP_PASS) {
res_budget--;
continue;
}
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment