From: "Zhang, Helin" <helin.zhang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] mbuf: fix tunnel flags check
Date: Wed, 15 Jul 2015 23:57:39 +0000 [thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A89536A@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1437004212-31646-1-git-send-email-thomas.monjalon@6wind.com>
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, July 15, 2015 4:50 PM
> To: Zhang, Helin
> Cc: olivier.matz@6wind.com; dev@dpdk.org
> Subject: [PATCH] mbuf: fix tunnel flags check
>
> A packet is tunnelled if the tunnel type is identified or if it has an inner part.
>
> Fix also a typo in RTE_PTYPE_INNER_L3_MASK.
>
> Fixes: f295a00a2b44 ("mbuf: add definitions of unified packet types")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> app/test-pmd/rxonly.c | 2 +-
> lib/librte_mbuf/rte_mbuf.h | 7 +++++--
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c index
> 41871d3..ee7fd8d 100644
> --- a/app/test-pmd/rxonly.c
> +++ b/app/test-pmd/rxonly.c
> @@ -288,7 +288,7 @@ pkt_burst_receive(struct fwd_stream *fs)
> }
>
> /* inner L3 packet type */
> - ptype = mb->packet_type &
> RTE_PTYPE_INNER_INNER_L3_MASK;
> + ptype = mb->packet_type & RTE_PTYPE_INNER_L3_MASK;
> switch (ptype) {
> case RTE_PTYPE_INNER_L3_IPV4:
> printf(" - Inner L3 type: IPV4");
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index
> 115c560..dbd9095 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -595,7 +595,7 @@ extern "C" {
> /**
> * Mask of inner layer 3 packet types.
> */
> -#define RTE_PTYPE_INNER_INNER_L3_MASK 0x00f00000
> +#define RTE_PTYPE_INNER_L3_MASK 0x00f00000
> /**
> * TCP (Transmission Control Protocol) packet type.
> * It is used for inner packet only.
> @@ -689,7 +689,10 @@ extern "C" {
> #define RTE_ETH_IS_IPV6_HDR(ptype) ((ptype) & RTE_PTYPE_L3_IPV6)
>
> /* Check if it is a tunneling packet */ -#define RTE_ETH_IS_TUNNEL_PKT(ptype)
> ((ptype) & RTE_PTYPE_TUNNEL_MASK)
> +#define RTE_ETH_IS_TUNNEL_PKT(ptype) ((ptype) &
> (RTE_PTYPE_TUNNEL_MASK | \
> +
> RTE_PTYPE_INNER_L2_MASK | \
> +
> RTE_PTYPE_INNER_L3_MASK | \
> +
> +RTE_PTYPE_INNER_L4_MASK))
> #endif /* RTE_NEXT_ABI */
Could you help to explain more of why here?
My understanding is that if an inner one can be recognized, there must be a tunnel type there.
Regards,
Helin
>
> /**
> --
> 2.4.2
next prev parent reply other threads:[~2015-07-15 23:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 23:50 Thomas Monjalon
2015-07-15 23:57 ` Zhang, Helin [this message]
2015-07-16 0:13 ` Thomas Monjalon
2015-07-16 0:36 ` Zhang, Helin
2015-07-16 9:07 ` Thomas Monjalon
2015-07-23 8:48 ` Adrien Mazarguil
2015-07-24 15:06 ` Sanford, Robert
2015-07-26 21:03 ` 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=F35DEAC7BCE34641BA9FAC6BCA4A12E70A89536A@SHSMSX104.ccr.corp.intel.com \
--to=helin.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@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).