]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: ethernet: ti: am65-cpsw: Fix multi queue Rx on J7
authorRoger Quadros <rogerq@kernel.org>
Fri, 1 Nov 2024 10:18:50 +0000 (12:18 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Nov 2024 14:56:48 +0000 (15:56 +0100)
commitde794169cf1711a98e1e4856c76388e6dadd73a1
tree13f5d04dbaea89585bc98034f51f0eb3a12d6e0e
parentdf3dff8ab6d79edc942464999d06fbaedf8cdd18
net: ethernet: ti: am65-cpsw: Fix multi queue Rx on J7

On J7 platforms, setting up multiple RX flows was failing
as the RX free descriptor ring 0 is shared among all flows
and we did not allocate enough elements in the RX free descriptor
ring 0 to accommodate for all RX flows.

This issue is not present on AM62 as separate pair of
rings are used for free and completion rings for each flow.

Fix this by allocating enough elements for RX free descriptor
ring 0.

However, we can no longer rely on desc_idx (descriptor based
offsets) to identify the pages in the respective flows as
free descriptor ring includes elements for all flows.
To solve this, introduce a new swdata data structure to store
flow_id and page. This can be used to identify which flow (page_pool)
and page the descriptor belonged to when popped out of the
RX rings.

Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/ti/am65-cpsw-nuss.c
drivers/net/ethernet/ti/am65-cpsw-nuss.h