Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45267/?format=api
http://patches.dpdk.org/api/patches/45267/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-5-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": "<20180925023442.134705-5-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180925023442.134705-5-qi.z.zhang@intel.com", "date": "2018-09-25T02:34:26", "name": "[04/20] net/i40e/base: enable cloud filter mode for switch config", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "4a0ab288ad85a8c89ed256e7f8a4de2f10c3856d", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-5-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 1477, "url": "http://patches.dpdk.org/api/series/1477/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1477", "date": "2018-09-25T02:34:22", "name": "base code update", "version": 1, "mbox": "http://patches.dpdk.org/series/1477/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/45267/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/45267/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ADCC51B1D8;\n\tTue, 25 Sep 2018 04:34:24 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id BF0FE5F2B\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 04:34:10 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Sep 2018 19:34:08 -0700", "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga005.jf.intel.com with ESMTP; 24 Sep 2018 19:33:47 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.54,300,1534834800\"; d=\"scan'208\";a=\"259958458\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "beilei.xing@intel.com", "Cc": "dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>", "Date": "Tue, 25 Sep 2018 10:34:26 +0800", "Message-Id": "<20180925023442.134705-5-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180925023442.134705-1-qi.z.zhang@intel.com>", "References": "<20180925023442.134705-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 04/20] net/i40e/base: enable cloud filter mode\n\tfor switch config", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add definitions for L4 filters and switch modes based on cloud filters\nmodes and extend the set switch config command to include the additional\ncloud filter mode.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/i40e/base/i40e_adminq_cmd.h | 30 +++++++++++++++++++++++++++++-\n drivers/net/i40e/base/i40e_common.c | 4 +++-\n drivers/net/i40e/base/i40e_prototype.h | 2 +-\n drivers/net/i40e/base/i40e_type.h | 9 +++++++++\n drivers/net/i40e/i40e_ethdev.c | 2 +-\n 5 files changed, 43 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h\nindex af9c90b78..2d714ec5e 100644\n--- a/drivers/net/i40e/base/i40e_adminq_cmd.h\n+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h\n@@ -775,7 +775,35 @@ struct i40e_aqc_set_switch_config {\n \t */\n \t__le16\tfirst_tag;\n \t__le16\tsecond_tag;\n-\tu8\treserved[6];\n+\t/* Next byte is split into following:\n+\t * Bit 7 : 0 : No action, 1: Switch to mode defined by bits 6:0\n+\t * Bit 6 : 0 : Destination Port, 1: source port\n+\t * Bit 5..4 : L4 type\n+\t * 0: rsvd\n+\t * 1: TCP\n+\t * 2: UDP\n+\t * 3: Both TCP and UDP\n+\t * Bits 3:0 Mode\n+\t * 0: default mode\n+\t * 1: L4 port only mode\n+\t * 2: non-tunneled mode\n+\t * 3: tunneled mode\n+\t */\n+#define I40E_AQ_SET_SWITCH_BIT7_VALID\t\t0x80\n+\n+#define I40E_AQ_SET_SWITCH_L4_SRC_PORT\t\t0x40\n+\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_RSVD\t\t0x00\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_TCP\t\t0x10\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_UDP\t\t0x20\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_BOTH\t\t0x30\n+\n+#define I40E_AQ_SET_SWITCH_MODE_DEFAULT\t\t0x00\n+#define I40E_AQ_SET_SWITCH_MODE_L4_PORT\t\t0x01\n+#define I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL\t0x02\n+#define I40E_AQ_SET_SWITCH_MODE_TUNNEL\t\t0x03\n+\tu8\tmode;\n+\tu8\trsvd5[5];\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);\ndiff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex ee117bd5e..856e7bef6 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -2681,13 +2681,14 @@ enum i40e_status_code i40e_aq_get_switch_config(struct i40e_hw *hw,\n * i40e_aq_set_switch_config\n * @hw: pointer to the hardware structure\n * @flags: bit flag values to set\n+ * @mode: cloud filter mode\n * @valid_flags: which bit flags to set\n * @cmd_details: pointer to command details structure or NULL\n *\n * Set switch configuration bits\n **/\n enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n-\t\t\t\tu16 flags, u16 valid_flags,\n+\t\t\t\tu16 flags, u16 valid_flags, u8 mode,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details)\n {\n \tstruct i40e_aq_desc desc;\n@@ -2699,6 +2700,7 @@ enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n \t\t\t\t\t i40e_aqc_opc_set_switch_config);\n \tscfg->flags = CPU_TO_LE16(flags);\n \tscfg->valid_flags = CPU_TO_LE16(valid_flags);\n+\tscfg->mode = mode;\n \tif (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {\n \t\tscfg->switch_tag = CPU_TO_LE16(hw->switch_tag);\n \t\tscfg->first_tag = CPU_TO_LE16(hw->first_tag);\ndiff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h\nindex 50dd80709..6331aadf2 100644\n--- a/drivers/net/i40e/base/i40e_prototype.h\n+++ b/drivers/net/i40e/base/i40e_prototype.h\n@@ -199,7 +199,7 @@ enum i40e_status_code i40e_aq_get_switch_config(struct i40e_hw *hw,\n \t\t\t\tu16 buf_size, u16 *start_seid,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n-\t\t\t\tu16 flags, u16 valid_flags,\n+\t\t\t\tu16 flags, u16 valid_flags, u8 mode,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_request_resource(struct i40e_hw *hw,\n \t\t\t\tenum i40e_aq_resources_ids resource,\ndiff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h\nindex 7dde3bfd2..b50a82307 100644\n--- a/drivers/net/i40e/base/i40e_type.h\n+++ b/drivers/net/i40e/base/i40e_type.h\n@@ -349,6 +349,15 @@ struct i40e_hw_capabilities {\n #define I40E_NVM_IMAGE_TYPE_CLOUD\t0x2\n #define I40E_NVM_IMAGE_TYPE_UDP_CLOUD\t0x3\n \n+\t/* Cloud filter modes:\n+\t * Mode1: Filter on L4 port only\n+\t * Mode2: Filter for non-tunneled traffic\n+\t * Mode3: Filter for tunnel traffic\n+\t */\n+#define I40E_CLOUD_FILTER_MODE1\t0x6\n+#define I40E_CLOUD_FILTER_MODE2\t0x7\n+#define I40E_CLOUD_FILTER_MODE3\t0x8\n+\n \tu32 management_mode;\n \tu32 mng_protocols_over_mctp;\n #define I40E_MNG_PROTOCOL_PLDM\t\t0x2\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex de25de650..706c82dc4 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -3653,7 +3653,7 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,\n \t\t\tif (vlan_type == ETH_VLAN_TYPE_OUTER)\n \t\t\t\thw->second_tag = rte_cpu_to_le_16(tpid);\n \t\t}\n-\t\tret = i40e_aq_set_switch_config(hw, 0, 0, NULL);\n+\t\tret = i40e_aq_set_switch_config(hw, 0, 0, 0, NULL);\n \t\tif (ret != I40E_SUCCESS) {\n \t\t\tPMD_DRV_LOG(ERR,\n \t\t\t\t \"Set switch config failed aq_err: %d\",\n", "prefixes": [ "04/20" ] }{ "id": 45267, "url": "