[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c275fdc-4468-7573-a33c-35fc442c61c5@linux.dev>
Date: Mon, 11 Sep 2023 15:11:43 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, song@...nel.org, yhs@...com, john.fastabend@...il.com,
kpsingh@...nel.org, haoluo@...gle.com, jolsa@...nel.org,
netdev@...r.kernel.org, Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH bpf-next 2/3] bpf: expose information about supported xdp
metadata kfunc
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
> +
Powered by blists - more mailing lists