Subject: Re: [PATCH bpf-next 2/7] drivers: net: turn on XDP features

From: Lorenzo Bianconi <[email-masked]>
Date: Sun, 22 Jan 2023 12:49:20 +0100

> On Fri, 20 Jan 2023 18:16:51 +0100 Lorenzo Bianconi wrote:
> > +static inline void
> > +xdp_features_set_redirect_target(xdp_features_t *xdp_features, bool support_sg)
> > +{
> > +	*xdp_features |= NETDEV_XDP_ACT_NDO_XMIT;
> > +	if (support_sg)
> > +		*xdp_features |= NETDEV_XDP_ACT_NDO_XMIT_SG;
> > +}
> > +
> > +static inline void
> > +xdp_features_clear_redirect_target(xdp_features_t *xdp_features)
> > +{
> > +	*xdp_features &= ~(NETDEV_XDP_ACT_NDO_XMIT |
> > +			   NETDEV_XDP_ACT_NDO_XMIT_SG);
> > +}
> > +
> 
> Shouldn't these generate netlink notifications?

ack, I would say we need to add NETDEV_XDP_FEAT_CHANGE case in
netdev_genl_netdevice_event routine and maybe add a new
NETDEV_XDP_FEAT_CHANGE flag in netdev_cmd. What do you think?

Regards,
Lorenzo