All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gouarin <dgouarin@gmail.com>
Cc: david.gouarin@thalesgroup.com, David Gouarin <dgouarin@gmail.com>,
	Madalin Bucur <madalin.bucur@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	Camelia Groza <camelia.groza@nxp.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org
Subject: [PATCH net v4] dpaa_eth: fix XDP queue index
Date: Tue,  9 Apr 2024 11:30:46 +0200	[thread overview]
Message-ID: <20240409093047.5833-1-dgouarin@gmail.com> (raw)
In-Reply-To: <8edda7aa8ff27cee1b3fa60421734e508d319481.camel@redhat.com>

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@gmail.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


  reply	other threads:[~2024-04-09  9:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 14:34 [PATCH 1/1] [PATCH net] dpaa_eth: fix XDP queue index David Gouarin
2024-03-06 15:37 ` Maciej Fijalkowski
2024-03-07 14:24   ` [PATCH net v2] " David Gouarin
2024-03-07 15:51     ` Maciej Fijalkowski
2024-03-07 17:48       ` david gouarin
2024-03-20 11:25       ` [PATCH net v3] " David Gouarin
2024-03-21 12:26         ` Paolo Abeni
2024-04-09  9:30           ` David Gouarin [this message]
2024-04-11  2:40             ` [PATCH net v4] " Jakub Kicinski
2024-04-11 11:34               ` Vladimir Oltean
2024-04-18  1:17                 ` Jakub Kicinski
2024-04-18  7:51                   ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240409093047.5833-1-dgouarin@gmail.com \
    --to=dgouarin@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=camelia.groza@nxp.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=david.gouarin@thalesgroup.com \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=madalin.bucur@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.