From: Stephen Hemminger <stephen@networkplumber.org>
To: "Robin Jarry" <rjarry@redhat.com>
Cc: dev@dpdk.org, "Morten Brørup" <mb@smartsharesystems.com>,
"Kevin Laatz" <kevin.laatz@intel.com>
Subject: Re: [PATCH v7 1/5] eal: add lcore info in telemetry
Date: Tue, 31 Jan 2023 08:41:41 -0800 [thread overview]
Message-ID: <20230131084141.7dac021c@hermes.local> (raw)
In-Reply-To: <CQ69YD5I3PGE.1N5SJ2W2E5T9S@ringo>
On Tue, 31 Jan 2023 10:40:08 +0100
"Robin Jarry" <rjarry@redhat.com> wrote:
> Hi Stephen,
>
> Stephen Hemminger, Jan 26, 2023 at 18:03:
> > Alternatively, you could should check for lcore out of range.
> >
> > Simplified as:
> > struct lcore_telemetry_info info = { .d = d };
> > char *endptr; // init not really needed
> >
> > if (params == NULL) // length check can be handled later
> > return -EINVAL;
> >
> > info.lcore_id = strtoul(params, &endptr, 10);
> >
> > if (*params == '\0' || *endptr != '\0 ||
> > info.lcore_id >= RTE_MAX_LCORE)
> > return -EINVAL;
>
> Ok that may be more exhaustive. But even if the lcore_id is out of
> range, it will not be matched by the callback.
>
> Do you think it warrants sending a v8 of the whole series just for this?
The reason for the range check is to avoid wraparound.
Actually, you need a temp variable there since lcore_id is
uint16_t and unsigned long is 64 bits on most platforms.
next prev parent reply other threads:[~2023-01-31 16:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 15:20 [PATCH v7 0/5] lcore telemetry improvements Robin Jarry
2023-01-26 15:20 ` [PATCH v7 1/5] eal: add lcore info in telemetry Robin Jarry
2023-01-26 17:03 ` Stephen Hemminger
2023-01-31 9:40 ` Robin Jarry
2023-01-31 16:41 ` Stephen Hemminger [this message]
2023-01-26 15:20 ` [PATCH v7 2/5] eal: report applications lcore usage Robin Jarry
2023-01-26 15:20 ` [PATCH v7 3/5] app/testpmd: add dump command for lcores Robin Jarry
2023-01-26 15:20 ` [PATCH v7 4/5] app/testpmd: report lcore usage Robin Jarry
2023-01-26 15:20 ` [PATCH v7 5/5] eal: add lcore usage telemetry endpoint Robin Jarry
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=20230131084141.7dac021c@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=kevin.laatz@intel.com \
--cc=mb@smartsharesystems.com \
--cc=rjarry@redhat.com \
/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.