From: Raslan Darawsheh Date: Thu, 4 Nov 2021 09:40:25 +0000 (+0200) Subject: app/testpmd: fix GTP PSC extension header length X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=edbe962fa18d5133bae10f81bf6f13b43901a30b;p=dpdk.git 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") Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh Reviewed-by: Viacheslav Ovsiienko --- diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 0a2205804e..1b00ae507b 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;