DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] some update on CVL shared code
@ 2019-06-26  2:30 Leyi Rong
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Leyi Rong @ 2019-06-26  2:30 UTC (permalink / raw)
  To: xiaolong.ye, qiming.yang; +Cc: dev, Leyi Rong

Main changes:
1. Add support for IPv6 based switch filters
2. Add support for ethertype switch filters
3. fix inner L2 offset in GRE dummy packet

Leyi Rong (3):
  net/ice/base: add support for IPv6 based switch filters
  net/ice/base: add support for ethertype switch filters
  net/ice/base: fix inner L2 offset in GRE dummy packet

 drivers/net/ice/base/ice_protocol_type.h |  22 +++--
 drivers/net/ice/base/ice_switch.c        | 117 +++++++++++++++++++++--
 2 files changed, 123 insertions(+), 16 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH 1/3] net/ice/base: add support for IPv6 based switch filters
  2019-06-26  2:30 [dpdk-dev] [PATCH 0/3] some update on CVL shared code Leyi Rong
@ 2019-06-26  2:30 ` Leyi Rong
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype " Leyi Rong
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Leyi Rong @ 2019-06-26  2:30 UTC (permalink / raw)
  To: xiaolong.ye, qiming.yang; +Cc: dev, Leyi Rong, Kevin Scott, Paul M Stillwell Jr

- Add IPv6 switch rule support.
- Add IPv6 training packet.
- Correct name of IPv6 header variable.
- Fix enum values so that they point to the proper
  ice_prot_ext_tbl_entry field.

Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/ice/base/ice_protocol_type.h | 16 ++---
 drivers/net/ice/base/ice_switch.c        | 87 +++++++++++++++++++++++-
 2 files changed, 93 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 033efdb5a..368ab0d16 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -32,8 +32,8 @@ enum ice_protocol_type {
 	ICE_MAC_IL,
 	ICE_IPV4_OFOS,
 	ICE_IPV4_IL,
-	ICE_IPV6_IL,
 	ICE_IPV6_OFOS,
+	ICE_IPV6_IL,
 	ICE_TCP_IL,
 	ICE_UDP_OF,
 	ICE_UDP_ILOS,
@@ -200,13 +200,13 @@ struct ice_nvgre {
 };
 
 union ice_prot_hdr {
-		struct ice_ether_hdr eth_hdr;
-		struct ice_ipv4_hdr ipv4_hdr;
-		struct ice_ipv6_hdr ice_ipv6_ofos_hdr;
-		struct ice_l4_hdr l4_hdr;
-		struct ice_sctp_hdr sctp_hdr;
-		struct ice_udp_tnl_hdr tnl_hdr;
-		struct ice_nvgre nvgre_hdr;
+	struct ice_ether_hdr eth_hdr;
+	struct ice_ipv4_hdr ipv4_hdr;
+	struct ice_ipv6_hdr ipv6_hdr;
+	struct ice_l4_hdr l4_hdr;
+	struct ice_sctp_hdr sctp_hdr;
+	struct ice_udp_tnl_hdr tnl_hdr;
+	struct ice_nvgre nvgre_hdr;
 };
 
 /* This is mapping table entry that maps every word within a given protocol
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index dbf4c5fb0..feacfa483 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -243,6 +243,73 @@ dummy_tcp_packet[] = {
 	0x00, 0x00,	/* 2 bytes for 4 byte alignment */
 };
 
+static const
+struct ice_dummy_pkt_offsets dummy_tcp_ipv6_packet_offsets[] = {
+	{ ICE_MAC_OFOS,		0 },
+	{ ICE_IPV6_OFOS,	14 },
+	{ ICE_TCP_IL,		54 },
+	{ ICE_PROTOCOL_LAST,	0 },
+};
+
+static const u8
+dummy_tcp_ipv6_packet[] = {
+	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x86, 0xDD,
+
+	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
+	0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 54 */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x50, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_udp_ipv6_packet_offsets[] = {
+	{ ICE_MAC_OFOS,		0 },
+	{ ICE_IPV6_OFOS,	14 },
+	{ ICE_UDP_ILOS,		54 },
+	{ ICE_PROTOCOL_LAST,	0 },
+};
+
+static const u8
+dummy_udp_ipv6_packet[] = {
+	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x86, 0xDD,
+
+	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
+	0x00, 0x08, 0x11, 0x00, /* Next header UDP*/
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 54 */
+	0x00, 0x08, 0x00, 0x00,
+
+	0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
 /* this is a recipe to profile bitmap association */
 static ice_declare_bitmap(recipe_to_profile[ICE_MAX_NUM_RECIPES],
 			  ICE_MAX_NUM_PROFILES);
@@ -5275,7 +5342,7 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		      u16 *pkt_len,
 		      const struct ice_dummy_pkt_offsets **offsets)
 {
-	bool tcp = false, udp = false;
+	bool tcp = false, udp = false, ipv6 = false;
 	u16 i;
 
 	for (i = 0; i < lkups_cnt; i++) {
@@ -5283,6 +5350,8 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 			udp = true;
 		else if (lkups[i].type == ICE_TCP_IL)
 			tcp = true;
+		else if (lkups[i].type == ICE_IPV6_OFOS)
+			ipv6 = true;
 	}
 
 	if (tun_type == ICE_SW_TUN_NVGRE || tun_type == ICE_ALL_TUNNELS) {
@@ -5307,11 +5376,21 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		return;
 	}
 
-	if (udp) {
+	if (udp && !ipv6) {
 		*pkt = dummy_udp_packet;
 		*pkt_len = sizeof(dummy_udp_packet);
 		*offsets = dummy_udp_packet_offsets;
 		return;
+	} else if (udp && ipv6) {
+		*pkt = dummy_udp_ipv6_packet;
+		*pkt_len = sizeof(dummy_udp_ipv6_packet);
+		*offsets = dummy_udp_ipv6_packet_offsets;
+		return;
+	} else if ((tcp && ipv6) || ipv6) {
+		*pkt = dummy_tcp_ipv6_packet;
+		*pkt_len = sizeof(dummy_tcp_ipv6_packet);
+		*offsets = dummy_tcp_ipv6_packet_offsets;
+		return;
 	}
 
 	*pkt = dummy_tcp_packet;
@@ -5375,6 +5454,10 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		case ICE_IPV4_IL:
 			len = sizeof(struct ice_ipv4_hdr);
 			break;
+		case ICE_IPV6_OFOS:
+		case ICE_IPV6_IL:
+			len = sizeof(struct ice_ipv6_hdr);
+			break;
 		case ICE_TCP_IL:
 		case ICE_UDP_OF:
 		case ICE_UDP_ILOS:
-- 
2.17.1


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

* [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype switch filters
  2019-06-26  2:30 [dpdk-dev] [PATCH 0/3] some update on CVL shared code Leyi Rong
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
@ 2019-06-26  2:30 ` Leyi Rong
  2019-06-26  3:00   ` Zhao1, Wei
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet Leyi Rong
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Leyi Rong @ 2019-06-26  2:30 UTC (permalink / raw)
  To: xiaolong.ye, qiming.yang; +Cc: dev, Leyi Rong, Dan Nowlin, Paul M Stillwell Jr

Add protocol definitions for ethertype.
Add ice_ethtype_hdr structure definition into the ice_prot_hdr union.
Add ethtype offsets into the training packet maps.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/ice/base/ice_protocol_type.h |  6 +++++
 drivers/net/ice/base/ice_switch.c        | 32 ++++++++++++++++++------
 2 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 368ab0d16..cfbe3fbfa 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -30,6 +30,7 @@
 enum ice_protocol_type {
 	ICE_MAC_OFOS = 0,
 	ICE_MAC_IL,
+	ICE_ETYPE_OL,
 	ICE_IPV4_OFOS,
 	ICE_IPV4_IL,
 	ICE_IPV6_OFOS,
@@ -108,6 +109,7 @@ enum ice_prot_id {
 
 #define ICE_MAC_OFOS_HW		1
 #define ICE_MAC_IL_HW		4
+#define ICE_ETYPE_OL_HW		9
 #define ICE_IPV4_OFOS_HW	32
 #define ICE_IPV4_IL_HW		33
 #define ICE_IPV6_OFOS_HW	40
@@ -140,6 +142,9 @@ struct ice_protocol_entry {
 struct ice_ether_hdr {
 	u8 dst_addr[ETH_ALEN];
 	u8 src_addr[ETH_ALEN];
+};
+
+struct ice_ethtype_hdr {
 	u16 ethtype_id;
 };
 
@@ -201,6 +206,7 @@ struct ice_nvgre {
 
 union ice_prot_hdr {
 	struct ice_ether_hdr eth_hdr;
+	struct ice_ethtype_hdr ethertype;
 	struct ice_ipv4_hdr ipv4_hdr;
 	struct ice_ipv6_hdr ipv6_hdr;
 	struct ice_l4_hdr l4_hdr;
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index feacfa483..68c5d7d50 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -61,6 +61,7 @@ struct ice_dummy_pkt_offsets {
 static const
 struct ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_NVGRE,		34 },
 	{ ICE_MAC_IL,		42 },
@@ -72,7 +73,7 @@ static const
 u8 dummy_gre_packet[] = { 0, 0, 0, 0,		/* ICE_MAC_OFOS 0 */
 			  0, 0, 0, 0,
 			  0, 0, 0, 0,
-			  0x08, 0,
+			  0x08, 0,		/* ICE_ETYPE_OL 12 */
 			  0x45, 0, 0, 0x3E,	/* ICE_IPV4_OFOS 14 */
 			  0, 0, 0, 0,
 			  0, 0x2F, 0, 0,
@@ -94,6 +95,7 @@ u8 dummy_gre_packet[] = { 0, 0, 0, 0,		/* ICE_MAC_OFOS 0 */
 static const
 struct ice_dummy_pkt_offsets dummy_udp_tun_tcp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_UDP_OF,		34 },
 	{ ICE_VXLAN,		42 },
@@ -108,7 +110,8 @@ u8 dummy_udp_tun_tcp_packet[] = {
 	0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x5a, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -143,6 +146,7 @@ u8 dummy_udp_tun_tcp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_udp_tun_udp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_UDP_OF,		34 },
 	{ ICE_VXLAN,		42 },
@@ -157,7 +161,8 @@ u8 dummy_udp_tun_udp_packet[] = {
 	0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x4e, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -189,6 +194,7 @@ u8 dummy_udp_tun_udp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_udp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_UDP_ILOS,		34 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -199,7 +205,8 @@ dummy_udp_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -216,6 +223,7 @@ dummy_udp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_tcp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_TCP_IL,		34 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -226,7 +234,8 @@ dummy_tcp_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -246,6 +255,7 @@ dummy_tcp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_tcp_ipv6_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV6_OFOS,	14 },
 	{ ICE_TCP_IL,		54 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -256,7 +266,8 @@ dummy_tcp_ipv6_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x86, 0xDD,
+
+	0x86, 0xDD,		/* ICE_ETYPE_OL 12 */
 
 	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
 	0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
@@ -281,6 +292,7 @@ dummy_tcp_ipv6_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_udp_ipv6_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV6_OFOS,	14 },
 	{ ICE_UDP_ILOS,		54 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -291,7 +303,8 @@ dummy_udp_ipv6_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x86, 0xDD,
+
+	0x86, 0xDD,		/* ICE_ETYPE_OL 12 */
 
 	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
 	0x00, 0x08, 0x11, 0x00, /* Next header UDP*/
@@ -4455,6 +4468,7 @@ ice_add_mac_with_counter(struct ice_hw *hw, struct ice_fltr_info *f_info)
 static const struct ice_prot_ext_tbl_entry ice_prot_ext[] = {
 	{ ICE_MAC_OFOS,		{ 0, 2, 4, 6, 8, 10, 12 } },
 	{ ICE_MAC_IL,		{ 0, 2, 4, 6, 8, 10, 12 } },
+	{ ICE_ETYPE_OL,		{ 0 } },
 	{ ICE_IPV4_OFOS,	{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
 	{ ICE_IPV4_IL,		{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
 	{ ICE_IPV6_IL,		{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
@@ -4492,6 +4506,7 @@ static const struct ice_pref_recipe_group ice_recipe_pack[] = {
 static const struct ice_protocol_entry ice_prot_id_tbl[] = {
 	{ ICE_MAC_OFOS,		ICE_MAC_OFOS_HW },
 	{ ICE_MAC_IL,		ICE_MAC_IL_HW },
+	{ ICE_ETYPE_OL,		ICE_ETYPE_OL_HW },
 	{ ICE_IPV4_OFOS,	ICE_IPV4_OFOS_HW },
 	{ ICE_IPV4_IL,		ICE_IPV4_IL_HW },
 	{ ICE_IPV6_OFOS,	ICE_IPV6_OFOS_HW },
@@ -5450,6 +5465,9 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		case ICE_MAC_IL:
 			len = sizeof(struct ice_ether_hdr);
 			break;
+		case ICE_ETYPE_OL:
+			len = sizeof(struct ice_ethtype_hdr);
+			break;
 		case ICE_IPV4_OFOS:
 		case ICE_IPV4_IL:
 			len = sizeof(struct ice_ipv4_hdr);
-- 
2.17.1


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

* [dpdk-dev] [PATCH 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet
  2019-06-26  2:30 [dpdk-dev] [PATCH 0/3] some update on CVL shared code Leyi Rong
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype " Leyi Rong
@ 2019-06-26  2:30 ` Leyi Rong
  2019-06-26  5:29 ` [dpdk-dev] [PATCH 0/3] some update on CVL shared code Yang, Qiming
  2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
  4 siblings, 0 replies; 13+ messages in thread
From: Leyi Rong @ 2019-06-26  2:30 UTC (permalink / raw)
  To: xiaolong.ye, qiming.yang; +Cc: dev, Leyi Rong, Paul M Stillwell Jr

The offset for the inner L2 header in the dummy GRE packet
was off by 2 bytes so updated the offset.

Fixes: 4b018e5ce54d ("net/ice/base: enable additional switch rules")

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 68c5d7d50..9c5a93761 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -65,7 +65,7 @@ struct ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = {
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_NVGRE,		34 },
 	{ ICE_MAC_IL,		42 },
-	{ ICE_IPV4_IL,		54 },
+	{ ICE_IPV4_IL,		56 },
 	{ ICE_PROTOCOL_LAST,	0 },
 };
 
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype switch filters
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype " Leyi Rong
@ 2019-06-26  3:00   ` Zhao1, Wei
  0 siblings, 0 replies; 13+ messages in thread
From: Zhao1, Wei @ 2019-06-26  3:00 UTC (permalink / raw)
  To: Rong, Leyi, Ye, Xiaolong, Yang, Qiming
  Cc: dev, Rong, Leyi, Nowlin, Dan, Stillwell Jr, Paul M

Tested-by: Wei Zhao <wei.zhao1@intel.com>


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Leyi Rong
> Sent: Wednesday, June 26, 2019 10:30 AM
> To: Ye, Xiaolong <xiaolong.ye@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>; Nowlin, Dan
> <dan.nowlin@intel.com>; Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>
> Subject: [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype switch
> filters
> 
> Add protocol definitions for ethertype.
> Add ice_ethtype_hdr structure definition into the ice_prot_hdr union.
> Add ethtype offsets into the training packet maps.
> 
> Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---
>  drivers/net/ice/base/ice_protocol_type.h |  6 +++++
>  drivers/net/ice/base/ice_switch.c        | 32 ++++++++++++++++++------
>  2 files changed, 31 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_protocol_type.h
> b/drivers/net/ice/base/ice_protocol_type.h
> index 368ab0d16..cfbe3fbfa 100644
> --- a/drivers/net/ice/base/ice_protocol_type.h
> +++ b/drivers/net/ice/base/ice_protocol_type.h
> @@ -30,6 +30,7 @@
>  enum ice_protocol_type {
>  	ICE_MAC_OFOS = 0,
>  	ICE_MAC_IL,
> +	ICE_ETYPE_OL,
>  	ICE_IPV4_OFOS,
>  	ICE_IPV4_IL,
>  	ICE_IPV6_OFOS,
> @@ -108,6 +109,7 @@ enum ice_prot_id {
> 
>  #define ICE_MAC_OFOS_HW		1
>  #define ICE_MAC_IL_HW		4
> +#define ICE_ETYPE_OL_HW		9
>  #define ICE_IPV4_OFOS_HW	32
>  #define ICE_IPV4_IL_HW		33
>  #define ICE_IPV6_OFOS_HW	40
> @@ -140,6 +142,9 @@ struct ice_protocol_entry {  struct ice_ether_hdr {
>  	u8 dst_addr[ETH_ALEN];
>  	u8 src_addr[ETH_ALEN];
> +};
> +
> +struct ice_ethtype_hdr {
>  	u16 ethtype_id;
>  };
> 
> @@ -201,6 +206,7 @@ struct ice_nvgre {
> 
>  union ice_prot_hdr {
>  	struct ice_ether_hdr eth_hdr;
> +	struct ice_ethtype_hdr ethertype;
>  	struct ice_ipv4_hdr ipv4_hdr;
>  	struct ice_ipv6_hdr ipv6_hdr;
>  	struct ice_l4_hdr l4_hdr;
> diff --git a/drivers/net/ice/base/ice_switch.c
> b/drivers/net/ice/base/ice_switch.c
> index feacfa483..68c5d7d50 100644
> --- a/drivers/net/ice/base/ice_switch.c
> +++ b/drivers/net/ice/base/ice_switch.c
> @@ -61,6 +61,7 @@ struct ice_dummy_pkt_offsets {  static const  struct
> ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV4_OFOS,	14 },
>  	{ ICE_NVGRE,		34 },
>  	{ ICE_MAC_IL,		42 },
> @@ -72,7 +73,7 @@ static const
>  u8 dummy_gre_packet[] = { 0, 0, 0, 0,		/* ICE_MAC_OFOS 0 */
>  			  0, 0, 0, 0,
>  			  0, 0, 0, 0,
> -			  0x08, 0,
> +			  0x08, 0,		/* ICE_ETYPE_OL 12 */
>  			  0x45, 0, 0, 0x3E,	/* ICE_IPV4_OFOS 14 */
>  			  0, 0, 0, 0,
>  			  0, 0x2F, 0, 0,
> @@ -94,6 +95,7 @@ u8 dummy_gre_packet[] = { 0, 0, 0, 0,		/*
> ICE_MAC_OFOS 0 */
>  static const
>  struct ice_dummy_pkt_offsets dummy_udp_tun_tcp_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV4_OFOS,	14 },
>  	{ ICE_UDP_OF,		34 },
>  	{ ICE_VXLAN,		42 },
> @@ -108,7 +110,8 @@ u8 dummy_udp_tun_tcp_packet[] = {
>  	0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> -	0x08, 0x00,
> +
> +	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
> 
>  	0x45, 0x00, 0x00, 0x5a, /* ICE_IPV4_OFOS 14 */
>  	0x00, 0x01, 0x00, 0x00,
> @@ -143,6 +146,7 @@ u8 dummy_udp_tun_tcp_packet[] = {  static const
> struct ice_dummy_pkt_offsets dummy_udp_tun_udp_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV4_OFOS,	14 },
>  	{ ICE_UDP_OF,		34 },
>  	{ ICE_VXLAN,		42 },
> @@ -157,7 +161,8 @@ u8 dummy_udp_tun_udp_packet[] = {
>  	0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> -	0x08, 0x00,
> +
> +	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
> 
>  	0x45, 0x00, 0x00, 0x4e, /* ICE_IPV4_OFOS 14 */
>  	0x00, 0x01, 0x00, 0x00,
> @@ -189,6 +194,7 @@ u8 dummy_udp_tun_udp_packet[] = {  static const
> struct ice_dummy_pkt_offsets dummy_udp_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV4_OFOS,	14 },
>  	{ ICE_UDP_ILOS,		34 },
>  	{ ICE_PROTOCOL_LAST,	0 },
> @@ -199,7 +205,8 @@ dummy_udp_packet[] = {
>  	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> -	0x08, 0x00,
> +
> +	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
> 
>  	0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 14 */
>  	0x00, 0x01, 0x00, 0x00,
> @@ -216,6 +223,7 @@ dummy_udp_packet[] = {  static const  struct
> ice_dummy_pkt_offsets dummy_tcp_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV4_OFOS,	14 },
>  	{ ICE_TCP_IL,		34 },
>  	{ ICE_PROTOCOL_LAST,	0 },
> @@ -226,7 +234,8 @@ dummy_tcp_packet[] = {
>  	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> -	0x08, 0x00,
> +
> +	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
> 
>  	0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 14 */
>  	0x00, 0x01, 0x00, 0x00,
> @@ -246,6 +255,7 @@ dummy_tcp_packet[] = {  static const  struct
> ice_dummy_pkt_offsets dummy_tcp_ipv6_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV6_OFOS,	14 },
>  	{ ICE_TCP_IL,		54 },
>  	{ ICE_PROTOCOL_LAST,	0 },
> @@ -256,7 +266,8 @@ dummy_tcp_ipv6_packet[] = {
>  	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> -	0x86, 0xDD,
> +
> +	0x86, 0xDD,		/* ICE_ETYPE_OL 12 */
> 
>  	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
>  	0x00, 0x14, 0x06, 0x00, /* Next header is TCP */ @@ -281,6 +292,7
> @@ dummy_tcp_ipv6_packet[] = {  static const  struct ice_dummy_pkt_offsets
> dummy_udp_ipv6_packet_offsets[] = {
>  	{ ICE_MAC_OFOS,		0 },
> +	{ ICE_ETYPE_OL,		12 },
>  	{ ICE_IPV6_OFOS,	14 },
>  	{ ICE_UDP_ILOS,		54 },
>  	{ ICE_PROTOCOL_LAST,	0 },
> @@ -291,7 +303,8 @@ dummy_udp_ipv6_packet[] = {
>  	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> -	0x86, 0xDD,
> +
> +	0x86, 0xDD,		/* ICE_ETYPE_OL 12 */
> 
>  	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
>  	0x00, 0x08, 0x11, 0x00, /* Next header UDP*/ @@ -4455,6 +4468,7
> @@ ice_add_mac_with_counter(struct ice_hw *hw, struct ice_fltr_info *f_info)
> static const struct ice_prot_ext_tbl_entry ice_prot_ext[] = {
>  	{ ICE_MAC_OFOS,		{ 0, 2, 4, 6, 8, 10, 12 } },
>  	{ ICE_MAC_IL,		{ 0, 2, 4, 6, 8, 10, 12 } },
> +	{ ICE_ETYPE_OL,		{ 0 } },
>  	{ ICE_IPV4_OFOS,	{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
>  	{ ICE_IPV4_IL,		{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
>  	{ ICE_IPV6_IL,		{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
> @@ -4492,6 +4506,7 @@ static const struct ice_pref_recipe_group
> ice_recipe_pack[] = {  static const struct ice_protocol_entry ice_prot_id_tbl[] =
> {
>  	{ ICE_MAC_OFOS,		ICE_MAC_OFOS_HW },
>  	{ ICE_MAC_IL,		ICE_MAC_IL_HW },
> +	{ ICE_ETYPE_OL,		ICE_ETYPE_OL_HW },
>  	{ ICE_IPV4_OFOS,	ICE_IPV4_OFOS_HW },
>  	{ ICE_IPV4_IL,		ICE_IPV4_IL_HW },
>  	{ ICE_IPV6_OFOS,	ICE_IPV6_OFOS_HW },
> @@ -5450,6 +5465,9 @@ ice_fill_adv_dummy_packet(struct
> ice_adv_lkup_elem *lkups, u16 lkups_cnt,
>  		case ICE_MAC_IL:
>  			len = sizeof(struct ice_ether_hdr);
>  			break;
> +		case ICE_ETYPE_OL:
> +			len = sizeof(struct ice_ethtype_hdr);
> +			break;
>  		case ICE_IPV4_OFOS:
>  		case ICE_IPV4_IL:
>  			len = sizeof(struct ice_ipv4_hdr);
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH 0/3] some update on CVL shared code
  2019-06-26  2:30 [dpdk-dev] [PATCH 0/3] some update on CVL shared code Leyi Rong
                   ` (2 preceding siblings ...)
  2019-06-26  2:30 ` [dpdk-dev] [PATCH 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet Leyi Rong
@ 2019-06-26  5:29 ` Yang, Qiming
  2019-06-26  9:36   ` Zhao1, Wei
  2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
  4 siblings, 1 reply; 13+ messages in thread
From: Yang, Qiming @ 2019-06-26  5:29 UTC (permalink / raw)
  To: Rong, Leyi, Ye, Xiaolong; +Cc: dev

Hi, Leyi
Seems still have compile issue. Like,
/tmp/SUSE15-64_K4.12.14_Clang5.0.1/x86_64-native-linuxapp-clang/251e3d92c8954331a686b2e9a9b73e2a/dpdk/drivers/net/ice/base/ice_switch.c:4636:18: error: comparison of constant 16 with expression of type 'enum ice_protocol_type' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
                    rule->type < ARRAY_SIZE(ice_prot_ext)) {
                    ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Qiming
> -----Original Message-----
> From: Rong, Leyi
> Sent: Wednesday, June 26, 2019 10:30 AM
> To: Ye, Xiaolong <xiaolong.ye@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> Subject: [PATCH 0/3] some update on CVL shared code
> 
> Main changes:
> 1. Add support for IPv6 based switch filters 2. Add support for ethertype
> switch filters 3. fix inner L2 offset in GRE dummy packet
> 
> Leyi Rong (3):
>   net/ice/base: add support for IPv6 based switch filters
>   net/ice/base: add support for ethertype switch filters
>   net/ice/base: fix inner L2 offset in GRE dummy packet
> 
>  drivers/net/ice/base/ice_protocol_type.h |  22 +++--
>  drivers/net/ice/base/ice_switch.c        | 117 +++++++++++++++++++++--
>  2 files changed, 123 insertions(+), 16 deletions(-)
> 
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH 0/3] some update on CVL shared code
  2019-06-26  5:29 ` [dpdk-dev] [PATCH 0/3] some update on CVL shared code Yang, Qiming
@ 2019-06-26  9:36   ` Zhao1, Wei
  2019-06-27  2:05     ` Yang, Qiming
  0 siblings, 1 reply; 13+ messages in thread
From: Zhao1, Wei @ 2019-06-26  9:36 UTC (permalink / raw)
  To: Yang, Qiming, Rong, Leyi, Ye, Xiaolong; +Cc: dev

Hi, Qiming

  I do not have any error in building these patch, is it related to OS version?


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yang, Qiming
> Sent: Wednesday, June 26, 2019 1:30 PM
> To: Rong, Leyi <leyi.rong@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 0/3] some update on CVL shared code
> 
> Hi, Leyi
> Seems still have compile issue. Like,
> /tmp/SUSE15-64_K4.12.14_Clang5.0.1/x86_64-native-linuxapp-
> clang/251e3d92c8954331a686b2e9a9b73e2a/dpdk/drivers/net/ice/base/ice_s
> witch.c:4636:18: error: comparison of constant 16 with expression of type
> 'enum ice_protocol_type' is always true [-Werror,-Wtautological-constant-out-
> of-range-compare]
>                     rule->type < ARRAY_SIZE(ice_prot_ext)) {
>                     ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> 
> Qiming
> > -----Original Message-----
> > From: Rong, Leyi
> > Sent: Wednesday, June 26, 2019 10:30 AM
> > To: Ye, Xiaolong <xiaolong.ye@intel.com>; Yang, Qiming
> > <qiming.yang@intel.com>
> > Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> > Subject: [PATCH 0/3] some update on CVL shared code
> >
> > Main changes:
> > 1. Add support for IPv6 based switch filters 2. Add support for
> > ethertype switch filters 3. fix inner L2 offset in GRE dummy packet
> >
> > Leyi Rong (3):
> >   net/ice/base: add support for IPv6 based switch filters
> >   net/ice/base: add support for ethertype switch filters
> >   net/ice/base: fix inner L2 offset in GRE dummy packet
> >
> >  drivers/net/ice/base/ice_protocol_type.h |  22 +++--
> >  drivers/net/ice/base/ice_switch.c        | 117 +++++++++++++++++++++--
> >  2 files changed, 123 insertions(+), 16 deletions(-)
> >
> > --
> > 2.17.1


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

* Re: [dpdk-dev] [PATCH 0/3] some update on CVL shared code
  2019-06-26  9:36   ` Zhao1, Wei
@ 2019-06-27  2:05     ` Yang, Qiming
  0 siblings, 0 replies; 13+ messages in thread
From: Yang, Qiming @ 2019-06-27  2:05 UTC (permalink / raw)
  To: Zhao1, Wei, Rong, Leyi, Ye, Xiaolong; +Cc: dev

Please saw the compile error in community. Not x86_64 gcc.

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, June 26, 2019 5:36 PM
> To: Yang, Qiming <qiming.yang@intel.com>; Rong, Leyi
> <leyi.rong@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH 0/3] some update on CVL shared code
> 
> Hi, Qiming
> 
>   I do not have any error in building these patch, is it related to OS version?
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yang, Qiming
> > Sent: Wednesday, June 26, 2019 1:30 PM
> > To: Rong, Leyi <leyi.rong@intel.com>; Ye, Xiaolong
> > <xiaolong.ye@intel.com>
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 0/3] some update on CVL shared code
> >
> > Hi, Leyi
> > Seems still have compile issue. Like,
> > /tmp/SUSE15-64_K4.12.14_Clang5.0.1/x86_64-native-linuxapp-
> >
> clang/251e3d92c8954331a686b2e9a9b73e2a/dpdk/drivers/net/ice/base/ice_
> s
> > witch.c:4636:18: error: comparison of constant 16 with expression of
> > type 'enum ice_protocol_type' is always true
> > [-Werror,-Wtautological-constant-out-
> > of-range-compare]
> >                     rule->type < ARRAY_SIZE(ice_prot_ext)) {
> >                     ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
> > 1 error generated.
> >
> > Qiming
> > > -----Original Message-----
> > > From: Rong, Leyi
> > > Sent: Wednesday, June 26, 2019 10:30 AM
> > > To: Ye, Xiaolong <xiaolong.ye@intel.com>; Yang, Qiming
> > > <qiming.yang@intel.com>
> > > Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> > > Subject: [PATCH 0/3] some update on CVL shared code
> > >
> > > Main changes:
> > > 1. Add support for IPv6 based switch filters 2. Add support for
> > > ethertype switch filters 3. fix inner L2 offset in GRE dummy packet
> > >
> > > Leyi Rong (3):
> > >   net/ice/base: add support for IPv6 based switch filters
> > >   net/ice/base: add support for ethertype switch filters
> > >   net/ice/base: fix inner L2 offset in GRE dummy packet
> > >
> > >  drivers/net/ice/base/ice_protocol_type.h |  22 +++--
> > >  drivers/net/ice/base/ice_switch.c        | 117 +++++++++++++++++++++--
> > >  2 files changed, 123 insertions(+), 16 deletions(-)
> > >
> > > --
> > > 2.17.1


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

* [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly
  2019-06-26  2:30 [dpdk-dev] [PATCH 0/3] some update on CVL shared code Leyi Rong
                   ` (3 preceding siblings ...)
  2019-06-26  5:29 ` [dpdk-dev] [PATCH 0/3] some update on CVL shared code Yang, Qiming
@ 2019-07-01  5:04 ` Leyi Rong
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
                     ` (3 more replies)
  4 siblings, 4 replies; 13+ messages in thread
From: Leyi Rong @ 2019-07-01  5:04 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Leyi Rong

Main changes:
1. Add support for IPv6 based switch filters
2. Add support for ethertype switch filters
3. fix inner L2 offset in GRE dummy packet

Leyi Rong (3):
  net/ice/base: add support for IPv6 based switch filters
  net/ice/base: add support for ethertype switch filters
  net/ice/base: fix inner L2 offset in GRE dummy packet

 drivers/net/ice/base/ice_protocol_type.h |  22 +++--
 drivers/net/ice/base/ice_switch.c        | 119 +++++++++++++++++++++--
 2 files changed, 124 insertions(+), 17 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 1/3] net/ice/base: add support for IPv6 based switch filters
  2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
@ 2019-07-01  5:04   ` Leyi Rong
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 2/3] net/ice/base: add support for ethertype " Leyi Rong
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Leyi Rong @ 2019-07-01  5:04 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Leyi Rong, Kevin Scott, Paul M Stillwell Jr

- Add IPv6 switch rule support.
- Add IPv6 training packet.
- Correct name of IPv6 header variable.
- Fix enum values so that they point to the proper
  ice_prot_ext_tbl_entry field.

Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/ice/base/ice_protocol_type.h | 16 ++---
 drivers/net/ice/base/ice_switch.c        | 87 +++++++++++++++++++++++-
 2 files changed, 93 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 033efdb5a..368ab0d16 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -32,8 +32,8 @@ enum ice_protocol_type {
 	ICE_MAC_IL,
 	ICE_IPV4_OFOS,
 	ICE_IPV4_IL,
-	ICE_IPV6_IL,
 	ICE_IPV6_OFOS,
+	ICE_IPV6_IL,
 	ICE_TCP_IL,
 	ICE_UDP_OF,
 	ICE_UDP_ILOS,
@@ -200,13 +200,13 @@ struct ice_nvgre {
 };
 
 union ice_prot_hdr {
-		struct ice_ether_hdr eth_hdr;
-		struct ice_ipv4_hdr ipv4_hdr;
-		struct ice_ipv6_hdr ice_ipv6_ofos_hdr;
-		struct ice_l4_hdr l4_hdr;
-		struct ice_sctp_hdr sctp_hdr;
-		struct ice_udp_tnl_hdr tnl_hdr;
-		struct ice_nvgre nvgre_hdr;
+	struct ice_ether_hdr eth_hdr;
+	struct ice_ipv4_hdr ipv4_hdr;
+	struct ice_ipv6_hdr ipv6_hdr;
+	struct ice_l4_hdr l4_hdr;
+	struct ice_sctp_hdr sctp_hdr;
+	struct ice_udp_tnl_hdr tnl_hdr;
+	struct ice_nvgre nvgre_hdr;
 };
 
 /* This is mapping table entry that maps every word within a given protocol
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index dbf4c5fb0..feacfa483 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -243,6 +243,73 @@ dummy_tcp_packet[] = {
 	0x00, 0x00,	/* 2 bytes for 4 byte alignment */
 };
 
+static const
+struct ice_dummy_pkt_offsets dummy_tcp_ipv6_packet_offsets[] = {
+	{ ICE_MAC_OFOS,		0 },
+	{ ICE_IPV6_OFOS,	14 },
+	{ ICE_TCP_IL,		54 },
+	{ ICE_PROTOCOL_LAST,	0 },
+};
+
+static const u8
+dummy_tcp_ipv6_packet[] = {
+	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x86, 0xDD,
+
+	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
+	0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 54 */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x50, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_udp_ipv6_packet_offsets[] = {
+	{ ICE_MAC_OFOS,		0 },
+	{ ICE_IPV6_OFOS,	14 },
+	{ ICE_UDP_ILOS,		54 },
+	{ ICE_PROTOCOL_LAST,	0 },
+};
+
+static const u8
+dummy_udp_ipv6_packet[] = {
+	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x86, 0xDD,
+
+	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
+	0x00, 0x08, 0x11, 0x00, /* Next header UDP*/
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 54 */
+	0x00, 0x08, 0x00, 0x00,
+
+	0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
 /* this is a recipe to profile bitmap association */
 static ice_declare_bitmap(recipe_to_profile[ICE_MAX_NUM_RECIPES],
 			  ICE_MAX_NUM_PROFILES);
@@ -5275,7 +5342,7 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		      u16 *pkt_len,
 		      const struct ice_dummy_pkt_offsets **offsets)
 {
-	bool tcp = false, udp = false;
+	bool tcp = false, udp = false, ipv6 = false;
 	u16 i;
 
 	for (i = 0; i < lkups_cnt; i++) {
@@ -5283,6 +5350,8 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 			udp = true;
 		else if (lkups[i].type == ICE_TCP_IL)
 			tcp = true;
+		else if (lkups[i].type == ICE_IPV6_OFOS)
+			ipv6 = true;
 	}
 
 	if (tun_type == ICE_SW_TUN_NVGRE || tun_type == ICE_ALL_TUNNELS) {
@@ -5307,11 +5376,21 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		return;
 	}
 
-	if (udp) {
+	if (udp && !ipv6) {
 		*pkt = dummy_udp_packet;
 		*pkt_len = sizeof(dummy_udp_packet);
 		*offsets = dummy_udp_packet_offsets;
 		return;
+	} else if (udp && ipv6) {
+		*pkt = dummy_udp_ipv6_packet;
+		*pkt_len = sizeof(dummy_udp_ipv6_packet);
+		*offsets = dummy_udp_ipv6_packet_offsets;
+		return;
+	} else if ((tcp && ipv6) || ipv6) {
+		*pkt = dummy_tcp_ipv6_packet;
+		*pkt_len = sizeof(dummy_tcp_ipv6_packet);
+		*offsets = dummy_tcp_ipv6_packet_offsets;
+		return;
 	}
 
 	*pkt = dummy_tcp_packet;
@@ -5375,6 +5454,10 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		case ICE_IPV4_IL:
 			len = sizeof(struct ice_ipv4_hdr);
 			break;
+		case ICE_IPV6_OFOS:
+		case ICE_IPV6_IL:
+			len = sizeof(struct ice_ipv6_hdr);
+			break;
 		case ICE_TCP_IL:
 		case ICE_UDP_OF:
 		case ICE_UDP_ILOS:
-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 2/3] net/ice/base: add support for ethertype switch filters
  2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
@ 2019-07-01  5:04   ` Leyi Rong
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet Leyi Rong
  2019-07-01  5:46   ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Zhang, Qi Z
  3 siblings, 0 replies; 13+ messages in thread
From: Leyi Rong @ 2019-07-01  5:04 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Leyi Rong, Dan Nowlin, Paul M Stillwell Jr

Add protocol definitions for ethertype.
Add ice_ethtype_hdr structure definition into the ice_prot_hdr union.
Add ethtype offsets into the training packet maps.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ice/base/ice_protocol_type.h |  6 +++++
 drivers/net/ice/base/ice_switch.c        | 34 ++++++++++++++++++------
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 368ab0d16..cfbe3fbfa 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -30,6 +30,7 @@
 enum ice_protocol_type {
 	ICE_MAC_OFOS = 0,
 	ICE_MAC_IL,
+	ICE_ETYPE_OL,
 	ICE_IPV4_OFOS,
 	ICE_IPV4_IL,
 	ICE_IPV6_OFOS,
@@ -108,6 +109,7 @@ enum ice_prot_id {
 
 #define ICE_MAC_OFOS_HW		1
 #define ICE_MAC_IL_HW		4
+#define ICE_ETYPE_OL_HW		9
 #define ICE_IPV4_OFOS_HW	32
 #define ICE_IPV4_IL_HW		33
 #define ICE_IPV6_OFOS_HW	40
@@ -140,6 +142,9 @@ struct ice_protocol_entry {
 struct ice_ether_hdr {
 	u8 dst_addr[ETH_ALEN];
 	u8 src_addr[ETH_ALEN];
+};
+
+struct ice_ethtype_hdr {
 	u16 ethtype_id;
 };
 
@@ -201,6 +206,7 @@ struct ice_nvgre {
 
 union ice_prot_hdr {
 	struct ice_ether_hdr eth_hdr;
+	struct ice_ethtype_hdr ethertype;
 	struct ice_ipv4_hdr ipv4_hdr;
 	struct ice_ipv6_hdr ipv6_hdr;
 	struct ice_l4_hdr l4_hdr;
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index feacfa483..538829771 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -61,6 +61,7 @@ struct ice_dummy_pkt_offsets {
 static const
 struct ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_NVGRE,		34 },
 	{ ICE_MAC_IL,		42 },
@@ -72,7 +73,7 @@ static const
 u8 dummy_gre_packet[] = { 0, 0, 0, 0,		/* ICE_MAC_OFOS 0 */
 			  0, 0, 0, 0,
 			  0, 0, 0, 0,
-			  0x08, 0,
+			  0x08, 0,		/* ICE_ETYPE_OL 12 */
 			  0x45, 0, 0, 0x3E,	/* ICE_IPV4_OFOS 14 */
 			  0, 0, 0, 0,
 			  0, 0x2F, 0, 0,
@@ -94,6 +95,7 @@ u8 dummy_gre_packet[] = { 0, 0, 0, 0,		/* ICE_MAC_OFOS 0 */
 static const
 struct ice_dummy_pkt_offsets dummy_udp_tun_tcp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_UDP_OF,		34 },
 	{ ICE_VXLAN,		42 },
@@ -108,7 +110,8 @@ u8 dummy_udp_tun_tcp_packet[] = {
 	0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x5a, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -143,6 +146,7 @@ u8 dummy_udp_tun_tcp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_udp_tun_udp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_UDP_OF,		34 },
 	{ ICE_VXLAN,		42 },
@@ -157,7 +161,8 @@ u8 dummy_udp_tun_udp_packet[] = {
 	0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x4e, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -189,6 +194,7 @@ u8 dummy_udp_tun_udp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_udp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_UDP_ILOS,		34 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -199,7 +205,8 @@ dummy_udp_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -216,6 +223,7 @@ dummy_udp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_tcp_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_TCP_IL,		34 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -226,7 +234,8 @@ dummy_tcp_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x08, 0x00,
+
+	0x08, 0x00,		/* ICE_ETYPE_OL 12 */
 
 	0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 14 */
 	0x00, 0x01, 0x00, 0x00,
@@ -246,6 +255,7 @@ dummy_tcp_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_tcp_ipv6_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV6_OFOS,	14 },
 	{ ICE_TCP_IL,		54 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -256,7 +266,8 @@ dummy_tcp_ipv6_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x86, 0xDD,
+
+	0x86, 0xDD,		/* ICE_ETYPE_OL 12 */
 
 	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
 	0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
@@ -281,6 +292,7 @@ dummy_tcp_ipv6_packet[] = {
 static const
 struct ice_dummy_pkt_offsets dummy_udp_ipv6_packet_offsets[] = {
 	{ ICE_MAC_OFOS,		0 },
+	{ ICE_ETYPE_OL,		12 },
 	{ ICE_IPV6_OFOS,	14 },
 	{ ICE_UDP_ILOS,		54 },
 	{ ICE_PROTOCOL_LAST,	0 },
@@ -291,7 +303,8 @@ dummy_udp_ipv6_packet[] = {
 	0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x86, 0xDD,
+
+	0x86, 0xDD,		/* ICE_ETYPE_OL 12 */
 
 	0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */
 	0x00, 0x08, 0x11, 0x00, /* Next header UDP*/
@@ -4455,6 +4468,7 @@ ice_add_mac_with_counter(struct ice_hw *hw, struct ice_fltr_info *f_info)
 static const struct ice_prot_ext_tbl_entry ice_prot_ext[] = {
 	{ ICE_MAC_OFOS,		{ 0, 2, 4, 6, 8, 10, 12 } },
 	{ ICE_MAC_IL,		{ 0, 2, 4, 6, 8, 10, 12 } },
+	{ ICE_ETYPE_OL,		{ 0 } },
 	{ ICE_IPV4_OFOS,	{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
 	{ ICE_IPV4_IL,		{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
 	{ ICE_IPV6_IL,		{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
@@ -4492,6 +4506,7 @@ static const struct ice_pref_recipe_group ice_recipe_pack[] = {
 static const struct ice_protocol_entry ice_prot_id_tbl[] = {
 	{ ICE_MAC_OFOS,		ICE_MAC_OFOS_HW },
 	{ ICE_MAC_IL,		ICE_MAC_IL_HW },
+	{ ICE_ETYPE_OL,		ICE_ETYPE_OL_HW },
 	{ ICE_IPV4_OFOS,	ICE_IPV4_OFOS_HW },
 	{ ICE_IPV4_IL,		ICE_IPV4_IL_HW },
 	{ ICE_IPV6_OFOS,	ICE_IPV6_OFOS_HW },
@@ -4618,7 +4633,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule,
 
 	for (j = 0; j < sizeof(rule->m_u) / sizeof(u16); j++)
 		if (((u16 *)&rule->m_u)[j] &&
-		    rule->type < ARRAY_SIZE(ice_prot_ext)) {
+		    (unsigned long)rule->type < ARRAY_SIZE(ice_prot_ext)) {
 			/* No more space to accommodate */
 			if (word >= ICE_MAX_CHAIN_WORDS)
 				return 0;
@@ -5450,6 +5465,9 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 		case ICE_MAC_IL:
 			len = sizeof(struct ice_ether_hdr);
 			break;
+		case ICE_ETYPE_OL:
+			len = sizeof(struct ice_ethtype_hdr);
+			break;
 		case ICE_IPV4_OFOS:
 		case ICE_IPV4_IL:
 			len = sizeof(struct ice_ipv4_hdr);
-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet
  2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 2/3] net/ice/base: add support for ethertype " Leyi Rong
@ 2019-07-01  5:04   ` Leyi Rong
  2019-07-01  5:46   ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Zhang, Qi Z
  3 siblings, 0 replies; 13+ messages in thread
From: Leyi Rong @ 2019-07-01  5:04 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Leyi Rong, Paul M Stillwell Jr

The offset for the inner L2 header in the dummy GRE packet
was off by 2 bytes so updated the offset.

Fixes: 423be7ac8951 ("net/ice/base: enable additional switch rules")

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 538829771..be43c8ba2 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -65,7 +65,7 @@ struct ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = {
 	{ ICE_IPV4_OFOS,	14 },
 	{ ICE_NVGRE,		34 },
 	{ ICE_MAC_IL,		42 },
-	{ ICE_IPV4_IL,		54 },
+	{ ICE_IPV4_IL,		56 },
 	{ ICE_PROTOCOL_LAST,	0 },
 };
 
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly
  2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
                     ` (2 preceding siblings ...)
  2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet Leyi Rong
@ 2019-07-01  5:46   ` Zhang, Qi Z
  3 siblings, 0 replies; 13+ messages in thread
From: Zhang, Qi Z @ 2019-07-01  5:46 UTC (permalink / raw)
  To: Rong, Leyi; +Cc: dev



> -----Original Message-----
> From: Rong, Leyi
> Sent: Monday, July 1, 2019 1:05 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> Subject: [PATCH v2 0/3] update ice code that were not working correctly
> 
> Main changes:
> 1. Add support for IPv6 based switch filters 2. Add support for ethertype switch
> filters 3. fix inner L2 offset in GRE dummy packet
> 
> Leyi Rong (3):
>   net/ice/base: add support for IPv6 based switch filters
>   net/ice/base: add support for ethertype switch filters
>   net/ice/base: fix inner L2 offset in GRE dummy packet
> 
>  drivers/net/ice/base/ice_protocol_type.h |  22 +++--
>  drivers/net/ice/base/ice_switch.c        | 119 +++++++++++++++++++++--
>  2 files changed, 124 insertions(+), 17 deletions(-)
> 
> --
> 2.17.1


Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2019-07-01  5:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26  2:30 [dpdk-dev] [PATCH 0/3] some update on CVL shared code Leyi Rong
2019-06-26  2:30 ` [dpdk-dev] [PATCH 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
2019-06-26  2:30 ` [dpdk-dev] [PATCH 2/3] net/ice/base: add support for ethertype " Leyi Rong
2019-06-26  3:00   ` Zhao1, Wei
2019-06-26  2:30 ` [dpdk-dev] [PATCH 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet Leyi Rong
2019-06-26  5:29 ` [dpdk-dev] [PATCH 0/3] some update on CVL shared code Yang, Qiming
2019-06-26  9:36   ` Zhao1, Wei
2019-06-27  2:05     ` Yang, Qiming
2019-07-01  5:04 ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Leyi Rong
2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 1/3] net/ice/base: add support for IPv6 based switch filters Leyi Rong
2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 2/3] net/ice/base: add support for ethertype " Leyi Rong
2019-07-01  5:04   ` [dpdk-dev] [PATCH v2 3/3] net/ice/base: fix inner L2 offset in GRE dummy packet Leyi Rong
2019-07-01  5:46   ` [dpdk-dev] [PATCH v2 0/3] update ice code that were not working correctly Zhang, Qi Z

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