netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin KaFai Lau <martin.lau@linux.dev>
To: Stanislav Fomichev <sdf@google.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org, song@kernel.org, yhs@fb.com,
	john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com,
	jolsa@kernel.org, netdev@vger.kernel.org,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH bpf-next 2/3] bpf: expose information about supported xdp metadata kfunc
Date: Mon, 11 Sep 2023 15:11:43 -0700	[thread overview]
Message-ID: <6c275fdc-4468-7573-a33c-35fc442c61c5@linux.dev> (raw)
In-Reply-To: <20230908225807.1780455-3-sdf@google.com>

On 9/8/23 3:58 PM, Stanislav Fomichev wrote:
> @@ -12,15 +13,24 @@ static int
>   netdev_nl_dev_fill(struct net_device *netdev, struct sk_buff *rsp,
>   		   const struct genl_info *info)
>   {
> +	u64 xdp_rx_meta = 0;
>   	void *hdr;
>   
>   	hdr = genlmsg_iput(rsp, info);
>   	if (!hdr)
>   		return -EMSGSIZE;
>   
> +#define XDP_METADATA_KFUNC(_, flag, __, xmo) \
> +	if (netdev->xdp_metadata_ops->xmo) \

A NULL check is needed for netdev->xdp_metadata_ops.

> +		xdp_rx_meta |= flag;
> +XDP_METADATA_KFUNC_xxx
> +#undef XDP_METADATA_KFUNC
> +


  parent reply	other threads:[~2023-09-11 22:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 22:58 [PATCH bpf-next 0/3] bpf: expose information about netdev xdp-metadata kfunc support Stanislav Fomichev
2023-09-08 22:58 ` [PATCH bpf-next 1/3] bpf: make it easier to add new metadata kfunc Stanislav Fomichev
2023-09-08 22:58 ` [PATCH bpf-next 2/3] bpf: expose information about supported xdp " Stanislav Fomichev
2023-09-09 11:23   ` kernel test robot
2023-09-11 22:11   ` Martin KaFai Lau [this message]
2023-09-11 22:48     ` Stanislav Fomichev
2023-09-08 22:58 ` [PATCH bpf-next 3/3] tools: ynl: extend netdev sample to dump xdp-rx-metadata-features Stanislav Fomichev

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=6c275fdc-4468-7573-a33c-35fc442c61c5@linux.dev \
    --to=martin.lau@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=willemb@google.com \
    --cc=yhs@fb.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).