From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 545381DE92 for ; Tue, 12 Jun 2018 03:51:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 18:51:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,212,1526367600"; d="scan'208";a="56549723" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by FMSMGA003.fm.intel.com with ESMTP; 11 Jun 2018 18:51:35 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.131]) by PGSMSX108.gar.corp.intel.com ([169.254.8.114]) with mapi id 14.03.0319.002; Tue, 12 Jun 2018 09:51:34 +0800 From: "Zhao1, Wei" To: "Lu, Wenzhuo" 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/LAybes0+QWNKkCs9PGquqlsKqRbXs2AgACGkzA= Date: Tue, 12 Jun 2018 01:51:33 +0000 Message-ID: References: <1528189935-34943-1-git-send-email-wei.zhao1@intel.com> <1528189935-34943-2-git-send-email-wei.zhao1@intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B7E83BB@shsmsx102.ccr.corp.intel.com> In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B7E83BB@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [172.30.20.205] 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:51:39 -0000 Hi,Wenzhuo > -----Original Message----- > From: Lu, Wenzhuo > Sent: Tuesday, June 12, 2018 9:46 AM > To: Zhao1, Wei > Cc: stable@dpdk.org; Adrien Mazarguil (adrien.mazarguil@6wind.com) > > Subject: RE: [PATCH] net/ixgbe: add query rule stats support for FDIR >=20 > Hi Wei, >=20 > > -----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 > > > > 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 information can be read form registeres in x550 and display w= ith > command xstats. > > > > Signed-off-by: Wei Zhao > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > 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 > mac type here? Yes, we need to check mac type , I will add that. > 2, Looks like this info is not helpful to the users, because we cannot pa= ss it to > the APP. Please check 'rte_eth_stats_get', you will find rte layer doesn'= t > expose the fdir stats. > 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 > how to move the stats into rte_flow. This stats is useful when using testpmd, it will be display in "show port 0= xstats ", I have use it in that way, very useful.