From: Gregory Etelson <getelson@nvidia.com>
To: <dev@dpdk.org>
Cc: <getelson@nvidia.com>, <matan@nvidia.com>, <rasland@nvidia.com>,
<stable@dpdk.org>, Ori Kam <orika@nvidia.com>,
Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: [PATCH] app/testpmd: fix GTP PSC raw processing
Date: Thu, 30 Jun 2022 15:50:55 +0300 [thread overview]
Message-ID: <20220630125055.19719-1-getelson@nvidia.com> (raw)
Fix GTP PSP extension size initialization.
Clear input buffer.
cc: stable@dpdk.org
Fixes: c65282c9aa31 ("app/testpmd: fix GTP PSC raw processing")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 6cb1173385..7f50028eb7 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -11030,10 +11030,12 @@ cmd_set_raw_parsed(const struct buffer *in)
const struct rte_flow_item_gtp_psc
*opt = item->spec;
struct rte_gtp_psc_generic_hdr *hdr;
-
- *total_size += RTE_ALIGN(sizeof(hdr),
+ size_t hdr_size = RTE_ALIGN(sizeof(*hdr),
sizeof(int32_t));
+
+ *total_size += hdr_size;
hdr = (typeof(hdr))(data_tail - (*total_size));
+ memset(hdr, 0, hdr_size);
*hdr = opt->hdr;
hdr->ext_hdr_len = 1;
gtp_psc = i;
--
2.34.1
next reply other threads:[~2022-06-30 12:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 12:50 Gregory Etelson [this message]
2022-07-01 13:42 ` [PATCH] app/testpmd: fix GTP PSC raw processing Singh, Aman Deep
2022-07-01 15:23 ` Gregory Etelson
2022-07-04 9:08 ` Singh, Aman Deep
2022-07-06 14:28 ` Andrew Rybchenko
2022-07-06 16:11 ` [PATCH v2] " Gregory Etelson
2022-07-07 12:35 ` Andrew Rybchenko
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=20220630125055.19719-1-getelson@nvidia.com \
--to=getelson@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@nvidia.com \
--cc=yuying.zhang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.