netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Marcin Szycik <marcin.szycik@linux.intel.com>
Cc: netdev@vger.kernel.org, dsahern@gmail.com,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Subject: Re: [PATCH iproute2-next] f_flower: implement pfcp opts
Date: Wed, 14 Jun 2023 09:54:58 -0700	[thread overview]
Message-ID: <20230614095458.54140ac7@hermes.local> (raw)
In-Reply-To: <20230614091758.11180-1-marcin.szycik@linux.intel.com>

On Wed, 14 Jun 2023 11:17:58 +0200
Marcin Szycik <marcin.szycik@linux.intel.com> wrote:

> +static void flower_print_pfcp_opts(const char *name, struct rtattr *attr,
> +				   char *strbuf, int len)
> +{
> +	struct rtattr *tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX + 1];
> +	struct rtattr *i = RTA_DATA(attr);
> +	int rem = RTA_PAYLOAD(attr);
> +	__be64 seid;
> +	__u8 type;
> +
> +	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX, i, rem);
> +	type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_TYPE]);
> +	seid = rta_getattr_be64(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_SEID]);
> +
> +	snprintf(strbuf, len, "%02x:%llx", type, seid);
> +}
> +

NAK you need to support JSON output.
Also whet if kernel gives partial data.

  reply	other threads:[~2023-06-14 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  9:17 [PATCH iproute2-next] f_flower: implement pfcp opts Marcin Szycik
2023-06-14 16:54 ` Stephen Hemminger [this message]
2023-06-15  8:36   ` Marcin Szycik
2023-06-15 15:46     ` 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=20230614095458.54140ac7@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dsahern@gmail.com \
    --cc=marcin.szycik@linux.intel.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.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 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).