From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 147DE1E298 for ; Tue, 12 Jun 2018 03:46:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 18:46:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,212,1526367600"; d="scan'208";a="236613508" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 11 Jun 2018 18:46:16 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 18:46:16 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 18:46:16 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.87]) with mapi id 14.03.0319.002; Tue, 12 Jun 2018 09:46:14 +0800 From: "Lu, Wenzhuo" To: "Zhao1, Wei" CC: "stable@dpdk.org" , "Adrien Mazarguil (adrien.mazarguil@6wind.com)" Thread-Topic: [PATCH] net/ixgbe: add query rule stats support for FDIR Thread-Index: AQHT/LAyDmJb/4W4DkWimcggue8ayaRb4gpw Date: Tue, 12 Jun 2018 01:46:13 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B7E83BB@shsmsx102.ccr.corp.intel.com> References: <1528189935-34943-1-git-send-email-wei.zhao1@intel.com> <1528189935-34943-2-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1528189935-34943-2-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH] net/ixgbe: add query rule stats support for FDIR X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 01:46:18 -0000 Hi Wei, > -----Original Message----- > From: Zhao1, Wei > Sent: Tuesday, June 5, 2018 5:12 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; stable@dpdk.org; Zhao1, Wei > > Subject: [PATCH] net/ixgbe: add query rule stats support for FDIR >=20 > There are many registeres in x550 support stats of flow director filters,= for > example the number of added or removed rules and the number match or > miss match packet count for this for port, all these important informatio= n > can be read form registeres in x550 and display with command xstats. >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 87d2ad0..cb95865 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3122,6 +3122,13 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw, > /* Flow Director Stats registers */ > hw_stats->fdirmatch +=3D IXGBE_READ_REG(hw, IXGBE_FDIRMATCH); > hw_stats->fdirmiss +=3D IXGBE_READ_REG(hw, IXGBE_FDIRMISS); > + hw_stats->fdirustat_add +=3D IXGBE_READ_REG(hw, IXGBE_FDIRUSTAT) > & 0xFFFF; > + hw_stats->fdirustat_remove +=3D (IXGBE_READ_REG(hw, > IXGBE_FDIRUSTAT) >> > + 16) & 0xFFFF; > + hw_stats->fdirfstat_fadd +=3D IXGBE_READ_REG(hw, IXGBE_FDIRFSTAT) > & > + 0xFFFF; > + hw_stats->fdirfstat_fremove +=3D (IXGBE_READ_REG(hw, > IXGBE_FDIRFSTAT) >> > + 16) & 0xFFFF; Although looks better to get these stats, but 2 concerns here. 1, Most probably 82598 doesn't support these registers, should check the ma= c type here? 2, Looks like this info is not helpful to the users, because we cannot pass= it to the APP. Please check 'rte_eth_stats_get', you will find rte layer d= oesn't expose the fdir stats.=20 You see the old fdir APIs have the stats, like RTE_ETH_FILTER_STATS. As we= plan to use rte_flow to replace the old APIs, maybe we need think about ho= w to move the stats into rte_flow.