From: Gregory Etelson <getelson@nvidia.com>
To: "Singh, Aman Deep" <aman.deep.singh@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
Raslan Darawsheh <rasland@nvidia.com>,
"stable@dpdk.org" <stable@dpdk.org>, Ori Kam <orika@nvidia.com>,
Yuying Zhang <yuying.zhang@intel.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>
Subject: RE: [PATCH] app/testpmd: fix GTP PSC raw processing
Date: Fri, 1 Jul 2022 15:23:55 +0000 [thread overview]
Message-ID: <IA1PR12MB63326DD91ED06248B5F67EB7A5BD9@IA1PR12MB6332.namprd12.prod.outlook.com> (raw)
In-Reply-To: <06cc95e0-c186-3827-26a3-5efb809f73ee@intel.com>
Hello,
> > --- 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));
>
> we missed sizeof(*hdr), last time. Ok now.
>
> > +
> > + *total_size += hdr_size;
> > hdr = (typeof(hdr))(data_tail - (*total_size));
> > + memset(hdr, 0, hdr_size);
>
> Is this memset adding a value here ?
>
Size of struct rte_gtp_psc_generic_hdr is 3 bytes. In a packet the structure is padded
with one extra byte for 32bits aligned value. The extra byte content is not covered by
the GTP_PSC flow item configuration. Application must explicitly put 0 in that byte.
The patch zeros entire 32bits.
> > *hdr = opt->hdr;
> > hdr->ext_hdr_len = 1;
> > gtp_psc = i;
next prev parent reply other threads:[~2022-07-01 15:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 12:50 Gregory Etelson
2022-07-01 13:42 ` Singh, Aman Deep
2022-07-01 15:23 ` Gregory Etelson [this message]
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=IA1PR12MB63326DD91ED06248B5F67EB7A5BD9@IA1PR12MB6332.namprd12.prod.outlook.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).