Skip to contentSkip to conversation

xfrm: support output_mark for offload ESP packets

PATCH Superseded Ulrich Weber 2 participants 4 messages Jan 14, 2020 – Jan 16, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfrm: support output_mark for offload ESP packets

Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark support but missed ESP offload support.

xfrm_smark_get() is not called within xfrm_input() for packets coming from esp4_gro_receive() or esp6_gro_receive(). Therefore call xfrm_smark_get() directly within these functions.

---
 net/ipv4/esp4_offload.c | 2 ++
 net/ipv6/esp6_offload.c | 2 ++
 2 files changed, 4 insertions(+)
net/ipv4/esp4_offload.c +2 -0
index 0e4a7cf6bc87..e2e219c7854a 100644
@@ -57,6 +57,8 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
 		if (!x)
 			goto out_reset;
 
+		skb->mark = xfrm_smark_get(skb->mark, x);
+
 		sp->xvec[sp->len++] = x;
 		sp->olen++;
 
net/ipv6/esp6_offload.c +2 -0
index e31626ffccd1..fd535053245b 100644
@@ -79,6 +79,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
 		if (!x)
 			goto out_reset;
 
+		skb->mark = xfrm_smark_get(skb->mark, x);
+
 		sp->xvec[sp->len++] = x;
 		sp->olen++;
 
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 8 lines · Ulrich Weber

Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark support but missed ESP offload support.

xfrm_smark_get() is not called within xfrm_input() for packets coming from esp4_gro_receive() or esp6_gro_receive(). Therefore call xfrm_smark_get() directly within these functions.

Can you please add a 'Fixes' tag, so that it can be properly backported to the -stable trees.

Thanks!

#2 lore raw

PATCH v2 1/1 xfrm: support output_mark for offload ESP packets

Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark support but missed ESP offload support.

xfrm_smark_get() is not called within xfrm_input() for packets coming from esp4_gro_receive() or esp6_gro_receive(). Therefore call xfrm_smark_get() directly within these functions.

Fixes 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.")
---
 net/ipv4/esp4_offload.c | 2 ++
 net/ipv6/esp6_offload.c | 2 ++
 2 files changed, 4 insertions(+)
net/ipv4/esp4_offload.c +2 -0
index 0e4a7cf6bc87..e2e219c7854a 100644
@@ -57,6 +57,8 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
 		if (!x)
 			goto out_reset;
 
+		skb->mark = xfrm_smark_get(skb->mark, x);
+
 		sp->xvec[sp->len++] = x;
 		sp->olen++;
 
net/ipv6/esp6_offload.c +2 -0
index e31626ffccd1..fd535053245b 100644
@@ -79,6 +79,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
 		if (!x)
 			goto out_reset;
 
+		skb->mark = xfrm_smark_get(skb->mark, x);
+
 		sp->xvec[sp->len++] = x;
 		sp->olen++;
 
Signature · 1 line
2.20.1
maintainer Applied
#3 lore raw
Quoted 9 lines · Ulrich Weber

Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark support but missed ESP offload support.

xfrm_smark_get() is not called within xfrm_input() for packets coming from esp4_gro_receive() or esp6_gro_receive(). Therefore call xfrm_smark_get() directly within these functions.

Fixes 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.")

Applied, thanks Ulrich!