From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Steffen Klassert <steffen.klassert@secunet.com>,
<netdev@vger.kernel.org>
Subject: [PATCH 11/13] Revert "xfrm: add SA information to the offloaded packet"
Date: Tue, 10 Sep 2024 08:55:05 +0200 [thread overview]
Message-ID: <20240910065507.2436394-12-steffen.klassert@secunet.com> (raw)
In-Reply-To: <20240910065507.2436394-1-steffen.klassert@secunet.com>
This reverts commit e7cd191f83fd899c233dfbe7dc6d96ef703dcbbd.
While supporting xfrm interfaces in the packet offload API
is needed, this patch does not do the right thing. There are
more things to do to really support xfrm interfaces, so revert
it for now.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/xfrm/xfrm_output.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index a12588e7b060..e5722c95b8bb 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -706,8 +706,6 @@ int xfrm_output(struct sock *sk, struct sk_buff *skb)
struct xfrm_state *x = skb_dst(skb)->xfrm;
int family;
int err;
- struct xfrm_offload *xo;
- struct sec_path *sp;
family = (x->xso.type != XFRM_DEV_OFFLOAD_PACKET) ? x->outer_mode.family
: skb_dst(skb)->ops->family;
@@ -730,25 +728,6 @@ int xfrm_output(struct sock *sk, struct sk_buff *skb)
kfree_skb(skb);
return -EHOSTUNREACH;
}
- sp = secpath_set(skb);
- if (!sp) {
- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR);
- kfree_skb(skb);
- return -ENOMEM;
- }
-
- sp->olen++;
- sp->xvec[sp->len++] = x;
- xfrm_state_hold(x);
-
- xo = xfrm_offload(skb);
- if (!xo) {
- secpath_reset(skb);
- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR);
- kfree_skb(skb);
- return -EINVAL;
- }
- xo->flags |= XFRM_XMIT;
return xfrm_output_resume(sk, skb, 0);
}
--
2.34.1
next prev parent reply other threads:[~2024-09-10 6:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 6:54 [PATCH 0/13] pull request (net-next): ipsec-next 2024-09-10 Steffen Klassert
2024-09-10 6:54 ` [PATCH 01/13] xfrm: Remove documentation WARN_ON to limit return values for offloaded SA Steffen Klassert
2024-09-11 2:20 ` patchwork-bot+netdevbpf
2024-09-10 6:54 ` [PATCH 02/13] net: add copy from skb_seq_state to buffer function Steffen Klassert
2024-09-10 6:54 ` [PATCH 03/13] xfrm: Correct spelling in xfrm.h Steffen Klassert
2024-09-10 6:54 ` [PATCH 04/13] selftests: add xfrm policy insertion speed test script Steffen Klassert
2024-09-10 6:54 ` [PATCH 05/13] xfrm: policy: don't iterate inexact policies twice at insert time Steffen Klassert
2024-09-10 6:55 ` [PATCH 06/13] xfrm: switch migrate to xfrm_policy_lookup_bytype Steffen Klassert
2024-09-10 6:55 ` [PATCH 07/13] xfrm: policy: remove remaining use of inexact list Steffen Klassert
2024-09-10 6:55 ` [PATCH 08/13] xfrm: add SA information to the offloaded packet Steffen Klassert
2024-09-10 6:55 ` [PATCH 09/13] xfrm: policy: use recently added helper in more places Steffen Klassert
2024-09-10 6:55 ` [PATCH 10/13] xfrm: minor update to sdb and xfrm_policy comments Steffen Klassert
2024-09-10 6:55 ` Steffen Klassert [this message]
2024-09-10 6:55 ` [PATCH 12/13] xfrm: policy: fix null dereference Steffen Klassert
2024-09-10 6:55 ` [PATCH 13/13] xfrm: policy: Restore dir assignments in xfrm_hash_rebuild() Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240910065507.2436394-12-steffen.klassert@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).