[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240409093047.5833-1-dgouarin@gmail.com>
Date: Tue, 9 Apr 2024 11:30:46 +0200
From: David Gouarin <dgouarin@...il.com>
To:
Cc: david.gouarin@...lesgroup.com,
David Gouarin <dgouarin@...il.com>,
Madalin Bucur <madalin.bucur@....com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Camelia Groza <camelia.groza@....com>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
bpf@...r.kernel.org
Subject: [PATCH net v4] dpaa_eth: fix XDP queue index
Make it possible to bind a XDP socket to a queue id.
The DPAA FQ Id was passed to the XDP program in the
xdp_rxq_info->queue_index instead of the Ethernet device queue number,
which made it unusable with bpf_map_redirect.
Instead of the DPAA FQ Id, initialise the XDP rx queue with the queue number.
Fixes: d57e57d0cd04 ("dpaa_eth: add XDP_TX support")
Signed-off-by: David Gouarin <dgouarin@...il.com>
---
v4: fix patch formatting
v3: reword commit message
v2: add Fixes: in description
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index dcbc598b11c6..988dc9237368 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -1154,7 +1154,7 @@ static int dpaa_fq_init(struct dpaa_fq *dpaa_fq, bool td_enable)
if (dpaa_fq->fq_type == FQ_TYPE_RX_DEFAULT ||
dpaa_fq->fq_type == FQ_TYPE_RX_PCD) {
err = xdp_rxq_info_reg(&dpaa_fq->xdp_rxq, dpaa_fq->net_dev,
- dpaa_fq->fqid, 0);
+ dpaa_fq->channel, 0);
if (err) {
dev_err(dev, "xdp_rxq_info_reg() = %d\n", err);
return err;
--
2.34.1
Powered by blists - more mailing lists