Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/96583/?format=api
https://patches.dpdk.org/api/patches/96583/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210803083817.1243796-6-wenjun1.wu@intel.com/", "project": { "id": 1, "url": "https://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": "<20210803083817.1243796-6-wenjun1.wu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210803083817.1243796-6-wenjun1.wu@intel.com", "date": "2021-08-03T08:38:00", "name": "[05/22] net/ice/base: add VLAN TPID for VLAN filters", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "f73520f160ecb33d38569aa5df350b98063a7d14", "submitter": { "id": 2083, "url": "https://patches.dpdk.org/api/people/2083/?format=api", "name": "Wenjun Wu", "email": "wenjun1.wu@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210803083817.1243796-6-wenjun1.wu@intel.com/mbox/", "series": [ { "id": 18158, "url": "https://patches.dpdk.org/api/series/18158/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18158", "date": "2021-08-03T08:37:55", "name": "backport feature support to DPDK 20.11", "version": 1, "mbox": "https://patches.dpdk.org/series/18158/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/96583/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/96583/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 996AAA0C41;\n\tTue, 3 Aug 2021 10:57:38 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 023C7411DA;\n\tTue, 3 Aug 2021 10:57:18 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id AA1BB411BB\n for <dev@dpdk.org>; Tue, 3 Aug 2021 10:57:12 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 03 Aug 2021 01:56:53 -0700", "from wuwenjun.sh.intel.com ([10.67.110.197])\n by fmsmga008.fm.intel.com with ESMTP; 03 Aug 2021 01:56:52 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10064\"; a=\"211764378\"", "E=Sophos;i=\"5.84,291,1620716400\"; d=\"scan'208\";a=\"211764378\"", "E=Sophos;i=\"5.84,291,1620716400\"; d=\"scan'208\";a=\"479396573\"" ], "X-ExtLoop1": "1", "From": "Wenjun Wu <wenjun1.wu@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 3 Aug 2021 16:38:00 +0800", "Message-Id": "<20210803083817.1243796-6-wenjun1.wu@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210803083817.1243796-1-wenjun1.wu@intel.com>", "References": "<20210803083817.1243796-1-wenjun1.wu@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 05/22] net/ice/base: add VLAN TPID for VLAN\n filters", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "From: Qi Zhang <qi.z.zhang@intel.com>\n\n[ upstream commit a6b975d23c10756083357355372c4f545ddc1ebe ]\n\nCurrently VLAN filters via RID4 are only based on VLAN ID. However, with\nincoming support for Double VLAN Mode (DVM), the driver needs to be able\nto support filtering on VLAN ID + VLAN TPID (i.e. 0x8100, 0x88a8, etc.).\nAdd support for this by adding two fields to the ice_fltr_info\nstructure. First, add the tpid_valid field so the code can determine\nwhether or not to overwrite the default 0x8100 value for programming\npackets or use the tpid field.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 6 ++++++\n drivers/net/ice/base/ice_switch.h | 2 ++\n 2 files changed, 8 insertions(+)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex e6ea04183f..8d455f5995 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -14,6 +14,7 @@\n #define ICE_PPP_IPV6_PROTO_ID\t\t0x0057\n #define ICE_IPV6_ETHER_ID\t\t0x86DD\n #define ICE_TCP_PROTO_ID\t\t0x06\n+#define ICE_ETH_P_8021Q\t\t\t0x8100\n \n /* Dummy ethernet header needed in the ice_aqc_sw_rules_elem\n * struct to configure any switch filter rules.\n@@ -3034,6 +3035,7 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \t\t struct ice_aqc_sw_rules_elem *s_rule, enum ice_adminq_opc opc)\n {\n \tu16 vlan_id = ICE_MAX_VLAN_ID + 1;\n+\tu16 vlan_tpid = ICE_ETH_P_8021Q;\n \tvoid *daddr = NULL;\n \tu16 eth_hdr_sz;\n \tu8 *eth_hdr;\n@@ -3106,6 +3108,8 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \t\tbreak;\n \tcase ICE_SW_LKUP_VLAN:\n \t\tvlan_id = f_info->l_data.vlan.vlan_id;\n+\t\tif (f_info->l_data.vlan.tpid_valid)\n+\t\t\tvlan_tpid = f_info->l_data.vlan.tpid;\n \t\tif (f_info->fltr_act == ICE_FWD_TO_VSI ||\n \t\t f_info->fltr_act == ICE_FWD_TO_VSI_LIST) {\n \t\t\tact |= ICE_SINGLE_ACT_PRUNE;\n@@ -3149,6 +3153,8 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \tif (!(vlan_id > ICE_MAX_VLAN_ID)) {\n \t\toff = (_FORCE_ __be16 *)(eth_hdr + ICE_ETH_VLAN_TCI_OFFSET);\n \t\t*off = CPU_TO_BE16(vlan_id);\n+\t\toff = (_FORCE_ __be16 *)(eth_hdr + ICE_ETH_ETHTYPE_OFFSET);\n+\t\t*off = CPU_TO_BE16(vlan_tpid);\n \t}\n \n \t/* Create the switch rule with the final dummy Ethernet header */\ndiff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h\nindex be9b74fd4c..392eb369c7 100644\n--- a/drivers/net/ice/base/ice_switch.h\n+++ b/drivers/net/ice/base/ice_switch.h\n@@ -160,6 +160,8 @@ struct ice_fltr_info {\n \t\t} mac_vlan;\n \t\tstruct {\n \t\t\tu16 vlan_id;\n+\t\t\tu16 tpid;\n+\t\t\tu8 tpid_valid;\n \t\t} vlan;\n \t\t/* Set lkup_type as ICE_SW_LKUP_ETHERTYPE\n \t\t * if just using ethertype as filter. Set lkup_type as\n", "prefixes": [ "05/22" ] }{ "id": 96583, "url": "