Skip to contentSkip to conversation

app/testpmd: fix gtp psc extention header length

PATCH Superseded Raslan Darawsheh 3 participants 5 messages Nov 4, 2021 – Nov 16, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: fix gtp psc extention header length

Current implementation for raw encap sets the length to be in bytes, but, GTP extention header length is an 8-bit feild in 4-octet units.

This fixes the length calculation of the header length.

Fixes 9213c50e36fa ("app/testpmd: support GTP PSC option in raw sets")
---
 app/test-pmd/cmdline_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +1 -1
index 24b224e632..b4c5aacdbe 100644
@@ -9213,7 +9213,7 @@ cmd_set_raw_parsed(const struct buffer *in)
 					uint8_t qfi:6;
 					uint8_t next;
 				} psc;
-				psc.len = sizeof(psc);
+				psc.len = sizeof(psc) / 4;
 				psc.pdu_type = opt->hdr.type;
 				psc.qfi = opt->hdr.qfi;
 				psc.next = 0;
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 app/testpmd: fix gtp psc extension header length

Current implementation for raw encap sets the length to be in bytes, but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fixes the length calculation of the header length.

Fixes 9213c50e36fa ("app/testpmd: support GTP PSC option in raw sets")

---
v2: fix spelling issues

---
 app/test-pmd/cmdline_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +1 -1
index 24b224e632..b4c5aacdbe 100644
@@ -9213,7 +9213,7 @@ cmd_set_raw_parsed(const struct buffer *in)
 					uint8_t qfi:6;
 					uint8_t next;
 				} psc;
-				psc.len = sizeof(psc);
+				psc.len = sizeof(psc) / 4;
 				psc.pdu_type = opt->hdr.type;
 				psc.qfi = opt->hdr.qfi;
 				psc.next = 0;
Signature · 1 line
2.25.1
#2 lore raw

Re: [dpdk-dev] [PATCH v2] app/testpmd: fix gtp psc extension header length

Quoted 22 lines · Raslan Darawsheh

Current implementation for raw encap sets the length to be in bytes, but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fixes the length calculation of the header length.

Fixes 9213c50e36fa ("app/testpmd: support GTP PSC option in raw sets")

---
v2: fix spelling issues

---
  app/test-pmd/cmdline_flow.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +0 -0
index 24b224e632..b4c5aacdbe 100644

app/test-pmd/cmdline_flow.c cmd_set_raw_parsed(const struct buffer *in) · line 9219

Quoted 8 lines
app/test-pmd/cmdline_flow.c +1 -1
@@ -9213,7 +9213,7 @@ cmd_set_raw_parsed(const struct buffer *in)
  					uint8_t qfi:6;
  					uint8_t next;
  				} psc;
-				psc.len = sizeof(psc);
+				psc.len = sizeof(psc) / 4;
  				psc.pdu_type = opt->hdr.type;
  				psc.qfi = opt->hdr.qfi;
  				psc.next = 0;

Hi Ori, Slava,

Can you please review this patch?

Reviewed-by
#3 lore raw

RE: [dpdk-dev] [PATCH v2] app/testpmd: fix gtp psc extension header length

Quoted 44 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Monday, November 15, 2021 21:02
To: Raslan Darawsheh <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Xiaoyun Li <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix gtp psc extension header length

Quoted 23 lines · Raslan Darawsheh

Current implementation for raw encap sets the length to be in bytes, but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fixes the length calculation of the header length.

Fixes 9213c50e36fa ("app/testpmd: support GTP PSC option in raw

sets")
Cc: [email protected]
Cc: [email protected]

---
v2: fix spelling issues

---
  app/test-pmd/cmdline_flow.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +0 -0
index 24b224e632..b4c5aacdbe 100644

app/test-pmd/cmdline_flow.c cmd_set_raw_parsed(const struct buffer *in) · line 9219

Quoted 8 lines
app/test-pmd/cmdline_flow.c +1 -1
@@ -9213,7 +9213,7 @@ cmd_set_raw_parsed(const struct buffer *in)
  					uint8_t qfi:6;
  					uint8_t next;
  				} psc;
-				psc.len = sizeof(psc);
+				psc.len = sizeof(psc) / 4;
  				psc.pdu_type = opt->hdr.type;
  				psc.qfi = opt->hdr.qfi;
  				psc.next = 0;

Hi Ori, Slava,

Quoted 1 line

Can you please review this patch?

Looks good to me.

Applied
#4 lore raw

Re: [dpdk-dev] [PATCH v2] app/testpmd: fix gtp psc extension header length

Quoted 20 lines · Slava Ovsiienko
Quoted 20 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Monday, November 15, 2021 21:02
To: Raslan Darawsheh <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Xiaoyun Li <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix gtp psc extension header length

Quoted 10 lines · Raslan Darawsheh

Current implementation for raw encap sets the length to be in bytes, but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fixes the length calculation of the header length.

Fixes 9213c50e36fa ("app/testpmd: support GTP PSC option in raw

sets")
Cc: [email protected]
Cc: [email protected]

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Applied to dpdk-next-net/main, thanks.