Message ID | 3d3a34ffce4f66b8242791d1e6b3091aec8a2c25.1710244420.git.leonro@nvidia.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [xfrm] xfrm: Allow UDP encapsulation only in offload modes | expand |
On Tue, 2024-03-12 at 13:55 +0200, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@nvidia.com> > > The missing check of x->encap caused to the situation where GSO packets > were created with UDP encapsulation. > > As a solution return the encap check for non-offloaded SA. > > Fixes: 9f2b55961a80 ("xfrm: Pass UDP encapsulation in TX packet offload") Should be: Fixes: 983a73da1f99 ("xfrm: Pass UDP encapsulation in TX packet offload") @Steffen: I guess you want to apply it first in your tree and send it later as PR? In such case, could you please adjust the fixes hash while at it? Thanks! Paolo
On Tue, Mar 12, 2024 at 01:24:31PM +0100, Paolo Abeni wrote: > On Tue, 2024-03-12 at 13:55 +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro@nvidia.com> > > > > The missing check of x->encap caused to the situation where GSO packets > > were created with UDP encapsulation. > > > > As a solution return the encap check for non-offloaded SA. > > > > Fixes: 9f2b55961a80 ("xfrm: Pass UDP encapsulation in TX packet offload") > > Should be: > > Fixes: 983a73da1f99 ("xfrm: Pass UDP encapsulation in TX packet offload") > > @Steffen: I guess you want to apply it first in your tree and send it later as PR? > In such case, could you please adjust the fixes hash while at it? Yes, I'll adjust the fixes tag. Thanks!
On Wed, Mar 13, 2024 at 11:08:51AM +0100, Steffen Klassert wrote: > On Tue, Mar 12, 2024 at 01:24:31PM +0100, Paolo Abeni wrote: > > On Tue, 2024-03-12 at 13:55 +0200, Leon Romanovsky wrote: > > > From: Leon Romanovsky <leonro@nvidia.com> > > > > > > The missing check of x->encap caused to the situation where GSO packets > > > were created with UDP encapsulation. > > > > > > As a solution return the encap check for non-offloaded SA. > > > > > > Fixes: 9f2b55961a80 ("xfrm: Pass UDP encapsulation in TX packet offload") > > > > Should be: > > > > Fixes: 983a73da1f99 ("xfrm: Pass UDP encapsulation in TX packet offload") > > > > @Steffen: I guess you want to apply it first in your tree and send it later as PR? > > In such case, could you please adjust the fixes hash while at it? > > Yes, I'll adjust the fixes tag. > Thanks
On Tue, Mar 12, 2024 at 01:55:22PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@nvidia.com> > > The missing check of x->encap caused to the situation where GSO packets > were created with UDP encapsulation. > > As a solution return the encap check for non-offloaded SA. > > Fixes: 9f2b55961a80 ("xfrm: Pass UDP encapsulation in TX packet offload") > Closes: https://lore.kernel.org/all/a650221ae500f0c7cf496c61c96c1b103dcb6f67.camel@redhat.com > Reported-by: Paolo Abeni <pabeni@redhat.com> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Applied, thanks Leon!
On Tue, 2024-03-19 at 08:08 +0100, Steffen Klassert wrote: > On Tue, Mar 12, 2024 at 01:55:22PM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro@nvidia.com> > > > > The missing check of x->encap caused to the situation where GSO packets > > were created with UDP encapsulation. > > > > As a solution return the encap check for non-offloaded SA. > > > > Fixes: 9f2b55961a80 ("xfrm: Pass UDP encapsulation in TX packet offload") > > Closes: https://lore.kernel.org/all/a650221ae500f0c7cf496c61c96c1b103dcb6f67.camel@redhat.com > > Reported-by: Paolo Abeni <pabeni@redhat.com> > > Signed-off-by: Leon Romanovsky <leonro@nvidia.com> > > Applied, thanks Leon! Steffen, as the issue addressed here is causing self-test failures in our CI, could you please send the PR including this change somewhat soonish? Many thanks, Paolo
On Tue, Mar 19, 2024 at 11:27:43AM +0100, Paolo Abeni wrote: > On Tue, 2024-03-19 at 08:08 +0100, Steffen Klassert wrote: > > On Tue, Mar 12, 2024 at 01:55:22PM +0200, Leon Romanovsky wrote: > > > From: Leon Romanovsky <leonro@nvidia.com> > > > > > > The missing check of x->encap caused to the situation where GSO packets > > > were created with UDP encapsulation. > > > > > > As a solution return the encap check for non-offloaded SA. > > > > > > Fixes: 9f2b55961a80 ("xfrm: Pass UDP encapsulation in TX packet offload") > > > Closes: https://lore.kernel.org/all/a650221ae500f0c7cf496c61c96c1b103dcb6f67.camel@redhat.com > > > Reported-by: Paolo Abeni <pabeni@redhat.com> > > > Signed-off-by: Leon Romanovsky <leonro@nvidia.com> > > > > Applied, thanks Leon! > > Steffen, as the issue addressed here is causing self-test failures in > our CI, could you please send the PR including this change somewhat > soonish? No problem, will come during the next hour.
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index 653e51ae3964..6346690d5c69 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -407,7 +407,8 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x) struct xfrm_dst *xdst = (struct xfrm_dst *)dst; struct net_device *dev = x->xso.dev; - if (!x->type_offload) + if (!x->type_offload || + (x->xso.type == XFRM_DEV_OFFLOAD_UNSPECIFIED && x->encap)) return false; if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET ||