diff mbox series

[net,v4] dpaa_eth: fix XDP queue index

Message ID 20240409093047.5833-1-dgouarin@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net,v4] dpaa_eth: fix XDP queue index | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 12 of 12 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-10--06-00 (tests: 962)

Commit Message

David Gouarin April 9, 2024, 9:30 a.m. UTC
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(-)

Comments

Jakub Kicinski April 11, 2024, 2:40 a.m. UTC | #1
On Tue,  9 Apr 2024 11:30:46 +0200 David Gouarin wrote:
> 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.

Camelia, looks good?
Vladimir Oltean April 11, 2024, 11:34 a.m. UTC | #2
On Wed, Apr 10, 2024 at 07:40:55PM -0700, Jakub Kicinski wrote:
> On Tue,  9 Apr 2024 11:30:46 +0200 David Gouarin wrote:
> > 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.
> 
> Camelia, looks good?

Please allow me some time to prepare a response, even if this means the
patch misses this week's 'net' pull request.
Jakub Kicinski April 18, 2024, 1:17 a.m. UTC | #3
On Thu, 11 Apr 2024 14:34:33 +0300 Vladimir Oltean wrote:
> On Wed, Apr 10, 2024 at 07:40:55PM -0700, Jakub Kicinski wrote:
> > On Tue,  9 Apr 2024 11:30:46 +0200 David Gouarin wrote:  
> > > 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.  
> > 
> > Camelia, looks good?  
> 
> Please allow me some time to prepare a response, even if this means the
> patch misses this week's 'net' pull request.

We're getting close to the 'net' pull request of the following week :)
The bug has been around for a while so no huge rush, but would be nice
to get rid of this from patchwork. If you don't have time - would you
be willing to repost it once you found the time to investigate?
Vladimir Oltean April 18, 2024, 7:51 a.m. UTC | #4
On Wed, Apr 17, 2024 at 06:17:34PM -0700, Jakub Kicinski wrote:
> On Thu, 11 Apr 2024 14:34:33 +0300 Vladimir Oltean wrote:
> > On Wed, Apr 10, 2024 at 07:40:55PM -0700, Jakub Kicinski wrote:
> > > On Tue,  9 Apr 2024 11:30:46 +0200 David Gouarin wrote:  
> > > > 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.  
> > > 
> > > Camelia, looks good?  
> > 
> > Please allow me some time to prepare a response, even if this means the
> > patch misses this week's 'net' pull request.
> 
> We're getting close to the 'net' pull request of the following week :)
> The bug has been around for a while so no huge rush, but would be nice
> to get rid of this from patchwork. If you don't have time - would you
> be willing to repost it once you found the time to investigate?

I have been looking into this, but I do not have a definitive response yet.
The dpaa_fq->channel replacement is not the zero-based RX queue number
that David is looking for, either.

We will work this out. Please remove this patch from patchwork for now.
diff mbox series

Patch

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;