Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/71533/?format=api
http://patches.dpdk.org/api/patches/71533/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200615020515.1359-2-qi.z.zhang@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20200615020515.1359-2-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200615020515.1359-2-qi.z.zhang@intel.com", "date": "2020-06-15T02:04:23", "name": "[v3,01/53] net/ice/base: add support for non-IP Layer2 protocol", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1068c34fa7a86101492d898b6b48c9b6143d3108", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 31221, "url": "http://patches.dpdk.org/api/users/31221/?format=api", "username": "yexl", "first_name": "xiaolong", "last_name": "ye", "email": "xiaolong.ye@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200615020515.1359-2-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 10456, "url": "http://patches.dpdk.org/api/series/10456/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10456", "date": "2020-06-15T02:04:22", "name": "net/ice: base code update", "version": 3, "mbox": "http://patches.dpdk.org/series/10456/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/71533/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/71533/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9EEB0A0093;\n\tMon, 15 Jun 2020 04:01:27 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D04575323;\n\tMon, 15 Jun 2020 04:01:24 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 1B2DF4C89\n for <dev@dpdk.org>; Mon, 15 Jun 2020 04:01:19 +0200 (CEST)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jun 2020 19:01:19 -0700", "from dpdk51.sh.intel.com ([10.67.111.82])\n by fmsmga004.fm.intel.com with ESMTP; 14 Jun 2020 19:01:17 -0700" ], "IronPort-SDR": [ "\n F8GKMaplPBMhth2XkkDOk+HZYuopM3fs50KB1KVHZy6YXyy1LAOkbZ9PKPZ0Ty72wowXqTiS3G\n BpDrlJat5p8g==", "\n 2ZBZ7N/pzjPshVy71kQhnJVExA3bIt5v7Avx0OYcP5FVXPJ9N/S8UQzE6iEOAoRAYj/V2eaGtK\n kSuQVCsfEQsw==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,513,1583222400\"; d=\"scan'208\";a=\"298318787\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "ferruh.yigit@intel.com", "Cc": "xiaolong.ye@intel.com, qiming.yang@intel.com, dev@dpdk.org,\n Qi Zhang <qi.z.zhang@intel.com>, Yahui Cao <yahui.cao@intel.com>,\n \"Paul M . Stillwell Jr\" <paul.m.stillwell.jr@intel.com>", "Date": "Mon, 15 Jun 2020 10:04:23 +0800", "Message-Id": "<20200615020515.1359-2-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20200615020515.1359-1-qi.z.zhang@intel.com>", "References": "<20200603024016.30636-1-qi.z.zhang@intel.com>\n <20200615020515.1359-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 01/53] net/ice/base: add support for non-IP\n\tLayer2 protocol", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "FDIR can forward Ethernet packets with non-IP ethertype.\n\nSigned-off-by: Yahui Cao <yahui.cao@intel.com>\nSigned-off-by: Paul M. Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_fdir.c | 15 +++++++++++++++\n drivers/net/ice/base/ice_fdir.h | 2 ++\n drivers/net/ice/base/ice_flow.c | 29 ++++++++++++++++++++++-------\n drivers/net/ice/base/ice_flow.h | 1 +\n drivers/net/ice/base/ice_type.h | 1 +\n 5 files changed, 41 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c\nindex 4e9aafc39..c92533223 100644\n--- a/drivers/net/ice/base/ice_fdir.c\n+++ b/drivers/net/ice/base/ice_fdir.c\n@@ -102,6 +102,12 @@ static const u8 ice_fdir_ipv4_gtpu4_pkt[] = {\n \t0x00, 0x00,\n };\n \n+static const u8 ice_fdir_non_ip_l2_pkt[] = {\n+\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+};\n+\n static const u8 ice_fdir_tcpv6_pkt[] = {\n \t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00, 0x86, 0xDD, 0x60, 0x00,\n@@ -329,6 +335,11 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = {\n \t\tice_fdir_ipv4_gtpu4_pkt,\n \t},\n \t{\n+\t\tICE_FLTR_PTYPE_NON_IP_L2,\n+\t\tsizeof(ice_fdir_non_ip_l2_pkt), ice_fdir_non_ip_l2_pkt,\n+\t\tsizeof(ice_fdir_non_ip_l2_pkt), ice_fdir_non_ip_l2_pkt,\n+\t},\n+\t{\n \t\tICE_FLTR_PTYPE_NONF_IPV6_TCP,\n \t\tsizeof(ice_fdir_tcpv6_pkt), ice_fdir_tcpv6_pkt,\n \t\tsizeof(ice_fdir_tcp6_tun_pkt), ice_fdir_tcp6_tun_pkt,\n@@ -819,6 +830,10 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,\n \t\tice_pkt_insert_u6_qfi(loc, ICE_IPV4_GTPU_QFI_OFFSET,\n \t\t\t\t input->gtpu_data.qfi);\n \t\tbreak;\n+\tcase ICE_FLTR_PTYPE_NON_IP_L2:\n+\t\tice_pkt_insert_u16(loc, ICE_MAC_ETHTYPE_OFFSET,\n+\t\t\t\t input->ext_data.ether_type);\n+\t\tbreak;\n \tcase ICE_FLTR_PTYPE_NONF_IPV6_TCP:\n \t\tice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,\n \t\t\t\t\t input->ip.v6.dst_ip);\ndiff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h\nindex 18656c55f..97553c8e7 100644\n--- a/drivers/net/ice/base/ice_fdir.h\n+++ b/drivers/net/ice/base/ice_fdir.h\n@@ -79,6 +79,7 @@ enum ice_status ice_clear_pf_fd_table(struct ice_hw *hw);\n #define ICE_IPV6_SCTP_SRC_PORT_OFFSET\t54\n #define ICE_IPV6_SCTP_DST_PORT_OFFSET\t56\n \n+#define ICE_MAC_ETHTYPE_OFFSET\t\t12\n #define ICE_IPV4_TOS_OFFSET\t\t15\n #define ICE_IPV4_TTL_OFFSET\t\t22\n #define ICE_IPV6_TC_OFFSET\t\t14\n@@ -165,6 +166,7 @@ struct ice_fdir_udp_gtp {\n \n struct ice_fdir_extra {\n \tu8 dst_mac[ETH_ALEN];\t/* dest MAC address */\n+\t__be16 ether_type; /* for NON_IP_L2 */\n \tu32 usr_def[2];\t\t/* user data */\n \t__be16 vlan_type;\t/* VLAN ethertype */\n \t__be16 vlan_tag;\t/* VLAN tag info */\ndiff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c\nindex e741f5940..90302a6cb 100644\n--- a/drivers/net/ice/base/ice_flow.c\n+++ b/drivers/net/ice/base/ice_flow.c\n@@ -63,7 +63,7 @@ struct ice_flow_field_info ice_flds_info[ICE_FLOW_FIELD_IDX_MAX] = {\n \t/* ICE_FLOW_FIELD_IDX_C_VLAN */\n \tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_VLAN, 14, ICE_FLOW_FLD_SZ_VLAN),\n \t/* ICE_FLOW_FIELD_IDX_ETH_TYPE */\n-\tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_ETH, 12, ICE_FLOW_FLD_SZ_ETH_TYPE),\n+\tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_ETH, 0, ICE_FLOW_FLD_SZ_ETH_TYPE),\n \t/* IPv4 / IPv6 */\n \t/* ICE_FLOW_FIELD_IDX_IPV4_DSCP */\n \tICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_IPV4, 0, ICE_FLOW_FLD_SZ_IP_DSCP,\n@@ -532,6 +532,17 @@ static const u32 ice_ptypes_nat_t_esp[] = {\n \t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n };\n \n+static const u32 ice_ptypes_mac_non_ip_ofos[] = {\n+\t0x00000846, 0x00000000, 0x00000000, 0x00000000,\n+\t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n+\t0x00400000, 0x03FFF000, 0x00000000, 0x00000000,\n+\t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n+\t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n+\t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n+\t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n+\t0x00000000, 0x00000000, 0x00000000, 0x00000000,\n+};\n+\n /* Manage parameters and info. used during the creation of a flow profile */\n struct ice_flow_prof_params {\n \tenum ice_block blk;\n@@ -683,12 +694,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)\n \t\t\t\t ICE_FLOW_PTYPE_MAX);\n \t\t}\n \n-\t\tif (hdrs & ICE_FLOW_SEG_HDR_PPPOE) {\n-\t\t\tsrc = (const ice_bitmap_t *)ice_ptypes_pppoe;\n-\t\t\tice_and_bitmap(params->ptypes, params->ptypes, src,\n-\t\t\t\t ICE_FLOW_PTYPE_MAX);\n-\t\t}\n-\n \t\tif (hdrs & ICE_FLOW_SEG_HDR_IPV4) {\n \t\t\tsrc = !i ? (const ice_bitmap_t *)ice_ptypes_ipv4_ofos :\n \t\t\t\t(const ice_bitmap_t *)ice_ptypes_ipv4_il;\n@@ -731,6 +736,16 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)\n \t\t\t}\n \t\t}\n \n+\t\tif (hdrs & ICE_FLOW_SEG_HDR_ETH_NON_IP) {\n+\t\t\tsrc = (const ice_bitmap_t *)ice_ptypes_mac_non_ip_ofos;\n+\t\t\tice_and_bitmap(params->ptypes, params->ptypes,\n+\t\t\t\t src, ICE_FLOW_PTYPE_MAX);\n+\t\t} else if (hdrs & ICE_FLOW_SEG_HDR_PPPOE) {\n+\t\t\tsrc = (const ice_bitmap_t *)ice_ptypes_pppoe;\n+\t\t\tice_and_bitmap(params->ptypes, params->ptypes, src,\n+\t\t\t\t ICE_FLOW_PTYPE_MAX);\n+\t\t}\n+\n \t\tif (hdrs & ICE_FLOW_SEG_HDR_ICMP) {\n \t\t\tsrc = !i ? (const ice_bitmap_t *)ice_ptypes_icmp_of :\n \t\t\t\t(const ice_bitmap_t *)ice_ptypes_icmp_il;\ndiff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h\nindex c8a0483e3..9fb60a6d2 100644\n--- a/drivers/net/ice/base/ice_flow.h\n+++ b/drivers/net/ice/base/ice_flow.h\n@@ -148,6 +148,7 @@ enum ice_flow_seg_hdr {\n \tICE_FLOW_SEG_HDR_ESP\t\t= 0x00100000,\n \tICE_FLOW_SEG_HDR_AH\t\t= 0x00200000,\n \tICE_FLOW_SEG_HDR_NAT_T_ESP\t= 0x00400000,\n+\tICE_FLOW_SEG_HDR_ETH_NON_IP\t= 0x00800000,\n };\n \n /* These segements all have the same PTYPES, but are otherwise distinguished by\ndiff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h\nindex 94ea44265..cf622178e 100644\n--- a/drivers/net/ice/base/ice_type.h\n+++ b/drivers/net/ice/base/ice_type.h\n@@ -295,6 +295,7 @@ enum ice_fltr_ptype {\n \tICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP,\n \tICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP,\n \tICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER,\n+\tICE_FLTR_PTYPE_NON_IP_L2,\n \tICE_FLTR_PTYPE_FRAG_IPV4,\n \tICE_FLTR_PTYPE_NONF_IPV6_UDP,\n \tICE_FLTR_PTYPE_NONF_IPV6_TCP,\n", "prefixes": [ "v3", "01/53" ] }{ "id": 71533, "url": "