diff mbox series

[net-next] net: ena: Remove ena_select_queue

Message ID 20240215223104.3060289-1-kheib@redhat.com (mailing list archive)
State Accepted
Commit 78e886ba2b549945ecada055ee0765f0ded5707a
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ena: Remove ena_select_queue | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 989 this patch: 989
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 2 maintainers not CCed: pabeni@redhat.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 1006 this patch: 1006
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: 1006 this patch: 1006
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 29 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-02-16--21-00 (tests: 1448)

Commit Message

Kamal Heib Feb. 15, 2024, 10:31 p.m. UTC
Avoid the following warnings by removing the ena_select_queue() function
and rely on the net core to do the queue selection, The issue happen
when an skb received from an interface with more queues than ena is
forwarded to the ena interface.

[ 1176.159959] eth0 selects TX queue 11, but real number of TX queues is 8
[ 1176.863976] eth0 selects TX queue 14, but real number of TX queues is 8
[ 1180.767877] eth0 selects TX queue 14, but real number of TX queues is 8
[ 1188.703742] eth0 selects TX queue 14, but real number of TX queues is 8

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Kamal Heib <kheib@redhat.com>
---
 drivers/net/ethernet/amazon/ena/ena_netdev.c | 17 -----------------
 1 file changed, 17 deletions(-)

Comments

Jacob Keller Feb. 16, 2024, 10:31 p.m. UTC | #1
On 2/15/2024 2:31 PM, Kamal Heib wrote:
> Avoid the following warnings by removing the ena_select_queue() function
> and rely on the net core to do the queue selection, The issue happen
> when an skb received from an interface with more queues than ena is
> forwarded to the ena interface.
> 
> [ 1176.159959] eth0 selects TX queue 11, but real number of TX queues is 8
> [ 1176.863976] eth0 selects TX queue 14, but real number of TX queues is 8
> [ 1180.767877] eth0 selects TX queue 14, but real number of TX queues is 8
> [ 1188.703742] eth0 selects TX queue 14, but real number of TX queues is 8
> 
> Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
> Signed-off-by: Kamal Heib <kheib@redhat.com>
> ---

You could blindly do something like modulo the real number of queues...
but it seems like its just better to let the kernel decide.

I did check and there doesn't appear to be much of an explanation for
the select_queue implementation in the original commit either.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
patchwork-bot+netdevbpf@kernel.org Feb. 18, 2024, 7:50 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 15 Feb 2024 17:31:04 -0500 you wrote:
> Avoid the following warnings by removing the ena_select_queue() function
> and rely on the net core to do the queue selection, The issue happen
> when an skb received from an interface with more queues than ena is
> forwarded to the ena interface.
> 
> [ 1176.159959] eth0 selects TX queue 11, but real number of TX queues is 8
> [ 1176.863976] eth0 selects TX queue 14, but real number of TX queues is 8
> [ 1180.767877] eth0 selects TX queue 14, but real number of TX queues is 8
> [ 1188.703742] eth0 selects TX queue 14, but real number of TX queues is 8
> 
> [...]

Here is the summary with links:
  - [net-next] net: ena: Remove ena_select_queue
    https://git.kernel.org/netdev/net-next/c/78e886ba2b54

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 2d28e97b2cf3..09e7da1a69c9 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -2689,22 +2689,6 @@  static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	return NETDEV_TX_OK;
 }
 
-static u16 ena_select_queue(struct net_device *dev, struct sk_buff *skb,
-			    struct net_device *sb_dev)
-{
-	u16 qid;
-	/* we suspect that this is good for in--kernel network services that
-	 * want to loop incoming skb rx to tx in normal user generated traffic,
-	 * most probably we will not get to this
-	 */
-	if (skb_rx_queue_recorded(skb))
-		qid = skb_get_rx_queue(skb);
-	else
-		qid = netdev_pick_tx(dev, skb, NULL);
-
-	return qid;
-}
-
 static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -2881,7 +2865,6 @@  static const struct net_device_ops ena_netdev_ops = {
 	.ndo_open		= ena_open,
 	.ndo_stop		= ena_close,
 	.ndo_start_xmit		= ena_start_xmit,
-	.ndo_select_queue	= ena_select_queue,
 	.ndo_get_stats64	= ena_get_stats64,
 	.ndo_tx_timeout		= ena_tx_timeout,
 	.ndo_change_mtu		= ena_change_mtu,