[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKH8qBv78jTrktfThFK=Ze12tjgAsgYXyNaRy-3m8QE8J-xwuQ@mail.gmail.com>
Date: Mon, 11 Sep 2023 15:48:10 -0700
From: Stanislav Fomichev <sdf@...gle.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
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 Mon, Sep 11, 2023 at 3:11 PM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
>
> 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.
Oh, sure, will add, thanks!
> > + xdp_rx_meta |= flag;
> > +XDP_METADATA_KFUNC_xxx
> > +#undef XDP_METADATA_KFUNC
> > +
>
Powered by blists - more mailing lists