[dpdk-stable] [PATCH] net/ixgbe: add query rule stats support for FDIR
Zhao1, Wei
wei.zhao1 at intel.com
Tue Jun 12 03:51:33 CEST 2018
Hi,Wenzhuo
> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Tuesday, June 12, 2018 9:46 AM
> To: Zhao1, Wei <wei.zhao1 at intel.com>
> Cc: stable at dpdk.org; Adrien Mazarguil (adrien.mazarguil at 6wind.com)
> <adrien.mazarguil at 6wind.com>
> Subject: RE: [PATCH] net/ixgbe: add query rule stats support for FDIR
>
> Hi Wei,
>
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Tuesday, June 5, 2018 5:12 PM
> > To: dev at dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; stable at dpdk.org; Zhao1, Wei
> > <wei.zhao1 at intel.com>
> > 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 with
> command xstats.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
> > ---
> > 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 += IXGBE_READ_REG(hw, IXGBE_FDIRMATCH);
> > hw_stats->fdirmiss += IXGBE_READ_REG(hw, IXGBE_FDIRMISS);
> > + hw_stats->fdirustat_add += IXGBE_READ_REG(hw,
> IXGBE_FDIRUSTAT)
> > & 0xFFFF;
> > + hw_stats->fdirustat_remove += (IXGBE_READ_REG(hw,
> > IXGBE_FDIRUSTAT) >>
> > + 16) & 0xFFFF;
> > + hw_stats->fdirfstat_fadd += IXGBE_READ_REG(hw,
> IXGBE_FDIRFSTAT)
> > &
> > + 0xFFFF;
> > + hw_stats->fdirfstat_fremove += (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 pass 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.
More information about the stable
mailing list