From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
Ting Xu <ting.xu@intel.com>
Subject: [dpdk-dev] [PATCH v2 08/14] net/ice/base: add RSS support for PPPoL2TPv2oUDP
Date: Tue, 13 Apr 2021 13:06:34 +0800 [thread overview]
Message-ID: <20210413050640.2586033-9-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210413050640.2586033-1-qi.z.zhang@intel.com>
Add support for PPPoL2TPv2oUDP RSS hash. L2TPv2 and PPP ptypes
and flow headers are added. Prot id for PPP is added.
Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_flow.c | 65 ++++++++++++++++++------
drivers/net/ice/base/ice_flow.h | 2 +
drivers/net/ice/base/ice_protocol_type.h | 1 +
3 files changed, 52 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 69156176c9..e37f7ae524 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -212,7 +212,7 @@ static const u32 ice_ptypes_mac_ofos[] = {
0xFDC00846, 0xBFBF7F7E, 0xF70001DF, 0xFEFDFDFB,
0x0000077E, 0x000003FF, 0x00000000, 0x00000000,
0x00400000, 0x03FFF000, 0xFFFFFFE0, 0x00100707,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xFFFFFF00, 0x0000003F, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -238,7 +238,7 @@ static const u32 ice_ptypes_ipv4_ofos[] = {
0x1DC00000, 0x24000800, 0x00000000, 0x00000000,
0x00000000, 0x00000155, 0x00000000, 0x00000000,
0x00000000, 0x000FC000, 0x000002A0, 0x00100000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00001500, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -252,7 +252,7 @@ static const u32 ice_ptypes_ipv4_ofos_all[] = {
0x1DC00000, 0x24000800, 0x00000000, 0x00000000,
0x00000000, 0x00000155, 0x00000000, 0x00000000,
0x00000000, 0x000FC000, 0x83E0FAA0, 0x00000101,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x03FFD500, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -264,7 +264,7 @@ static const u32 ice_ptypes_ipv4_il[] = {
0xE0000000, 0xB807700E, 0x80000003, 0xE01DC03B,
0x0000000E, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x001FF800, 0x00100000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xFC0FC000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -278,7 +278,7 @@ static const u32 ice_ptypes_ipv6_ofos[] = {
0x00000000, 0x00000000, 0x77000000, 0x10002000,
0x00000000, 0x000002AA, 0x00000000, 0x00000000,
0x00000000, 0x03F00000, 0x00000540, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00002A00, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -292,7 +292,7 @@ static const u32 ice_ptypes_ipv6_ofos_all[] = {
0x00000000, 0x00000000, 0x77000000, 0x10002000,
0x00000000, 0x000002AA, 0x00000000, 0x00000000,
0x00000000, 0x03F00000, 0x7C1F0540, 0x00000206,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xFC002A00, 0x0000003F, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -304,7 +304,7 @@ static const u32 ice_ptypes_ipv6_il[] = {
0x00000000, 0x03B80770, 0x000001DC, 0x0EE00000,
0x00000770, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x7FE00000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x03F00000, 0x0000003F, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -316,7 +316,7 @@ static const u32 ice_ptypes_ipv4_ofos_no_l4[] = {
0x10C00000, 0x04000800, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x000cc000, 0x000002A0, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00001500, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -328,7 +328,7 @@ static const u32 ice_ptypes_ipv4_il_no_l4[] = {
0x60000000, 0x18043008, 0x80000002, 0x6010c021,
0x00000008, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00139800, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x8C08C000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -340,7 +340,7 @@ static const u32 ice_ptypes_ipv6_ofos_no_l4[] = {
0x00000000, 0x00000000, 0x43000000, 0x10002000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x02300000, 0x00000540, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00002A00, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -352,7 +352,7 @@ static const u32 ice_ptypes_ipv6_il_no_l4[] = {
0x00000000, 0x02180430, 0x0000010c, 0x086010c0,
0x00000430, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x4e600000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02300000, 0x00000023, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -378,7 +378,7 @@ static const u32 ice_ptypes_udp_il[] = {
0x81000000, 0x20204040, 0x04000010, 0x80810102,
0x00000040, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00410000, 0x908427E0, 0x00100007,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x10410000, 0x00000004, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -390,7 +390,7 @@ static const u32 ice_ptypes_tcp_il[] = {
0x04000000, 0x80810102, 0x10000040, 0x02040408,
0x00000102, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00820000, 0x21084000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x20820000, 0x00000008, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -402,7 +402,7 @@ static const u32 ice_ptypes_sctp_il[] = {
0x08000000, 0x01020204, 0x20000081, 0x04080810,
0x00000204, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x01040000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x41040000, 0x00000010, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -426,7 +426,7 @@ static const u32 ice_ptypes_icmp_il[] = {
0x00000000, 0x02040408, 0x40000102, 0x08101020,
0x00000408, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x42108000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x82080000, 0x00000020, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -725,6 +725,28 @@ static const u32 ice_ptypes_udp_ecpri_tp0[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
+static const u32 ice_ptypes_l2tpv2[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xFFFFFF00, 0x0000003F, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+};
+
+static const u32 ice_ptypes_ppp[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xFFFFF000, 0x0000003F, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+};
+
/* Manage parameters and info. used during the creation of a flow profile */
struct ice_flow_prof_params {
enum ice_block blk;
@@ -750,7 +772,8 @@ struct ice_flow_prof_params {
ICE_FLOW_SEG_HDR_PFCP_SESSION | ICE_FLOW_SEG_HDR_L2TPV3 | \
ICE_FLOW_SEG_HDR_ESP | ICE_FLOW_SEG_HDR_AH | \
ICE_FLOW_SEG_HDR_NAT_T_ESP | ICE_FLOW_SEG_HDR_GTPU_NON_IP | \
- ICE_FLOW_SEG_HDR_ECPRI_TP0 | ICE_FLOW_SEG_HDR_UDP_ECPRI_TP0)
+ ICE_FLOW_SEG_HDR_ECPRI_TP0 | ICE_FLOW_SEG_HDR_UDP_ECPRI_TP0 | \
+ ICE_FLOW_SEG_HDR_L2TPV2 | ICE_FLOW_SEG_HDR_PPP)
#define ICE_FLOW_SEG_HDRS_L2_MASK \
(ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_VLAN)
@@ -1006,6 +1029,10 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
/* Attributes for GTP packet without Extension Header */
params->attr = ice_attr_gtpu_session;
params->attr_cnt = ARRAY_SIZE(ice_attr_gtpu_session);
+ } else if (hdrs & ICE_FLOW_SEG_HDR_L2TPV2) {
+ src = (const ice_bitmap_t *)ice_ptypes_l2tpv2;
+ ice_and_bitmap(params->ptypes, params->ptypes,
+ src, ICE_FLOW_PTYPE_MAX);
} else if (hdrs & ICE_FLOW_SEG_HDR_L2TPV3) {
src = (const ice_bitmap_t *)ice_ptypes_l2tpv3;
ice_and_bitmap(params->ptypes, params->ptypes,
@@ -1032,6 +1059,12 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
src, ICE_FLOW_PTYPE_MAX);
}
+ if (hdrs & ICE_FLOW_SEG_HDR_PPP) {
+ src = (const ice_bitmap_t *)ice_ptypes_ppp;
+ ice_and_bitmap(params->ptypes, params->ptypes,
+ src, ICE_FLOW_PTYPE_MAX);
+ }
+
if (hdrs & ICE_FLOW_SEG_HDR_PFCP) {
if (hdrs & ICE_FLOW_SEG_HDR_PFCP_NODE)
src =
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 40a75f53f9..448e06028a 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -185,6 +185,8 @@ enum ice_flow_seg_hdr {
ICE_FLOW_SEG_HDR_VXLAN = 0x02000000,
ICE_FLOW_SEG_HDR_ECPRI_TP0 = 0x04000000,
ICE_FLOW_SEG_HDR_UDP_ECPRI_TP0 = 0x08000000,
+ ICE_FLOW_SEG_HDR_L2TPV2 = 0x10000000,
+ ICE_FLOW_SEG_HDR_PPP = 0x40000000,
/* The following is an additive bit for ICE_FLOW_SEG_HDR_IPV4 and
* ICE_FLOW_SEG_HDR_IPV6 which include the IPV4 other PTYPEs
*/
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index ee1f29d41f..ffc887c7be 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -154,6 +154,7 @@ enum ice_prot_id {
ICE_PROT_PPPOE = 103,
ICE_PROT_L2TPV3 = 104,
ICE_PROT_ECPRI = 105,
+ ICE_PROT_PPP = 106,
ICE_PROT_ATAOE_OF = 114,
ICE_PROT_CTRL_OF = 116,
ICE_PROT_LLDP_OF = 117,
--
2.26.2
next prev parent reply other threads:[~2021-04-13 5:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 14:14 [dpdk-dev] [PATCH 0/8] ice: base code update batch 2 Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 1/8] net/ice/base: code cleanup Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 2/8] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 3/8] net/ice/base: print link configure error Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 4/8] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 5/8] net/ice/base: set MAC type for E823C device Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 6/8] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 7/8] net/ice/base: enable I2C read/write commands Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 8/8] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 00/14] base code update batch 2 Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 01/14] net/ice/base: code cleanup Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 02/14] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 03/14] net/ice/base: print link configure error Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 04/14] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 05/14] net/ice/base: set MAC type for E823C device Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 06/14] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 07/14] net/ice/base: enable I2C read/write commands Qi Zhang
2021-04-13 5:06 ` Qi Zhang [this message]
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 09/14] net/ice/base: add set/get GPIO helper functions Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 10/14] net/ice/base: add priority check of matching recipe Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 11/14] net/ice/base: add inner VLAN protocol type for QinQ filter Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 12/14] net/ice/base: fix QinQ PPPoE dummy pkt selection Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 13/14] net/ice/base: add PTYPE values for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols Qi Zhang
2021-04-13 6:16 ` [dpdk-dev] [PATCH v2 00/14] base code update batch 2 Yang, Qiming
2021-04-13 11:38 ` Ferruh Yigit
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 00/14] ice: " Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 01/14] net/ice/base: code cleanup Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 02/14] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 03/14] net/ice/base: print link configure error Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 04/14] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 05/14] net/ice/base: set MAC type for E823C device Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 06/14] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 07/14] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 08/14] net/ice/base: add priority check of matching recipe Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 09/14] net/ice/base: enable I2C read/write commands Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 10/14] net/ice/base: add set/get GPIO helper functions Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 11/14] net/ice/base: add inner VLAN protocol type for QinQ filter Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 12/14] net/ice/base: fix QinQ PPPoE dummy pkt selection Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 13/14] net/ice/base: add PTYPE values for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols Qi Zhang
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=20210413050640.2586033-9-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
--cc=ting.xu@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).