From: Ido Schimmel <idosch@idosch.org>
To: Zahari Doychev <zahari.doychev@linux.com>
Cc: netdev@vger.kernel.org, dsahern@gmail.com,
stephen@networkplumber.org, hmehrtens@maxlinear.com,
aleksander.lobakin@intel.com, simon.horman@corigine.com,
Zahari Doychev <zdoychev@maxlinear.com>
Subject: Re: [PATCH iproute2-next v2] f_flower: add cfm support
Date: Wed, 21 Jun 2023 09:00:45 +0300 [thread overview]
Message-ID: <ZJKSDdC+YNlvCXVv@shredder> (raw)
In-Reply-To: <20230620201036.539994-1-zahari.doychev@linux.com>
On Tue, Jun 20, 2023 at 10:10:36PM +0200, Zahari Doychev wrote:
> From: Zahari Doychev <zdoychev@maxlinear.com>
>
> Add support for matching on CFM Maintenance Domain level and opcode.
[...]
>
> Signed-off-by: Zahari Doychev <zdoychev@maxlinear.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Few comments I missed earlier
> ---
> include/uapi/linux/pkt_cls.h | 9 ++++
iproute2 maintainers sync UAPI files using a script and I believe the
preference is for submitters to not touch these files or update them in
a separate patch that the maintainers can easily discard.
> lib/ll_proto.c | 1 +
> man/man8/tc-flower.8 | 29 ++++++++++-
> tc/f_flower.c | 98 +++++++++++++++++++++++++++++++++++-
> 4 files changed, 135 insertions(+), 2 deletions(-)
[...]
> +static void flower_print_cfm(struct rtattr *attr)
> +{
> + struct rtattr *tb[TCA_FLOWER_KEY_CFM_OPT_MAX + 1];
> + struct rtattr *v;
> + SPRINT_BUF(out);
> + size_t sz = 0;
> +
> + if (!attr || !(attr->rta_type & NLA_F_NESTED))
> + return;
> +
> + parse_rtattr(tb, TCA_FLOWER_KEY_CFM_OPT_MAX, RTA_DATA(attr),
> + RTA_PAYLOAD(attr));
> +
> + print_nl();
> + print_string(PRINT_FP, NULL, " cfm", NULL);
> + open_json_object("cfm");
> +
> + v = tb[TCA_FLOWER_KEY_CFM_MD_LEVEL];
> + if (v) {
> + sz += sprintf(out, " mdl %u", rta_getattr_u8(v));
> + print_hhu(PRINT_JSON, "mdl", NULL, rta_getattr_u8(v));
> +
Unnecessary blank line
> + }
> +
> + v = tb[TCA_FLOWER_KEY_CFM_OPCODE];
> + if (v) {
> + sprintf(out + sz, " op %u", rta_getattr_u8(v));
> + print_hhu(PRINT_JSON, "op", NULL, rta_getattr_u8(v));
> +
Likewise
> + }
> +
> + close_json_object();
> + print_string(PRINT_FP, "cfm", "%s", out);
> +}
next prev parent reply other threads:[~2023-06-21 6:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 20:10 [PATCH iproute2-next v2] f_flower: add cfm support Zahari Doychev
2023-06-21 6:00 ` Ido Schimmel [this message]
2023-06-21 7:41 ` Zahari Doychev
2023-06-21 15:58 ` David Ahern
2023-06-25 19:03 ` Stephen Hemminger
2023-06-26 20:27 ` Zahari Doychev
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=ZJKSDdC+YNlvCXVv@shredder \
--to=idosch@idosch.org \
--cc=aleksander.lobakin@intel.com \
--cc=dsahern@gmail.com \
--cc=hmehrtens@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@corigine.com \
--cc=stephen@networkplumber.org \
--cc=zahari.doychev@linux.com \
--cc=zdoychev@maxlinear.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 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).