From patchwork Sun Apr 16 09:12:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 1769382 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=NIUKP9vm; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q00FJ0kH8z1yZt for ; Mon, 17 Apr 2023 05:12:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6525860E09; Sun, 16 Apr 2023 19:12:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6525860E09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1681672370; bh=RC1Cgb2cDCOiluuj+XOdB+KOg8w3LKxReCWWVjmUFWw=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=NIUKP9vmHoFnT/chZ1ReR3E55/w5s+hZPCe5WQxcNjLioVqj1HjxAxALNuEbr7fhw r7I/5LAZmgRwajnbkw/z0qj9xz81m48Pv465jWeXSQMutSEEwdNnHCl+jh9W2k22M1 PPFgPHmQ+ZNXXiMa17V2lvEJ92OkYFA1R7+K83QBO/LT7yK3QPXM7j7kMs6kzqrH2K Ys56DljrDYWiJAXtHuHSeDy5SAkTlzxM0jXU0SagOJNxsQHRKFgw0LUkIr3mkJ3tCd F0Wn7cGPnJbis1w9iApuJJ/fmg72+FKnuETaQvtL/uHXwH2liGwkh1HiLddFDxa+GJ 6I24vcYQg6DMA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RIC8ECvw5rkq; Sun, 16 Apr 2023 19:12:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 6832060E13; Sun, 16 Apr 2023 19:12:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6832060E13 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A260A1C3E41 for ; Sun, 16 Apr 2023 19:12:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 892BF83F83 for ; Sun, 16 Apr 2023 19:12:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 892BF83F83 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxuAEAroh1Sl for ; Sun, 16 Apr 2023 19:12:43 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 96E0883F7A Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 96E0883F7A for ; Sun, 16 Apr 2023 19:12:43 +0000 (UTC) Received: by mail-ej1-x62d.google.com with SMTP id kt6so20607050ejb.0 for ; Sun, 16 Apr 2023 12:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681672361; x=1684264361; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PWA/HXzUdJz0H+XyZalEsfv+ELOZVQCrtHlubc/pGGk=; b=PDF0DEgghj9M5OPPO1WdxlyT7qdq7xweKc72DOgaLkd0E42KqdY+a1M3g9ibi7yvcF lvgoy9cKOe+rDixlkj+fBggH8AA40S7La7V4PnKg+WnYAcm0MRu+FtnO4C8VNAUt3zfK +7DlncSeo8YCGdP5bQR1NXujnI3R65S0JSyK78rPlFqnCtH5AMv8i6YkL34hb1HAnZtG xnMTJEESz1SUaarDR3SXt/bYvOB+0+ixLr7e27W1WwnwTNiwABGf6uL/IhArw8b1w/8U POplNj1xEnwIA62Z1ozQgGojuBpzx4cLmLUPiNT8iwyr+YFyYWR9e/P4Q0QgTtEDBxhj EEHg== X-Gm-Message-State: AAQBX9cZivqpv+U3D9yHP6gZvri5iD8U0pvECfSBB0+1aoKq3rhQd09y TJsCH9+RY+jhhuJlVUvShHpeKQy/UDCvnGAwcfmRn+uQf6C9P5ivi2iJfDFfaYODsHGtfsK95EK POX0CQkA0U+Sgsp8Ccl7OvL1avywSfrC2cLnt+KE3ozYOwy5u4AOlwMHt0EEMkcf6UAJ9/rpdB+ 2ag3fhY5Lxots= X-Google-Smtp-Source: AKy350Y/ztfBTpaxswzpYlhnRokanjnwvwIKpEEbNey2UIY/AnxQ9CpItZN+i4lMBZeuvNLmPEPCUw== X-Received: by 2002:a17:906:fa18:b0:928:796d:71e8 with SMTP id lo24-20020a170906fa1800b00928796d71e8mr5343112ejb.3.1681672361270; Sun, 16 Apr 2023 12:12:41 -0700 (PDT) Received: from perf-sql133-029021.hosts.secretcdn.net ([2620:11a:c018:0:ea8:be91:8d1:f59b]) by smtp.gmail.com with ESMTPSA id mp30-20020a1709071b1e00b00947ed087a2csm5463902ejc.154.2023.04.16.12.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 12:12:41 -0700 (PDT) From: Joe Damato To: intel-wired-lan@lists.osuosl.org Date: Sun, 16 Apr 2023 19:12:22 +0000 Message-Id: <20230416191223.394805-2-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230416191223.394805-1-jdamato@fastly.com> References: <20230416191223.394805-1-jdamato@fastly.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1681672361; x=1684264361; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PWA/HXzUdJz0H+XyZalEsfv+ELOZVQCrtHlubc/pGGk=; b=EhtLWp8bAj3+4DQEtWBmbwW3pMm5Niq1GLUU5LK/4TgCbLiNIF+JkwbO5Sruaq1TIJ euf3f8UBh8u1GgCADAc/+TO7Ke8H8XSy85Os95KcuVbrYcTpKX6nlV5Ge42FxzXSVw3T mfd2+aR3PDKkfeImiEVXsnLwUEcarQfRzahr8= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.a=rsa-sha256 header.s=google header.b=EhtLWp8b Subject: [Intel-wired-lan] [PATCH net v2 1/2] ixgbe: Allow flow hash to be set via ethtool X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Joe Damato , jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, kuba@kernel.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" ixgbe currently returns `EINVAL` whenever the flowhash it set by ethtool because the ethtool code in the kernel passes a non-zero value for hfunc that ixgbe should allow. When ethtool is called with `ETHTOOL_SRXFHINDIR`, `ethtool_set_rxfh_indir` will call ixgbe's set_rxfh function with `ETH_RSS_HASH_NO_CHANGE`. This value should be accepted. When ethtool is called with `ETHTOOL_SRSSH`, `ethtool_set_rxfh` will call ixgbe's set_rxfh function with `rxfh.hfunc`, which appears to be hardcoded in ixgbe to always be `ETH_RSS_HASH_TOP`. This value should also be accepted. Before this patch: $ sudo ethtool -L eth1 combined 10 $ sudo ethtool -X eth1 default Cannot set RX flow hash configuration: Invalid argument After this patch: $ sudo ethtool -L eth1 combined 10 $ sudo ethtool -X eth1 default $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 10 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 0 1 2 3 4 5 16: 6 7 8 9 0 1 2 3 24: 4 5 6 7 8 9 0 1 ... Signed-off-by: Joe Damato Reviewed-by: Sridhar Samudrala Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 6cfc9dc16537..821dfd323fa9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -3131,8 +3131,8 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir, int i; u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter); - if (hfunc) - return -EINVAL; + if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP) + return -EOPNOTSUPP; /* Fill out the redirection table */ if (indir) { From patchwork Sun Apr 16 09:12:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 1769383 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=BvwuKG6B; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q00FN3Xz8z1yZt for ; Mon, 17 Apr 2023 05:12:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C1A3160D76; Sun, 16 Apr 2023 19:12:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C1A3160D76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1681672374; bh=13wTTCRfs6BggW7kad7NBEqEuJQXcfrFSxN01KVewDg=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=BvwuKG6BbNgu2UI8I4bhrq8QrY+a2KPriDnhbADz8MwErI9BTxFdymsAwn+fhLWwi L0WQ/3PJQAfnmEuV8SJl7pFF48XWaSn15sjfG6/Jro3MpSU81M5tueRp9HJQiWefB8 K2wTlFwh7fAnKEmR6po9D4Wvol2n/YRIEBetxBiJq8iT83sQIS9jNhNOz27RuqDDy7 J7bk/jc3N/J60VqFotHxW9BXZkZVk7OcTgm9XvU36G4ed2uHy/s6YMt2ob7pZL5IJj 8FfEIloEI1F1/5fJ5i1q9o9uJjmGW/EqBdDInHezPmMFcAAM3fd6a5zJ2NNrCIfEX2 XWiFvvYA6ynAQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i9hb42jPSvCR; Sun, 16 Apr 2023 19:12:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 5A3A060E07; Sun, 16 Apr 2023 19:12:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5A3A060E07 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 761B21BF425 for ; Sun, 16 Apr 2023 19:12:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4FCAB83F7A for ; Sun, 16 Apr 2023 19:12:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4FCAB83F7A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L7ryNK98rJmy for ; Sun, 16 Apr 2023 19:12:45 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 16DF783F7F Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by smtp1.osuosl.org (Postfix) with ESMTPS id 16DF783F7F for ; Sun, 16 Apr 2023 19:12:45 +0000 (UTC) Received: by mail-ej1-x636.google.com with SMTP id a5so2233177ejb.6 for ; Sun, 16 Apr 2023 12:12:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681672363; x=1684264363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JBI5K6bw4SvoX3pffpUrylhUkU0H5a5frJVHksq/+kw=; b=RZ7HJuB8lbvTFO4d/XM/P7l2hW6KwEYNEYwlObQqyHFhMzNEO43ukHyJdxZhZ2P0wH mBNsYvNClyX2cv4sBzg5vl/qCbu682wtHvw3tLLNq//3xkr+Tnkq2eZVUMin8/nkbOBA lUCaj2FW0A8GOzO+FWYnyRmHYxdRibQuMeevJz8k2Jj/HzreYbc18kQI2JKfwRYZNiuA 056C7XVDmawHWToxbufM0MF7om0AQu0b6zmQHDca7JOBVasa+VaMZCzNr3JR1EgwSNLv 67p0zXSzUMEngNfsDdmfNjZYmk1YL+ldeF1Ff/NO37o+WrJ+WVBWj1qy3/37MP5Qsk+d ap7A== X-Gm-Message-State: AAQBX9fIL6eMiox+o66eY5Zn7xilDcRsEHc5dBaHij8yzTv0tAfrPAHV Xgh0QoXRj6mhZ57Uh4gt2A1AvU9S5aL/UccK2fIXs7gGUGhNDILmCaOvqucnRPS/ZUpveDtnKHU mGPV+UdB42DJyJ1cPciFROOe4mCg+sAr4FMPAl+ywZw+uUYZYot/w3dohoCH8rxxixKld/2RCVu tUarkb3RsIFVA= X-Google-Smtp-Source: AKy350aO+NbcGp82J5fQqKPJh0SAXUZ9bU+rWkTbDMbBelt2yvWkt/E4OrsuqMlme33J2SkphBmKPA== X-Received: by 2002:a17:906:3e1b:b0:94d:69e0:6098 with SMTP id k27-20020a1709063e1b00b0094d69e06098mr6293702eji.45.1681672362984; Sun, 16 Apr 2023 12:12:42 -0700 (PDT) Received: from perf-sql133-029021.hosts.secretcdn.net ([2620:11a:c018:0:ea8:be91:8d1:f59b]) by smtp.gmail.com with ESMTPSA id mp30-20020a1709071b1e00b00947ed087a2csm5463902ejc.154.2023.04.16.12.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 12:12:42 -0700 (PDT) From: Joe Damato To: intel-wired-lan@lists.osuosl.org Date: Sun, 16 Apr 2023 19:12:23 +0000 Message-Id: <20230416191223.394805-3-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230416191223.394805-1-jdamato@fastly.com> References: <20230416191223.394805-1-jdamato@fastly.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1681672363; x=1684264363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JBI5K6bw4SvoX3pffpUrylhUkU0H5a5frJVHksq/+kw=; b=RLsRMBIr1wdOpvh3bolgOXunv2QTYaErelksdF8qUbpzPdEaio5caTPQed6QnqM5V4 oBwBOvlI4rOpzdi0GvgkqfaaXEKK6jZVZB343Yq5DG8+FlK5XtnK6aVxI21BFhQn8Ksy Y9gOaBjsR7UfYQFtzw9fK+iW2FtULNiIJITi0= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.a=rsa-sha256 header.s=google header.b=RLsRMBIr Subject: [Intel-wired-lan] [PATCH net v2 2/2] ixgbe: Enable setting RSS table to default values X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Joe Damato , jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, kuba@kernel.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" ethtool uses `ETHTOOL_GRXRINGS` to compute how many queues are supported by RSS. The driver should return the smaller of either: - The maximum number of RSS queues the device supports, OR - The number of RX queues configured Prior to this change, running `ethtool -X $iface default` fails if the number of queues configured is larger than the number supported by RSS, even though changing the queue count correctly resets the flowhash to use all supported queues. Other drivers (for example, i40e) will succeed but the flow hash will reset to support the maximum number of queues supported by RSS, even if that amount is smaller than the configured amount. Prior to this change: $ sudo ethtool -L eth1 combined 20 $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 20 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 24: 8 9 10 11 12 13 14 15 32: 0 1 2 3 4 5 6 7 ... You can see that the flowhash was correctly set to use the maximum number of queues supported by the driver (16). However, asking the NIC to reset to "default" fails: $ sudo ethtool -X eth1 default Cannot set RX flow hash configuration: Invalid argument After this change, the flowhash can be reset to default which will use all of the available RSS queues (16) or the configured queue count, whichever is smaller. Starting with eth1 which has 10 queues and a flowhash distributing to all 10 queues: $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 10 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 0 1 2 3 4 5 16: 6 7 8 9 0 1 2 3 ... Increasing the queue count to 48 resets the flowhash to distribute to 16 queues, as it did before this patch: $ sudo ethtool -L eth1 combined 48 $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 16 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 ... Due to the other bugfix in this series, the flowhash can be set to use queues 0-5: $ sudo ethtool -X eth1 equal 5 $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 16 RX ring(s): 0: 0 1 2 3 4 0 1 2 8: 3 4 0 1 2 3 4 0 16: 1 2 3 4 0 1 2 3 ... Due to this bugfix, the flowhash can be reset to default and use 16 queues: $ sudo ethtool -X eth1 default $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 16 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 ... Signed-off-by: Joe Damato Reviewed-by: Sridhar Samudrala Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 821dfd323fa9..0bbad4a5cc2f 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -2665,6 +2665,14 @@ static int ixgbe_get_rss_hash_opts(struct ixgbe_adapter *adapter, return 0; } +static int ixgbe_rss_indir_tbl_max(struct ixgbe_adapter *adapter) +{ + if (adapter->hw.mac.type < ixgbe_mac_X550) + return 16; + else + return 64; +} + static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, u32 *rule_locs) { @@ -2673,7 +2681,8 @@ static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, switch (cmd->cmd) { case ETHTOOL_GRXRINGS: - cmd->data = adapter->num_rx_queues; + cmd->data = min_t(int, adapter->num_rx_queues, + ixgbe_rss_indir_tbl_max(adapter)); ret = 0; break; case ETHTOOL_GRXCLSRLCNT: @@ -3075,14 +3084,6 @@ static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) return ret; } -static int ixgbe_rss_indir_tbl_max(struct ixgbe_adapter *adapter) -{ - if (adapter->hw.mac.type < ixgbe_mac_X550) - return 16; - else - return 64; -} - static u32 ixgbe_get_rxfh_key_size(struct net_device *netdev) { return IXGBE_RSS_KEY_SIZE;