All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zaiyu Wang" <zaiyuwang@trustnetic.com>
To: "'Jiawen Wu'" <jiawenwu@trustnetic.com>,
	"'Stephen Hemminger'" <stephen@networkplumber.org>,
	<dev@dpdk.org>
Subject: RE: [RFC 2/5] net/ngbe: fix query handling in xstats_get
Date: Wed, 25 Dec 2024 19:33:45 +0800	[thread overview]
Message-ID: <001201db56c0$dc0164b0$94042e10$@trustnetic.com> (raw)
In-Reply-To: <01b101db56aa$4b807360$e2815a20$@trustnetic.com>

> 
> Cc: Zaiyu Wang <zaiyuwang@net-swift.com>
> 
> > -----Original Message-----
> > From: Stephen Hemminger <stephen@networkplumber.org>
> > Sent: Thursday, December 5, 2024 6:19 AM
> > To: dev@dpdk.org
> > Cc: jiawenwu@trustnetic.com
> > Subject: Re: [RFC 2/5] net/ngbe: fix query handling in xstats_get
> >
> > On Tue,  8 Oct 2024 08:59:56 -0700
> > Stephen Hemminger <stephen@networkplumber.org> wrote:
> >
> > > The xstats_get function in this driver did not act the same as other
> > > drivers when queried. The correct check is to look at the requested
> > > number of stats and compare it to the available stats and if the
> > > request is too small, return the correct size.
> > >
> > > Bugzilla ID: 1560
> > > Fixes: 8b433d04adc9 ("net/ngbe: support device xstats")
> > > Cc: jiawenwu@trustnetic.com
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> > This needs to be tested on this hardware before merging.
> >
> 
Hi Stephen Hemminger,

We have tested this patch for ngbe&txgbe driver with the corresponding
hardware.
But this patch can't fix the bug reported in Bugzilla. In fact, most
applications,
including telemetry, call rte_eth_xstats_get twice, fist to get num of
xstats and then
to get the full xstats data.

This bug appeared after dpdk-22.11 because rte_tel_data_add_dict_string
restricted
the characters in dicts, and '[' and ']' were no longer allowed to be used,
so ngbe&txgbe
could not print xstats by telemetry. 

For more details about this restriction, please see:
https://patches.dpdk.org/project/dpdk/patch/20220909093523.471727-2-bruce.ri
chardson@intel.com/

And here is the code in ngbe for setting xstats name, which add '[' and ']'
in them:

static inline int
ngbe_get_name_by_id(uint32_t id, char *name, uint32_t size)
{
...
	if (id < NGBE_NB_HW_STATS) {
		snprintf(name, size, "[hw]%s",
			rte_ngbe_stats_strings[id].name);
		return 0;
	}

To save this issue, could we add '[' and ']' to the allowed characters of
telemetry? Or we
must change the xstats name in ngbe&txgbe driver?	

Thanks.


  reply	other threads:[~2024-12-25 11:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 15:59 [RFC 0/5] make PMD xstat_get alike Stephen Hemminger
2024-10-08 15:59 ` [RFC 1/5] net/txgbe: fix query handling in xstats_get Stephen Hemminger
2024-10-09  8:00   ` Jiawen Wu
2024-10-08 15:59 ` [RFC 2/5] net/ngbe: " Stephen Hemminger
2024-12-04 22:19   ` Stephen Hemminger
2024-12-25  8:52     ` Jiawen Wu
2024-12-25 11:33       ` Zaiyu Wang [this message]
2024-10-08 15:59 ` [RFC 3/5] net/atlantic: fix handling of xstats_get Stephen Hemminger
2024-10-08 15:59 ` [RFC 4/5] net/octeontx: " Stephen Hemminger
2024-12-04 22:19   ` Stephen Hemminger
2024-10-08 15:59 ` [RFC 5/5] net/sfc: fix handling of xstats_get queries Stephen Hemminger
2024-12-04 22:18   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001201db56c0$dc0164b0$94042e10$@trustnetic.com' \
    --to=zaiyuwang@trustnetic.com \
    --cc=dev@dpdk.org \
    --cc=jiawenwu@trustnetic.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.