Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-05 Thread Jarod Wilson
On Thu, Dec 3, 2020 at 11:45 AM Jakub Kicinski wrote: ... > nit: let's narrow down the ifdef-enery > > no need for the ifdef here, if the helper looks like this: > > +static void bond_set_xfrm_features(struct net_device *bond_dev, u64 mode) > +{ > +#ifdef CONFIG_XFRM_OFFLOAD > + if (mode ==

Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-04 Thread Jakub Kicinski
On Thu, 3 Dec 2020 22:14:12 -0500 Jarod Wilson wrote: > On Thu, Dec 3, 2020 at 11:50 AM Jakub Kicinski wrote: > > > > On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > > > bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; > > > -#ifdef CONFIG_XFRM_OFFLOAD > > > -

Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-03 Thread Jarod Wilson
On Thu, Dec 3, 2020 at 11:50 AM Jakub Kicinski wrote: > > On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > > bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; > > -#ifdef CONFIG_XFRM_OFFLOAD > > - bond_dev->hw_features |= BOND_XFRM_FEATURES; > > -#endif /*

Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-03 Thread Jakub Kicinski
On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; > -#ifdef CONFIG_XFRM_OFFLOAD > - bond_dev->hw_features |= BOND_XFRM_FEATURES; > -#endif /* CONFIG_XFRM_OFFLOAD */ > bond_dev->features |=

Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-03 Thread Jakub Kicinski
On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > Don't try to adjust XFRM support flags if the bond device isn't yet > registered. Bad things can currently happen when netdev_change_features() > is called without having wanted_features fully filled in yet. This code > runs on

[PATCH net v3] bonding: fix feature flag setting at init time

2020-12-02 Thread Jarod Wilson
Don't try to adjust XFRM support flags if the bond device isn't yet registered. Bad things can currently happen when netdev_change_features() is called without having wanted_features fully filled in yet. This code runs on post-module-load mode changes, as well as at module init time and new bond