aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2022-04-17 10:12:46 +0000
committerDavid S. Miller <davem@davemloft.net>2022-04-20 10:42:57 +0100
commit26efaef759a1bc43e819ee44cfd8a1fc4514e8c9 (patch)
treeb2bc127d1596b9a0d85946cc13012a2d365eca2a /drivers/net/ethernet/aquantia/atlantic/aq_vec.c
parentnet: atlantic: Implement xdp control plane (diff)
downloadlinux-dev-26efaef759a1bc43e819ee44cfd8a1fc4514e8c9.tar.xz
linux-dev-26efaef759a1bc43e819ee44cfd8a1fc4514e8c9.zip
net: atlantic: Implement xdp data plane
It supports XDP_PASS, XDP_DROP and multi buffer. The new function aq_nic_xmit_xdpf() is used to send packet with xdp_frame and internally it calls aq_nic_map_xdp(). AQC chip supports 32 multi-queues and 8 vectors(irq). there are two option 1. under 8 cores and 4 tx queues per core. 2. under 4 cores and 8 tx queues per core. Like ixgbe, these tx queues can be used only for XDP_TX, XDP_REDIRECT queue. If so, no tx_lock is needed. But this patchset doesn't use this strategy because getting hardware tx queue index cost is too high. So, tx_lock is used in the aq_nic_xmit_xdpf(). single-core, single queue, 80% cpu utilization. 30.75% bpf_prog_xxx_xdp_prog_tx [k] bpf_prog_xxx_xdp_prog_tx 10.35% [kernel] [k] aq_hw_read_reg <---------- here 4.38% [kernel] [k] get_page_from_freelist single-core, 8 queues, 100% cpu utilization, half PPS. 45.56% [kernel] [k] aq_hw_read_reg <---------- here 17.58% bpf_prog_xxx_xdp_prog_tx [k] bpf_prog_xxx_xdp_prog_tx 4.72% [kernel] [k] hw_atl_b0_hw_ring_rx_receive The new function __aq_ring_xdp_clean() is a xdp rx handler and this is called only when XDP is attached. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_vec.c')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_vec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_vec.c b/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
index 997f351bc371..e839e1002ec7 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
@@ -155,7 +155,7 @@ int aq_vec_ring_alloc(struct aq_vec_s *self, struct aq_nic_s *aq_nic,
goto err_exit;
}
if (xdp_rxq_info_reg_mem_model(&self->ring[i][AQ_VEC_RX_ID].xdp_rxq,
- MEM_TYPE_PAGE_ORDER0, NULL) < 0) {
+ MEM_TYPE_PAGE_SHARED, NULL) < 0) {
xdp_rxq_info_unreg(&self->ring[i][AQ_VEC_RX_ID].xdp_rxq);
err = -ENOMEM;
goto err_exit;