Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/68097/?format=api
http://patches.dpdk.org/api/patches/68097/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200410004551.17480-1-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": "<20200410004551.17480-1-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200410004551.17480-1-qi.z.zhang@intel.com", "date": "2020-04-10T00:45:49", "name": "[1/2] common/iavf: add flow director support in virtual channel", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "2eef4317e49f3dcadfa50bae0d4696788de95470", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200410004551.17480-1-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 9282, "url": "http://patches.dpdk.org/api/series/9282/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9282", "date": "2020-04-10T00:45:49", "name": "[1/2] common/iavf: add flow director support in virtual channel", "version": 1, "mbox": "http://patches.dpdk.org/series/9282/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/68097/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/68097/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 3C70BA0599;\n\tFri, 10 Apr 2020 02:42:08 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 908481D17E;\n\tFri, 10 Apr 2020 02:42:07 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id A91EC1D168\n for <dev@dpdk.org>; Fri, 10 Apr 2020 02:42:05 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Apr 2020 17:42:04 -0700", "from dpdk51.sh.intel.com ([10.67.110.245])\n by orsmga004.jf.intel.com with ESMTP; 09 Apr 2020 17:42:02 -0700" ], "IronPort-SDR": [ "\n QiK3bMshoB6nBOCYsu1XpidZzihRruI5+VAMrtA69WFeuqWWwjPrCcJ50V9Q6kmO9ijnlwVh5C\n LvDV7ls6P4iA==", "\n x1A+TOYGquYgrafbrNHkm6prbby2PSSVQ1AxAIVln9qNhggdJrp9t92bAqhNWnsSsuPEOEi0Pb\n aTbRW/a1CqGQ==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.72,364,1580803200\"; d=\"scan'208\";a=\"398772042\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "xiaolong.ye@intel.com", "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Simei Su <simei.su@intel.com>,\n Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>", "Date": "Fri, 10 Apr 2020 08:45:49 +0800", "Message-Id": "<20200410004551.17480-1-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "Subject": "[dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in\n\tvirtual channel", "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": "Adds new ops and structures to support VF to add/delete/validate/\nquery flow director.\n\nADD and VALIDATE FDIR share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.\nVF sends this request to PF by filling out the related field in\nvirtchnl_fdir_add. If the rule is created successfully, PF\nwill return flow id and program status to VF. If the rule is\nvalidated successfully, the PF will only return program status\nto VF.\n\nDELETE FDIR uses ops: VIRTCHNL_OP_DEL_FDIR_FILTER.\nVF sends this request to PF by filling out the related field in\nvirtchnl_fdir_del. If the rule is deleted successfully, PF\nwill return program status to VF.\n\nQuery FDIR uses ops: VIRTCHNL_OP_QUERY_FDIR_FILTER.\nVF sends this request to PF by filling out the related field in\nvirtchnl_fdir_query. If the request is successfully done by PF,\nPF will return program status and query info to VF.\n\nSigned-off-by: Simei Su <simei.su@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/common/iavf/virtchnl.h | 162 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 162 insertions(+)", "diff": "diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h\nindex c7c7fcc9c..36449731f 100644\n--- a/drivers/common/iavf/virtchnl.h\n+++ b/drivers/common/iavf/virtchnl.h\n@@ -137,6 +137,9 @@ enum virtchnl_ops {\n \tVIRTCHNL_OP_GET_SUPPORTED_RXDIDS = 44,\n \tVIRTCHNL_OP_ADD_RSS_CFG = 45,\n \tVIRTCHNL_OP_DEL_RSS_CFG = 46,\n+\tVIRTCHNL_OP_ADD_FDIR_FILTER = 47,\n+\tVIRTCHNL_OP_DEL_FDIR_FILTER = 48,\n+\tVIRTCHNL_OP_QUERY_FDIR_FILTER = 49,\n };\n \n /* These macros are used to generate compilation errors if a structure/union\n@@ -254,6 +257,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);\n #define VIRTCHNL_VF_CAP_DCF\t\t\t0X40000000\n #define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC\t0X04000000\n #define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF\t\t0X08000000\n+#define VIRTCHNL_VF_OFFLOAD_FDIR_PF\t\t0X10000000\n \t/* 0X80000000 is reserved */\n \n /* Define below the capability flags that are not offloads */\n@@ -620,6 +624,11 @@ enum virtchnl_action {\n \t/* action types */\n \tVIRTCHNL_ACTION_DROP = 0,\n \tVIRTCHNL_ACTION_TC_REDIRECT,\n+\tVIRTCHNL_ACTION_PASSTHRU,\n+\tVIRTCHNL_ACTION_QUEUE,\n+\tVIRTCHNL_ACTION_Q_REGION,\n+\tVIRTCHNL_ACTION_MARK,\n+\tVIRTCHNL_ACTION_COUNT,\n };\n \n enum virtchnl_flow_type {\n@@ -944,6 +953,150 @@ struct virtchnl_rss_cfg {\n };\n \n VIRTCHNL_CHECK_STRUCT_LEN(2444, virtchnl_rss_cfg);\n+\n+/* action configuration for FDIR */\n+struct virtchnl_filter_action {\n+\tenum virtchnl_action type;\n+\tunion {\n+\t\t/* used for queue and qgroup action */\n+\t\tstruct {\n+\t\t\tu16 index;\n+\t\t\tu8 region;\n+\t\t} queue;\n+\t\t/* used for count action */\n+\t\tstruct {\n+\t\t\t/* share counter ID with other flow rules */\n+\t\t\tu8 shared;\n+\t\t\tu32 id; /* counter ID */\n+\t\t} count;\n+\t\t/* used for mark action */\n+\t\tu32 mark_id;\n+\t\tu8 reserve[32];\n+\t} act_conf;\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(36, virtchnl_filter_action);\n+\n+#define VIRTCHNL_MAX_NUM_ACTIONS 8\n+\n+struct virtchnl_filter_action_set {\n+\t/* action number must be less then VIRTCHNL_MAX_NUM_ACTIONS */\n+\tint count;\n+\tstruct virtchnl_filter_action actions[VIRTCHNL_MAX_NUM_ACTIONS];\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(292, virtchnl_filter_action_set);\n+\n+/* pattern and action for FDIR rule */\n+struct virtchnl_fdir_rule {\n+\tstruct virtchnl_proto_hdrs proto_hdrs;\n+\tstruct virtchnl_filter_action_set action_set;\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);\n+\n+/* query information to retrieve fdir rule counters.\n+ * PF will fill out this structure to reset counter.\n+ */\n+struct virtchnl_fdir_query_info {\n+\tu32 match_packets_valid:1;\n+\tu32 match_bytes_valid:1;\n+\tu32 reserved:30; /* Reserved, must be zero. */\n+\tu32 pad;\n+\tu64 matched_packets; /* Number of packets for this rule. */\n+\tu64 matched_bytes; /* Number of bytes through this rule. */\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_fdir_query_info);\n+\n+/* Status returned to VF after VF requests FDIR commands\n+ * VIRTCHNL_FDIR_SUCCESS\n+ * VF FDIR related request is successfully done by PF\n+ * The request can be OP_ADD/DEL/QUERY_FDIR_FILTER.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE\n+ * OP_ADD_FDIR_FILTER request is failed due to no Hardware resource.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_RULE_EXIST\n+ * OP_ADD_FDIR_FILTER request is failed due to the rule is already existed.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT\n+ * OP_ADD_FDIR_FILTER request is failed due to conflict with existing rule.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST\n+ * OP_DEL_FDIR_FILTER request is failed due to this rule doesn't exist.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_RULE_INVALID\n+ * OP_ADD_FDIR_FILTER request is failed due to parameters validation\n+ * or HW doesn't support.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT\n+ * OP_ADD/DEL_FDIR_FILTER request is failed due to timing out\n+ * for programming.\n+ *\n+ * VIRTCHNL_FDIR_FAILURE_QUERY_INVALID\n+ * OP_QUERY_FDIR_FILTER request is failed due to parameters validation,\n+ * for example, VF query counter of a rule who has no counter action.\n+ */\n+enum virtchnl_fdir_prgm_status {\n+\tVIRTCHNL_FDIR_SUCCESS = 0,\n+\tVIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE,\n+\tVIRTCHNL_FDIR_FAILURE_RULE_EXIST,\n+\tVIRTCHNL_FDIR_FAILURE_RULE_CONFLICT,\n+\tVIRTCHNL_FDIR_FAILURE_RULE_NONEXIST,\n+\tVIRTCHNL_FDIR_FAILURE_RULE_INVALID,\n+\tVIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT,\n+\tVIRTCHNL_FDIR_FAILURE_QUERY_INVALID,\n+};\n+\n+/* VIRTCHNL_OP_ADD_FDIR_FILTER\n+ * VF sends this request to PF by filling out vsi_id,\n+ * validate_only and rule_cfg. PF will return flow_id\n+ * if the request is successfully done and return add_status to VF.\n+ */\n+struct virtchnl_fdir_add {\n+\tu16 vsi_id; /* INPUT */\n+\t/*\n+\t * 1 for validating a fdir rule, 0 for creating a fdir rule.\n+\t * Validate and create share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.\n+\t */\n+\tu16 validate_only; /* INPUT */\n+\tu32 flow_id; /* OUTPUT */\n+\tstruct virtchnl_fdir_rule rule_cfg; /* INPUT */\n+\tenum virtchnl_fdir_prgm_status status; /* OUTPUT */\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);\n+\n+/* VIRTCHNL_OP_DEL_FDIR_FILTER\n+ * VF sends this request to PF by filling out vsi_id\n+ * and flow_id. PF will return del_status to VF.\n+ */\n+struct virtchnl_fdir_del {\n+\tu16 vsi_id; /* INPUT */\n+\tu16 pad;\n+\tu32 flow_id; /* INPUT */\n+\tenum virtchnl_fdir_prgm_status status; /* OUTPUT */\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_fdir_del);\n+\n+/* VIRTCHNL_OP_QUERY_FDIR_FILTER\n+ * VF sends this request to PF by filling out vsi_id,\n+ * flow_id and reset_counter. PF will return query_info\n+ * and query_status to VF.\n+ */\n+struct virtchnl_fdir_query {\n+\tu16 vsi_id; /* INPUT */\n+\tu16 pad1[3];\n+\tu32 flow_id; /* INPUT */\n+\tu32 reset_counter:1; /* INPUT */\n+\tstruct virtchnl_fdir_query_info query_info; /* OUTPUT */\n+\tenum virtchnl_fdir_prgm_status status; /* OUTPUT */\n+\tu32 pad2;\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_fdir_query);\n /**\n * virtchnl_vc_validate_vf_msg\n * @ver: Virtchnl version info\n@@ -1134,6 +1287,15 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,\n \tcase VIRTCHNL_OP_DEL_RSS_CFG:\n \t\tvalid_len = sizeof(struct virtchnl_rss_cfg);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_ADD_FDIR_FILTER:\n+\t\tvalid_len = sizeof(struct virtchnl_fdir_add);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_DEL_FDIR_FILTER:\n+\t\tvalid_len = sizeof(struct virtchnl_fdir_del);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_QUERY_FDIR_FILTER:\n+\t\tvalid_len = sizeof(struct virtchnl_fdir_query);\n+\t\tbreak;\n \t/* These are always errors coming from the VF. */\n \tcase VIRTCHNL_OP_EVENT:\n \tcase VIRTCHNL_OP_UNKNOWN:\n", "prefixes": [ "1/2" ] }{ "id": 68097, "url": "