DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e
@ 2016-05-03  5:51 Jingjing Wu
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Jingjing Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jingjing Wu @ 2016-05-03  5:51 UTC (permalink / raw)
  To: helin.zhang; +Cc: jingjing.wu, dev

NSH packet can be recognized by Intel X710/XL710 series. This
patch set enables it.

Jingjing Wu (2):
  mbuf: new NSH packet type
  i40e: NSH packet type support

 app/test-pmd/rxonly.c                  |  3 +++
 doc/guides/rel_notes/release_16_07.rst |  2 ++
 drivers/net/i40e/i40e_rxtx.c           | 27 +++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf.h             |  7 +++++++
 4 files changed, 39 insertions(+)

-- 
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type
  2016-05-03  5:51 [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Jingjing Wu
@ 2016-05-03  5:51 ` Jingjing Wu
  2016-05-19 12:26   ` Olivier Matz
  2016-05-26  8:41   ` Pei, Yulong
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 2/2] i40e: NSH packet type support Jingjing Wu
  2016-06-01 18:39 ` [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Zhe Tao
  2 siblings, 2 replies; 7+ messages in thread
From: Jingjing Wu @ 2016-05-03  5:51 UTC (permalink / raw)
  To: helin.zhang; +Cc: jingjing.wu, dev

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_mbuf/rte_mbuf.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 529debb..79edae3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -274,6 +274,13 @@ extern "C" {
  */
 #define RTE_PTYPE_L2_ETHER_LLDP             0x00000004
 /**
+ * NSH (Network Service Header) packet type.
+ *
+ * Packet format:
+ * <'ether type'=0x894F>
+ */
+#define RTE_PTYPE_L2_ETHER_NSH              0x00000005
+/**
  * Mask of layer 2 packet types.
  * It is used for outer packet for tunneling cases.
  */
-- 
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 2/2] i40e: NSH packet type support
  2016-05-03  5:51 [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Jingjing Wu
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Jingjing Wu
@ 2016-05-03  5:51 ` Jingjing Wu
  2016-06-01 18:39 ` [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Zhe Tao
  2 siblings, 0 replies; 7+ messages in thread
From: Jingjing Wu @ 2016-05-03  5:51 UTC (permalink / raw)
  To: helin.zhang; +Cc: jingjing.wu, dev

NSH packet can be recognized by Intel X710/XL710 series. This
patch enables the new packet type.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/rxonly.c                  |  3 +++
 doc/guides/rel_notes/release_16_07.rst |  2 ++
 drivers/net/i40e/i40e_rxtx.c           | 27 +++++++++++++++++++++++++++
 3 files changed, 32 insertions(+)

diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index 14555ab..5f3c2c0 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -179,6 +179,9 @@ pkt_burst_receive(struct fwd_stream *fs)
 			case RTE_PTYPE_L2_ETHER_LLDP:
 				printf(" - (outer) L2 type: ETHER_LLDP");
 				break;
+			case RTE_PTYPE_L2_ETHER_NSH:
+				printf(" - (outer) L2 type: ETHER_NSH");
+				break;
 			default:
 				printf(" - (outer) L2 type: Unknown");
 				break;
diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst
index 83c841b..3742b90 100644
--- a/doc/guides/rel_notes/release_16_07.rst
+++ b/doc/guides/rel_notes/release_16_07.rst
@@ -34,6 +34,8 @@ This section should contain new features added in this release. Sample format:
 
   Refer to the previous release notes for examples.
 
+* **Added NSH packet recognition in i40e.**
+
 
 Resolved Issues
 ---------------
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 4d35d83..a7fc785 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -719,6 +719,33 @@ i40e_rxd_pkt_type_mapping(uint8_t ptype)
 			RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
 			RTE_PTYPE_INNER_L4_ICMP,
 
+		/* L2 NSH packet type */
+		[154] = RTE_PTYPE_L2_ETHER_NSH,
+		[155] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+			RTE_PTYPE_L4_FRAG,
+		[156] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+			RTE_PTYPE_L4_NONFRAG,
+		[157] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+			RTE_PTYPE_L4_UDP,
+		[158] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+			RTE_PTYPE_L4_TCP,
+		[159] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+			RTE_PTYPE_L4_SCTP,
+		[160] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+			RTE_PTYPE_L4_ICMP,
+		[161] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+			RTE_PTYPE_L4_FRAG,
+		[162] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+			RTE_PTYPE_L4_NONFRAG,
+		[163] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+			RTE_PTYPE_L4_UDP,
+		[164] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+			RTE_PTYPE_L4_TCP,
+		[165] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+			RTE_PTYPE_L4_SCTP,
+		[166] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+			RTE_PTYPE_L4_ICMP,
+
 		/* All others reserved */
 	};
 
-- 
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Jingjing Wu
@ 2016-05-19 12:26   ` Olivier Matz
  2016-05-26  8:41   ` Pei, Yulong
  1 sibling, 0 replies; 7+ messages in thread
From: Olivier Matz @ 2016-05-19 12:26 UTC (permalink / raw)
  To: Jingjing Wu, helin.zhang; +Cc: dev

Hi Jingjing,

On 05/03/2016 07:51 AM, Jingjing Wu wrote:
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index 529debb..79edae3 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -274,6 +274,13 @@ extern "C" {
>   */
>  #define RTE_PTYPE_L2_ETHER_LLDP             0x00000004
>  /**
> + * NSH (Network Service Header) packet type.
> + *
> + * Packet format:
> + * <'ether type'=0x894F>
> + */
> +#define RTE_PTYPE_L2_ETHER_NSH              0x00000005
> +/**
>   * Mask of layer 2 packet types.
>   * It is used for outer packet for tunneling cases.
>   */
> 

Acked-by: Olivier Matz <olivier.matz@6wind.com>


I have no objection for this patch, but it makes me think about
2 things:

- we have the room for 16 types for each layer, maybe we should
  start to be careful about which types should be supported to
  avoid running out of types in the future.

- The types supported in outer and inner have diverged. It would
  have been better to have something like:

  #define RTE_PTYPE_INNER_$type (RTE_PTYPE_$type << 16)

  Because it would make the software using the packet types
  simpler.

It's maybe a bit late now because it would break the ABI, but
this is something we could keep in mind in case we change the
ABI for another reason.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Jingjing Wu
  2016-05-19 12:26   ` Olivier Matz
@ 2016-05-26  8:41   ` Pei, Yulong
  1 sibling, 0 replies; 7+ messages in thread
From: Pei, Yulong @ 2016-05-26  8:41 UTC (permalink / raw)
  To: Wu, Jingjing, Zhang, Helin; +Cc: Wu, Jingjing, dev

Test-by: Yulong.pei@intel.com

ether+nsh
ether+nsh+ip
ether+nsh+ip+icmp
ether+nsh+ip_frag
ether+nsh+ip+tcp
ether+nsh+ip+udp
ether+nsh+ip+sctp
ether+nsh+ipv6
ether+nsh+ipv6+icmp
ether+nsh+ipv6_frag
ether+nsh+ipv6+tcp
ether+nsh+ipv6+udp
ether+nsh+ipv6+sctp

Above combos can be recognized correctly.

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jingjing Wu
Sent: Tuesday, May 3, 2016 1:51 PM
To: Zhang, Helin <helin.zhang@intel.com>
Cc: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_mbuf/rte_mbuf.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 529debb..79edae3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -274,6 +274,13 @@ extern "C" {
  */
 #define RTE_PTYPE_L2_ETHER_LLDP             0x00000004
 /**
+ * NSH (Network Service Header) packet type.
+ *
+ * Packet format:
+ * <'ether type'=0x894F>
+ */
+#define RTE_PTYPE_L2_ETHER_NSH              0x00000005
+/**
  * Mask of layer 2 packet types.
  * It is used for outer packet for tunneling cases.
  */
--
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e
  2016-05-03  5:51 [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Jingjing Wu
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Jingjing Wu
  2016-05-03  5:51 ` [dpdk-dev] [PATCH 2/2] i40e: NSH packet type support Jingjing Wu
@ 2016-06-01 18:39 ` Zhe Tao
  2016-06-23 19:38   ` Thomas Monjalon
  2 siblings, 1 reply; 7+ messages in thread
From: Zhe Tao @ 2016-06-01 18:39 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: helin.zhang, dev

On Tue, May 03, 2016 at 01:51:10PM +0800, Jingjing Wu wrote:
> NSH packet can be recognized by Intel X710/XL710 series. This
> patch set enables it.
> 
> Jingjing Wu (2):
>   mbuf: new NSH packet type
>   i40e: NSH packet type support
> 
>  app/test-pmd/rxonly.c                  |  3 +++
>  doc/guides/rel_notes/release_16_07.rst |  2 ++
>  drivers/net/i40e/i40e_rxtx.c           | 27 +++++++++++++++++++++++++++
>  lib/librte_mbuf/rte_mbuf.h             |  7 +++++++
>  4 files changed, 39 insertions(+)
> 
> -- 
> 2.4.0
Acked-by: Zhe Tao <zhe.tao@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e
  2016-06-01 18:39 ` [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Zhe Tao
@ 2016-06-23 19:38   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-06-23 19:38 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: dev, Zhe Tao, helin.zhang

2016-06-02 02:39, Zhe Tao:
> On Tue, May 03, 2016 at 01:51:10PM +0800, Jingjing Wu wrote:
> > NSH packet can be recognized by Intel X710/XL710 series. This
> > patch set enables it.
> > 
> > Jingjing Wu (2):
> >   mbuf: new NSH packet type
> >   i40e: NSH packet type support
> > 
> Acked-by: Zhe Tao <zhe.tao@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-23 19:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03  5:51 [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Jingjing Wu
2016-05-03  5:51 ` [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Jingjing Wu
2016-05-19 12:26   ` Olivier Matz
2016-05-26  8:41   ` Pei, Yulong
2016-05-03  5:51 ` [dpdk-dev] [PATCH 2/2] i40e: NSH packet type support Jingjing Wu
2016-06-01 18:39 ` [dpdk-dev] [PATCH 0/2] NSH packet type support in i40e Zhe Tao
2016-06-23 19:38   ` Thomas Monjalon

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).