app/testpmd: fix gtp psc extention header length

Message ID 20211104093518.8922-1-rasland@nvidia.com (mailing list archive)
State Superseded, archived
Headers
Series app/testpmd: fix gtp psc extention header length |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Raslan Darawsheh Nov. 4, 2021, 9:35 a.m. UTC
  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")
Cc: viacheslavo@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 24b224e632..b4c5aacdbe 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -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;