Re: [PATCH net] Bonding: update bond device XFRM features based on current active slave

From: Hangbin Liu
Date: Wed Sep 25 2024 - 02:49:31 EST


On Tue, Sep 24, 2024 at 03:17:25PM +0200, Paolo Abeni wrote:
>
>
> On 9/18/24 10:35, Hangbin Liu wrote:
> > XFRM offload is supported in active-backup mode. However, if the current
> > active slave does not support it, we should disable it on bond device.
> > Otherwise, ESP traffic may fail due to the downlink not supporting the
> > feature.
>
> Why would the excessive features exposed by the bond device will be a
> problem? later dev_queue_xmit() on the lower device should take care of
> needed xfrm offload in validate_xmit_xfrm(), no?

I'm not very sure. In validate_xmit_xfrm() it looks the lower dev won't
check again if the upper dev has validated.

/* This skb was already validated on the upper/virtual dev */
if ((x->xso.dev != dev) && (x->xso.real_dev == dev))
return skb;

Hi Sabrina, Steffen, if the upper dev validate failed, what would happen?
Just drop the skb or go via software path?

>
> Let segmentation happening as late as possible is usually a win.

Yes, indeed.

Thanks
Hangbin