On Sat, Sep 06, 2025 at 07:42:48PM +0200, Sabrina Dubroca wrote:
> > +   dev->gso_partial_features = gso_partial_features;
> > +   dev->vlan_features = vlan_features;
> > +#ifdef CONFIG_XFRM_OFFLOAD
> > +   dev->hw_enc_features |= xfrm_features;
> > +#endif
> 
> I'm not completely sure we want xfrm_features for upper devices other
> than bonding [1], but this will get overwritten immediately
> afterwards:
> 
> > +   dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
> > +                               NETIF_F_HW_VLAN_CTAG_TX |
> > +                               NETIF_F_HW_VLAN_STAG_TX;

Ah.. right. I need more careful when change the order.

> 
> 
> [1] those lines in bond_compute_features were only added alongside
> bond IPsec offload, see 18cb261afd7b ("bonding: support hardware
> encryption offload to slaves")
> 
> but AFAIU hw_enc_features is only used as a mask over dev->features so
> it shouldn't be a problem to have xfrm stuff in bridge/team as well

In this case I will keep this setting. Putting the feature compute to
another function will violate our original intention of putting
the feature compute together as much as possible.

Thanks
Hangbin

Reply via email to