* [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
@ 2024-03-12 11:55 Leon Romanovsky
2024-03-12 12:24 ` Paolo Abeni
2024-03-19 7:08 ` Steffen Klassert
0 siblings, 2 replies; 7+ messages in thread
From: Leon Romanovsky @ 2024-03-12 11:55 UTC (permalink / raw)
To: Steffen Klassert
Cc: Leon Romanovsky, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev, Paolo Abeni
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>
---
net/xfrm/xfrm_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 ||
--
2.44.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
2024-03-12 11:55 [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes Leon Romanovsky
@ 2024-03-12 12:24 ` Paolo Abeni
2024-03-13 10:08 ` Steffen Klassert
2024-03-19 7:08 ` Steffen Klassert
1 sibling, 1 reply; 7+ messages in thread
From: Paolo Abeni @ 2024-03-12 12:24 UTC (permalink / raw)
To: Leon Romanovsky, Steffen Klassert
Cc: Leon Romanovsky, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
2024-03-12 12:24 ` Paolo Abeni
@ 2024-03-13 10:08 ` Steffen Klassert
2024-03-13 10:32 ` Leon Romanovsky
0 siblings, 1 reply; 7+ messages in thread
From: Steffen Klassert @ 2024-03-13 10:08 UTC (permalink / raw)
To: Paolo Abeni
Cc: Leon Romanovsky, Leon Romanovsky, David S. Miller, Eric Dumazet,
Herbert Xu, Jakub Kicinski, netdev
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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
2024-03-13 10:08 ` Steffen Klassert
@ 2024-03-13 10:32 ` Leon Romanovsky
0 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2024-03-13 10:32 UTC (permalink / raw)
To: Steffen Klassert
Cc: Paolo Abeni, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
2024-03-12 11:55 [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes Leon Romanovsky
2024-03-12 12:24 ` Paolo Abeni
@ 2024-03-19 7:08 ` Steffen Klassert
2024-03-19 10:27 ` Paolo Abeni
1 sibling, 1 reply; 7+ messages in thread
From: Steffen Klassert @ 2024-03-19 7:08 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Leon Romanovsky, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev, Paolo Abeni
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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
2024-03-19 7:08 ` Steffen Klassert
@ 2024-03-19 10:27 ` Paolo Abeni
2024-03-19 10:58 ` Steffen Klassert
0 siblings, 1 reply; 7+ messages in thread
From: Paolo Abeni @ 2024-03-19 10:27 UTC (permalink / raw)
To: Steffen Klassert, Leon Romanovsky
Cc: Leon Romanovsky, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes
2024-03-19 10:27 ` Paolo Abeni
@ 2024-03-19 10:58 ` Steffen Klassert
0 siblings, 0 replies; 7+ messages in thread
From: Steffen Klassert @ 2024-03-19 10:58 UTC (permalink / raw)
To: Paolo Abeni
Cc: Leon Romanovsky, Leon Romanovsky, David S. Miller, Eric Dumazet,
Herbert Xu, Jakub Kicinski, netdev
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-19 10:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 11:55 [PATCH xfrm] xfrm: Allow UDP encapsulation only in offload modes Leon Romanovsky
2024-03-12 12:24 ` Paolo Abeni
2024-03-13 10:08 ` Steffen Klassert
2024-03-13 10:32 ` Leon Romanovsky
2024-03-19 7:08 ` Steffen Klassert
2024-03-19 10:27 ` Paolo Abeni
2024-03-19 10:58 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).