From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Ivan Malov <ivan.malov@oktetlabs.ru>,
Olivier Matz <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Andrew Rybchenko <arybchenko@solarflare.com>
Subject: Re: [dpdk-dev] [PATCH v2] mbuf: outer offsets are undefined for non-tunnel packets
Date: Thu, 27 Jun 2019 13:09:27 +0000 [thread overview]
Message-ID: <2601191342CEEE43887BDE71AB97725801689E609E@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <20190624160206.21014-1-ivan.malov@oktetlabs.ru>
> The default policy for offload-specific fields is that
> they are undefined unless the corresponding offloads are
> requested in mbuf ol_flags. This is also the case for outer
> L2 and L3 length fields which must not be assumed to contain
> zeros for non-tunnel packets. The patch clarifies this behaviour
> in the comments. PMDs which mistakenly assume these fields
> to be zero for non-tunnel packets are expected to comply
> with the clarified comment and have dedicated fixes.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> ---
> lib/librte_mbuf/rte_mbuf.h | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index 0d9fef0..26a0b14 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -702,7 +702,18 @@ struct rte_mbuf {
> uint64_t tso_segsz:RTE_MBUF_TSO_SEGSZ_BITS;
> /**< TCP TSO segment size */
>
> - /* fields for TX offloading of tunnels */
> + /*
> + * Fields for Tx offloading of tunnels.
> + * These are undefined for packets which don't request
> + * any tunnel offloads (outer IP or UDP checksum,
> + * tunnel TSO).
> + *
> + * PMDs are advised not to use these fields
> + * unconditionally when calculating offsets.
I'd use something stronger then 'are advised not to'.
Might be something like: 'should not use'.
BTW, from the previous discussion, right now we do
have some misbehaving PMDs that need to be fixed, correct?
Apart from that:
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> + *
> + * Applications are expected to set appropriate tunnel
> + * offload flags when they fill in these fields.
> + */
> uint64_t outer_l3_len:RTE_MBUF_OUTL3_LEN_BITS;
> /**< Outer L3 (IP) Hdr Length. */
> uint64_t outer_l2_len:RTE_MBUF_OUTL2_LEN_BITS;
> --
> 1.8.3.1
next prev parent reply other threads:[~2019-06-27 13:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 15:05 [dpdk-dev] [RFC PATCH] mbuf: outer offsets must be zero " Ivan Malov
2019-04-12 15:05 ` Ivan Malov
2019-06-21 10:34 ` [dpdk-dev] [PATCH] " Ivan Malov
2019-06-21 11:10 ` Ananyev, Konstantin
2019-06-21 12:35 ` Andrew Rybchenko
2019-06-24 12:59 ` Ananyev, Konstantin
2019-06-24 13:33 ` Andrew Rybchenko
2019-06-24 16:02 ` [dpdk-dev] [PATCH v2] mbuf: outer offsets are undefined " Ivan Malov
2019-06-27 13:09 ` Ananyev, Konstantin [this message]
2019-06-27 21:06 ` [dpdk-dev] [PATCH v3] " Ivan Malov
2019-07-01 13:10 ` Olivier Matz
2019-07-01 14:37 ` Thomas Monjalon
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=2601191342CEEE43887BDE71AB97725801689E609E@IRSMSX104.ger.corp.intel.com \
--to=konstantin.ananyev@intel.com \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ivan.malov@oktetlabs.ru \
--cc=olivier.matz@6wind.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).