Re: [PATCH bpf-next 2/3] bpf: expose information about supported xdp metadata kfunc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 11, 2023 at 3:11 PM Martin KaFai Lau <martin.lau@xxxxxxxxx> 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
> > +
>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux