Received: by 10.192.165.148 with SMTP id m20csp5269321imm; Tue, 1 May 2018 11:59:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo9HmNv2uOkrhL2in2YT43dmXcvZVJrY9jDgh2vYlwiYvAAg41l8tDeaWYNf4qOS8eABBwK X-Received: by 2002:a63:a60a:: with SMTP id t10-v6mr14052660pge.357.1525201144208; Tue, 01 May 2018 11:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525201144; cv=none; d=google.com; s=arc-20160816; b=KSiQg4d1Z+6lmgG8NiGK/excAkXJHl8BvCngCw7ZRf0b8po99rRFzEB5SME9nGyJfW 0fEg4Z3CNyjiBKVARmqWZKFxlBUmHpYRr9JEIXjxiHDCCfMHzo+D+VOx+GMCZG5DDAA3 71RgRZzX7VMax7mWLrWE+9RnR9rYMjztXI4XoxqvNrQDfG9B/lI6tOZzE7C6a1kckFuM OyrKDWK6fh0DbNdzRIDqgGIqlVtfaoO9ljiGxiytyUu610JRMvBQYkc7vQfJLlDRexAF F3sLvIVQUYBDlmjvfeWpWHTnfeiukLvQtCTD8NE754Baob+q20FFoYQBaNeY9IxOvVl3 ZhKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=KeWJSNFJw1Zr4WwMReLZu2151LaGTYA0+W98xWMxvZw=; b=yndClBfIjh+xxn3zEPF0LGuPTBDSGiJbqbFtgc82ihWpInK1HNmg7asobBKXxiXPM+ 6xSdRoCn3ScAYPSco6khhpFRH6BkCGuG3lE0CorBQeWjnJbW0z5vKKHsew9/eY7yGa2z GlVtXixo6QYEXYX8jS0yd0jR2M6IJ+vGYFhGVaVBr3pGg+1+a9kB/RGTpUj0SQq+vKmA KP2j4uW+F6BenD8LaAvltdTP1H7VF53gAaA//S6yC1IEdhsXcUzPSbAuG9fQ8aN2kcmc SmxNugCBnxOpVDAFMdm90Fkx05wembRNrqMWYKGarHR8lmqyukB0n0SH4ArgeGHXLJRT ENYA== 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 k6-v6si2128450pla.509.2018.05.01.11.58.49; Tue, 01 May 2018 11:59:04 -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 S1756710AbeEAS62 (ORCPT + 99 others); Tue, 1 May 2018 14:58:28 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7645 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756247AbeEAS6U (ORCPT ); Tue, 1 May 2018 14:58:20 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 87F09E0C26278; Wed, 2 May 2018 02:58:07 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.46) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.361.1; Wed, 2 May 2018 02:57:59 +0800 From: Salil Mehta To: CC: , , , , , , , Xi Wang Subject: [PATCH net-next 9/9] net: hns3: Remove packet statistics in the range of 8192~12287 Date: Tue, 1 May 2018 19:56:05 +0100 Message-ID: <20180501185605.9584-10-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180501185605.9584-1-salil.mehta@huawei.com> References: <20180501185605.9584-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.46] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xi Wang Because the current statistics for size 8192~12287 are only valid for GE, the ranges of 8192~9216 and 9217~12287 are valid only for LGE/CGE, and are always 0 for GE interfaces. it is easy to cause confusion when viewing the packet statistics using the command ethtool -S. This patch removes the 8192~12287 range of packet statistics and uses the 8192~9216 and 9217~12287 ranges for statistics. This change depends on the firmware upgrade. Signed-off-by: Xi Wang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ---- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 12 ++++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 77d9e4c0..dd5d65c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -304,8 +304,6 @@ static const struct hclge_comm_stats_str g_mac_stats_string[] = { HCLGE_MAC_STATS_FIELD_OFF(mac_tx_2048_4095_oct_pkt_num)}, {"mac_tx_4096_8191_oct_pkt_num", HCLGE_MAC_STATS_FIELD_OFF(mac_tx_4096_8191_oct_pkt_num)}, - {"mac_tx_8192_12287_oct_pkt_num", - HCLGE_MAC_STATS_FIELD_OFF(mac_tx_8192_12287_oct_pkt_num)}, {"mac_tx_8192_9216_oct_pkt_num", HCLGE_MAC_STATS_FIELD_OFF(mac_tx_8192_9216_oct_pkt_num)}, {"mac_tx_9217_12287_oct_pkt_num", @@ -356,8 +354,6 @@ static const struct hclge_comm_stats_str g_mac_stats_string[] = { HCLGE_MAC_STATS_FIELD_OFF(mac_rx_2048_4095_oct_pkt_num)}, {"mac_rx_4096_8191_oct_pkt_num", HCLGE_MAC_STATS_FIELD_OFF(mac_rx_4096_8191_oct_pkt_num)}, - {"mac_rx_8192_12287_oct_pkt_num", - HCLGE_MAC_STATS_FIELD_OFF(mac_rx_8192_12287_oct_pkt_num)}, {"mac_rx_8192_9216_oct_pkt_num", HCLGE_MAC_STATS_FIELD_OFF(mac_rx_8192_9216_oct_pkt_num)}, {"mac_rx_9217_12287_oct_pkt_num", diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h index 6432f754..b7ee91d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h @@ -408,9 +408,9 @@ struct hclge_mac_stats { u64 mac_tx_1519_2047_oct_pkt_num; u64 mac_tx_2048_4095_oct_pkt_num; u64 mac_tx_4096_8191_oct_pkt_num; - u64 mac_tx_8192_12287_oct_pkt_num; /* valid for GE MAC only */ - u64 mac_tx_8192_9216_oct_pkt_num; /* valid for LGE & CGE MAC only */ - u64 mac_tx_9217_12287_oct_pkt_num; /* valid for LGE & CGE MAC */ + u64 rsv0; + u64 mac_tx_8192_9216_oct_pkt_num; + u64 mac_tx_9217_12287_oct_pkt_num; u64 mac_tx_12288_16383_oct_pkt_num; u64 mac_tx_1519_max_good_oct_pkt_num; u64 mac_tx_1519_max_bad_oct_pkt_num; @@ -435,9 +435,9 @@ struct hclge_mac_stats { u64 mac_rx_1519_2047_oct_pkt_num; u64 mac_rx_2048_4095_oct_pkt_num; u64 mac_rx_4096_8191_oct_pkt_num; - u64 mac_rx_8192_12287_oct_pkt_num;/* valid for GE MAC only */ - u64 mac_rx_8192_9216_oct_pkt_num; /* valid for LGE & CGE MAC only */ - u64 mac_rx_9217_12287_oct_pkt_num; /* valid for LGE & CGE MAC only */ + u64 rsv1; + u64 mac_rx_8192_9216_oct_pkt_num; + u64 mac_rx_9217_12287_oct_pkt_num; u64 mac_rx_12288_16383_oct_pkt_num; u64 mac_rx_1519_max_good_oct_pkt_num; u64 mac_rx_1519_max_bad_oct_pkt_num; -- 2.7.4