Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp969670ybh; Wed, 11 Mar 2020 14:40:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuYIkLc1+07ufLCzmHE1qcPefSnNBWNh+4zdvE1y55XbJa0p/qt16EfX1WbzpvfN8E88vzx X-Received: by 2002:aca:7512:: with SMTP id q18mr493931oic.71.1583962847673; Wed, 11 Mar 2020 14:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583962847; cv=none; d=google.com; s=arc-20160816; b=uGfwlX2IPPyC7WkjONRCTJJvMkyOnmQTc88EvQHvv9LpQEFI7bbzYzAuQlXWbilQOV rVTs2zZ3NSkesHZmwvTBe32jTwUpKkX045b2+TTcPYDf8KzLeS5BJaw3eISpaKaOTdsM bie+DsRjc+Zi5slySRYv74LSEAeI4LZlHMb66QXkZfYHKKOcr4niiSCJHEOwpk1a5xUY roehn48aD1RAgCWlYHZzyazRr7zt+NOgv4bJ9Jd/IvBAk/hQlXeRj2PV4D94i6G9LbrM 86WNjgBhMwDcTvMcC/oSZrqHQnWg+6sbUGtuKYMlV/5SGx0wOXA5D2rOIE9dDph/HfEJ 7IuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id; bh=0OLti8kz6yqNBPY13uzMXHXED2Tui6cO8gS0ZTeURBo=; b=fcPkxQJKm3MkxpPii8A9JCEfbMs17WCNTQ3ByA6ncWYepvasGYsyf+ujq5DNMJYnwy Bo2i7NYKs1uT9AYr3L5JxAPWD81+S9UM6X24lx/YX+JBbhlDMnwTMfBkoJqLpvWmIGES hpp1rrZkyjEnmr4pAiitRAhMYCBjkisBkzIl9u/Im+G7v6l9WHnnLV0Yij4jmL3WHtPc 7GaWMfMvs8tDeUjI47s+38xvfj5FlJkryLBXMPl10GAcVWLDMvUFQUrYyXVbDFvFzbAo vVHI/EkrIUb1VPzRs3TrnsSgBi57dTwptmUSeFmbIpf5nXfCA1jFlKuvmktODv+5O+d5 JlvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si1693464otc.153.2020.03.11.14.40.35; Wed, 11 Mar 2020 14:40:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387475AbgCKVkP (ORCPT + 99 others); Wed, 11 Mar 2020 17:40:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:46178 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729418AbgCKVkP (ORCPT ); Wed, 11 Mar 2020 17:40:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 92BB0ACB1; Wed, 11 Mar 2020 21:40:13 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 3DA93E0C0A; Wed, 11 Mar 2020 22:40:13 +0100 (CET) Message-Id: In-Reply-To: References: From: Michal Kubecek Subject: [PATCH net-next 02/15] ethtool: update mapping of features to legacy ioctl requests To: David Miller , netdev@vger.kernel.org Cc: Jakub Kicinski , Jiri Pirko , Andrew Lunn , Florian Fainelli , John Linville , Johannes Berg , linux-kernel@vger.kernel.org Date: Wed, 11 Mar 2020 22:40:13 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Legacy ioctl request like ETHTOOL_GTXCSUM are still used by ethtool utility to get values of legacy flags (which rather work as feature groups). These are calculated from values of actual features and request to set them is implemented as an attempt to set all features mapping to them but there are two inconsistencies: - tx-checksum-fcoe-crc is shown under tx-checksumming but NETIF_F_FCOE_CRC is not included in ETHTOOL_GTXCSUM/ETHTOOL_STXCSUM - tx-scatter-gather-fraglist is shown under scatter-gather but NETIF_F_FRAGLIST is not included in ETHTOOL_GSG/ETHTOOL_SSG As the mapping in ethtool output is more correct from logical point of view, fix ethtool_get_feature_mask() to match it. Signed-off-by: Michal Kubecek --- net/ethtool/ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index b2684ffa26de..ae97c82c7052 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -198,13 +198,14 @@ static netdev_features_t ethtool_get_feature_mask(u32 eth_cmd) switch (eth_cmd) { case ETHTOOL_GTXCSUM: case ETHTOOL_STXCSUM: - return NETIF_F_CSUM_MASK | NETIF_F_SCTP_CRC; + return NETIF_F_CSUM_MASK | NETIF_F_FCOE_CRC_BIT | + NETIF_F_SCTP_CRC; case ETHTOOL_GRXCSUM: case ETHTOOL_SRXCSUM: return NETIF_F_RXCSUM; case ETHTOOL_GSG: case ETHTOOL_SSG: - return NETIF_F_SG; + return NETIF_F_SG | NETIF_F_FRAGLIST; case ETHTOOL_GTSO: case ETHTOOL_STSO: return NETIF_F_ALL_TSO; -- 2.25.1