Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2372595lqp; Sun, 24 Mar 2024 16:22:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwMvytdYNw0asVhS22b1H6Qc4qq047fx3yvudOQNFbA0+paXNW2ZLpCMDUzcIxRO2TXuLsngDl/DdWeHmzxneQ9Si6rPX4BnQE99UEkA== X-Google-Smtp-Source: AGHT+IEepq9f0zZf/eWjNzKpSZOWc9ZOsgHwm0XJBkJYZRScQFOeG9mtYa4v/nh0wemo/ZuX50xz X-Received: by 2002:a17:903:41c2:b0:1df:f6d0:539a with SMTP id u2-20020a17090341c200b001dff6d0539amr7872462ple.15.1711322538545; Sun, 24 Mar 2024 16:22:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711322538; cv=pass; d=google.com; s=arc-20160816; b=sD+nUpwcBKfA72j6jYAtllVYw9UVIHSTDfdl8qh9gkDfVKZeOdyfvCr67FApOO2D+Z NaKXsMBt5NTPx5CekaxbPZhFWPf/d3KfwkSRQ4I8FnqM9HG9sGana6n2olPkZ66+LRAZ ajG9lhIUz6msoSk/5AStLJS9NQWUhqD9ZPLKJi1Sj++ycVxJjfHEDvu1UMU30eY6HkKd S+5NnkQzGt7s6tzlrCxql4JtjUUnFQpqrPVWd6K07SESNK+j7CKCSYk2axbr9QK3A3uX k1hNfghOHT/U0ReEHw715oTO1Lr4hY8NXD1OMs9FN3O3wwXPOr3i+JiuEU2qZlHXcMo1 wPvg== 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=QKT8jlii1aefWf93wsyNaMIXtI5whd7vkp81DNsNSoQ=; fh=LcB8SnPRALTjGLsW2w7U4GIkeXB3kW+x5WVUeRnNvhQ=; b=KMbHCsZmZhly0frGyGvepDlyommH514S5CrvkJYwbba4X10iT43CnS1j2CZYfguUWb RP2dT59gQ3N2z+5C9MydbNKOv15BQw+NnIxy9Ze8tbL+812C0b0Am2uJzopyHTTShYrP x/6k6TUE6BindNqYfvz9gU3uQh8O3BcCYEwWW/rr3C09SYc+Z+/Qk4KvVKyoXBcGmMQD wRUQgH1O7M0LI2/BcdJGu26MzDn9T+9mkdUzmGmCfWOgCTXH44D0g4Ie3vDd5GNGKeJZ Zg5CsD9IfzXG9rjrW1Ul7gHRrFk4LjwBp3GmzgQZWL1At3jEIJRzGohufsz0lPGXiU2H Krdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aTF5vTY/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p22-20020a1709028a9600b001dddad3fd73si3882839plo.396.2024.03.24.16.22.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aTF5vTY/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113103-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1ADB22881CB for ; Sun, 24 Mar 2024 23:22:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AC95156992; Sun, 24 Mar 2024 22:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aTF5vTY/" 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 510E7156975; Sun, 24 Mar 2024 22:38:31 +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=1711319911; cv=none; b=FeRfj12pSS9PsNhgUMO+C3NyaEoSGiQ7E/4CLOUOYwpYkuIc7N8kYhYKnedfaHf6Pdnc/iqbNrvWU81Fk801poO6AgUNc5cS3uknK9U4u+oDzvXhWl0Hbvdgjj7zcvL8tfKhkpJjwVP9jvgtzMtONmYAvaxCbHl688LthrewThw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319911; c=relaxed/simple; bh=dhlXIN0G772gb/0OtjhjujHY758spByvfKEwk4FRehk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QZQCNng203bvguRpB3sz+77uKt1fyJsgyDTzU7w7CLBugy21dcmbOtkXkR4pGpBLOb0Bt3eW+9TWXgJZwsEwH7dWiSlVK6/LSSYgdgnLSv85p8y2KycRIHL7q+xtDWPC3RbUUD1fHzNAcDT1NcKFawku9gvLJwdrbJT2Z1CqfV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aTF5vTY/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FEDEC433C7; Sun, 24 Mar 2024 22:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319910; bh=dhlXIN0G772gb/0OtjhjujHY758spByvfKEwk4FRehk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aTF5vTY/GGloIgBVEYE3wf/7kIW3NloVGRIFKyJ+jIlBZZYDg+WhsiWi2spV6FwO0 bdji7kpOEsXAvWWsmN17Q8NSSuIh1mniL5RLmjl5FyuuWIhBZR47BS8AC9fVMAPuuj dyA352fstddMTTytD92nU9bp/Z6vghpxuy8PqyY1MFSE1CDsap3TTq+icDZf7zAvMp MhcPttQRuYT4Dd5dgrsHgnPZonmZE78Dja2EZ0CipnHQr7uPtXISZr3mBrMm7Heq6n hQp19h4Ngm1RixVibKokAnjHL44WwxPit8e0vvkw4jo1zoPYPwJT5pr10imfqeux1I opCbZrWd7XeLQ== 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.8 216/715] net: ena: Remove ena_select_queue Date: Sun, 24 Mar 2024 18:26:35 -0400 Message-ID: <20240324223455.1342824-217-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-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 1c0a7828d397b..5482015411f2f 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -2670,22 +2670,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; @@ -2863,7 +2847,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