Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2563390lqp; Mon, 25 Mar 2024 02:43:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXd8Guf5ecmgv99a9vbAne6FNSf4wkH6NHBJyiakJfsJ+MxjTYM2/YfMi61sAlpM1DD5ddT12V+naDR0kXukRNvW9kDU/c5FYbFKjvUXg== X-Google-Smtp-Source: AGHT+IEGoLEG0u+G1lq8+Q7jteVVz3S+AwHOk/TByieaqf28y3tx5iAjUux8KtVPnywvtBKS6z09 X-Received: by 2002:a50:8703:0:b0:567:737f:e910 with SMTP id i3-20020a508703000000b00567737fe910mr5143556edb.3.1711359820985; Mon, 25 Mar 2024 02:43:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711359820; cv=pass; d=google.com; s=arc-20160816; b=VPqREQtZnxBImEStJrLrCxAy+oDrK5Cjiveyc2Lug50ID93yjN3DjYpXXpjPTYPN2V NdMVYTTeugbmTHClqu8ICfKFy1NoIhklYcHZ8cIjlGQXiWvHR4nILMEyf0bytnAvRUP2 EKGIlVYuaQr57P0mM2lRKLyykB41jgxeg6/th/ZxT7TG8GgSgzl/4rRau8XrveISC4Wp JYEAiuY7JUGeJQ79IzwpntRnmo3Xnipjfq007/+REF0v9b8UP2bz10m9cEthKBXjdEgz yx0pzggftYrZCwRmTozK5Asf4eEZ+/hHwZzmW0czIc5OIhLGOino6L///Vl/gYnw29s4 uu4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4lX91QgBrs4AwkggbJuuzkijKjoik7xzqiYCsBqShRY=; fh=LcB8SnPRALTjGLsW2w7U4GIkeXB3kW+x5WVUeRnNvhQ=; b=DYr1JWHn4MOAj63ZCTse74lhdKcWg+E5Q7bqWnfE5emYQIW3gnmhZWSuGwLAOtRUzy ZUwEIaTuybABKK532bmT+anECe7KuLP9x7BTFoZMOmu4PqvYiDlD6POeBa2GZGDDNz5Z e3Dtmm6MDHxWVNEdDJl6oCo1NAnt6VVuX8FM1bodOTCsD/V7vQkewfnO8C9fnzTJMi1c CNSzCiNmpwZxC4ieAEvxWtD7dL2+SI/S9VCu5JzhkL4UherKlCdV8kCwOCVn8DybNCYf ITzrUSU3inU+CvkWhlRRsHPAc0lNDQB/t+uh4EjO+9viM2QGtIOAvEAHc9XulR56vQif KVwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cnZi47m6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115895-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115895-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id er22-20020a056402449600b0056c076245f3si1434826edb.218.2024.03.25.02.43.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:43:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115895-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cnZi47m6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115895-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115895-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DA0151F2E5C1 for ; Mon, 25 Mar 2024 09:42:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEC1938662F; Mon, 25 Mar 2024 03:03:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cnZi47m6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0B9F537E9; Sun, 24 Mar 2024 23:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322087; cv=none; b=Pm/SV8qRyCU9x1DNhOdKEhdVvYkYXQEl10gBaJUyLvLweT3q9LOsyNlhQdiWGIJGtf0RIb41ApZ8hfEdKXVwS4R11X6nyrcQ1y6GT4P4sMIqlAjk23PJOe/lGShSFzvHHcCwbUvflSgmsqgoYCnrSy69GLBABAKyG1z5YD0mi8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322087; c=relaxed/simple; bh=m/Rxmhe3KFCR8yGWDqhgjwHUtAA64+m5mpxe/gXkem4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rMhiUKb8yASe47V+73/wsRVeWcGRnMiZE8NMqJ9CJ9DkVP/Q0wiClu6L6ulZpF/e1vmOwW4BXoK1dQ+vDhaplqruPIsgGuSKG3PGd+VG7zQ28o7fsTx0oBWm2XcyAxUm/hep3PrRuzVyPvItVc1J/6Ye5mEEqkiZbNUPxO72UBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cnZi47m6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7D43C433C7; Sun, 24 Mar 2024 23:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322087; bh=m/Rxmhe3KFCR8yGWDqhgjwHUtAA64+m5mpxe/gXkem4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cnZi47m6/V2aOLy1LrwtarpGcRV4TWVG2yDAPqAznkPznbqAS6/dGyUO4CSYurXVK 6Jkv+7sQqegDFeo22Byoa6Pn37cSZsGVmgR99csSUykYeR20QU0Jy76qS2fo1HhYQL AAM72l4+jIGCRh0YUm773NgJU46jKB9xWAiCeyB8qHsvfCk4Hoi+ADLDwRDhMX+o5q YaH2IOn3z9tunhgfVEh0UOBaNFjEk9VbStIij0MX30dxfF96sLpzG/CesTY2xOp1gg 5zf7MRFepSHbuL/lTHl4eRMS3ejAGh/udPcyHbK60ct1PnHDMw69RtAYLJ509G8yod pWF0Fjd0fHzPA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kamal Heib , Jacob Keller , "David S . Miller" , Sasha Levin Subject: [PATCH 6.1 161/451] net: ena: Remove ena_select_queue Date: Sun, 24 Mar 2024 19:07:17 -0400 Message-ID: <20240324231207.1351418-162-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Kamal Heib [ Upstream commit 78e886ba2b549945ecada055ee0765f0ded5707a ] 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 Reviewed-by: Jacob Keller Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 044b8afde69a0..9e82e7b9c3b72 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -3174,22 +3174,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; @@ -3359,7 +3343,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, -- 2.43.0