From: Stephen Hemminger <stephen@networkplumber.org>
To: Paolo Lungaroni <paolo.lungaroni@uniroma2.it>
Cc: David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Stefano Salsano <stefano.salsano@uniroma2.it>,
Ahmed Abdelsalam <ahabdels.dev@gmail.com>,
Andrea Mayer <andrea.mayer@uniroma2.it>
Subject: Re: [iproute2-next v1] seg6: add support for flavors in SRv6 End* behaviors
Date: Sun, 12 Jun 2022 09:10:19 -0700 [thread overview]
Message-ID: <20220612091019.6223bf9a@hermes.local> (raw)
In-Reply-To: <20220611110645.29434-1-paolo.lungaroni@uniroma2.it>
On Sat, 11 Jun 2022 13:06:45 +0200
Paolo Lungaroni <paolo.lungaroni@uniroma2.it> wrote:
> + strlcpy(wbuf, buf, SEG6_LOCAL_FLV_BUF_SIZE);
> + wbuf[SEG6_LOCAL_FLV_BUF_SIZE - 1] = 0;
> +
> + if (strlen(wbuf) == 0)
> + return -1;
If you use strdupa() then you don't have to worry about buffer sizes.
+ else {
+ if (fnumber++ == 0)
+ fprintf(fp, "%s", flv_name);
+ else
+ fprintf(fp, ",%s", flv_name);
+ }
Minor nits. I am trying to get rid of use of passing fp around
and just use print_string() everywhere. That way can do quick scan
for places still using 'fprintf(fp' as indicator of old code
that was never updated to use JSON.
Also, it looks the output of multiple flavors does not match
the input command line for multiple flavors.
next prev parent reply other threads:[~2022-06-12 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-11 11:06 [iproute2-next v1] seg6: add support for flavors in SRv6 End* behaviors Paolo Lungaroni
2022-06-12 16:10 ` Stephen Hemminger [this message]
2022-06-16 16:45 ` Paolo Lungaroni
2022-06-13 12:54 ` Anton Makarov
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=20220612091019.6223bf9a@hermes.local \
--to=stephen@networkplumber.org \
--cc=ahabdels.dev@gmail.com \
--cc=andrea.mayer@uniroma2.it \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paolo.lungaroni@uniroma2.it \
--cc=stefano.salsano@uniroma2.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).