Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/73486/?format=api
https://patches.dpdk.org/api/patches/73486/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200708011841.22295-2-chenxux.di@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": "<20200708011841.22295-2-chenxux.di@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200708011841.22295-2-chenxux.di@intel.com", "date": "2020-07-08T01:18:37", "name": "[v4,1/5] net/i40e: add private APIs", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a56ffae446cf152bc76e22eea2ea95b0c037e229", "submitter": { "id": 1409, "url": "https://patches.dpdk.org/api/people/1409/?format=api", "name": "Chenxu Di", "email": "chenxux.di@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/20200708011841.22295-2-chenxux.di@intel.com/mbox/", "series": [ { "id": 10869, "url": "https://patches.dpdk.org/api/series/10869/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10869", "date": "2020-07-08T01:18:36", "name": "re-implement legacy filter functions by private API", "version": 4, "mbox": "https://patches.dpdk.org/series/10869/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/73486/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/73486/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 2D2A2A00BE;\n\tWed, 8 Jul 2020 03:37:26 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BBFED1DC30;\n\tWed, 8 Jul 2020 03:37:18 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id D64751DB4F\n for <dev@dpdk.org>; Wed, 8 Jul 2020 03:37:15 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jul 2020 18:37:15 -0700", "from intel.sh.intel.com ([10.239.255.20])\n by orsmga002.jf.intel.com with ESMTP; 07 Jul 2020 18:37:14 -0700" ], "IronPort-SDR": [ "\n Sf4JVm3jx7xvFsDHvMrFSWzYo4LNIxYAkoxa9UN/cQ5kUL8/DjyOyvKB2vjujS42u+RJ/hOQKR\n 45qd6EeUZCiw==", "\n 26wgb5yT5ayPNnmO56pFFSnhcN0XA8nxiDdonqlhVbyX8HdaVqzL0+B8aeq63DRAV06ERBN5cV\n /Kdk5PoGbPQg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9675\"; a=\"149235869\"", "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"149235869\"", "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"297570792\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Chenxu Di <chenxux.di@intel.com>", "To": "dev@dpdk.org", "Cc": "Yang Qiming <qiming.yang@intel.com>,\n\tChenxu Di <chenxux.di@intel.com>", "Date": "Wed, 8 Jul 2020 01:18:37 +0000", "Message-Id": "<20200708011841.22295-2-chenxux.di@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200708011841.22295-1-chenxux.di@intel.com>", "References": "<20200611060142.75465-1-chenxux.di@intel.com>\n <20200708011841.22295-1-chenxux.di@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 1/5] net/i40e: add private APIs", "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": "The legacy filter API will be superseded by rte_flow.\nThere are also several small features which can not be\nimplemented in rte_flow. This patch re-implemented these\nfeatures as private API.\nThree APIs are added:\nrte_pmd_i40e_get_fdir_info.\nrte_pmd_i40e_get_fdir_stats.\nrte_pmd_i40e_set_gre_key_len.\n\nSigned-off-by: Chenxu Di <chenxux.di@intel.com>\nAcked-by: Jeff Guo <jia.guo@intel.com>\n---\n doc/guides/rel_notes/release_20_08.rst | 7 ++++\n drivers/net/i40e/i40e_ethdev.c | 2 +-\n drivers/net/i40e/i40e_ethdev.h | 5 +++\n drivers/net/i40e/i40e_fdir.c | 4 +-\n drivers/net/i40e/rte_pmd_i40e.c | 51 +++++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e.h | 49 ++++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e_version.map | 3 ++\n 7 files changed, 118 insertions(+), 3 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst\nindex eaa9d13b5..93a793299 100644\n--- a/doc/guides/rel_notes/release_20_08.rst\n+++ b/doc/guides/rel_notes/release_20_08.rst\n@@ -97,6 +97,13 @@ New Features\n \n Updated Marvell octeontx2 driver with cn98xx support.\n \n+* **Updated the Intel i40e driver.**\n+\n+ Updated the Intel i40e driver with new features and improvements, including:\n+\n+ * Re-implemented get_fdir_info and get_fdir_stat in private API.\n+ * Re-implemented set_gre_key_len in private API.\n+\n * **Updated the Intel ice driver.**\n \n Updated the Intel ice driver with new features and improvements, including:\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 777e14926..392b133b8 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -8775,7 +8775,7 @@ i40e_tunnel_filter_param_check(struct i40e_pf *pf,\n \n #define I40E_GL_PRS_FVBM_MSK_ENA 0x80000000\n #define I40E_GL_PRS_FVBM(_i) (0x00269760 + ((_i) * 4))\n-static int\n+int\n i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len)\n {\n \tstruct i40e_pf *pf = &((struct i40e_adapter *)hw->back)->pf;\ndiff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h\nindex e5d0ce53f..192636927 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -1270,6 +1270,11 @@ enum i40e_filter_pctype\n \t\t\t\tuint16_t flow_type);\n uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,\n \t\t\t\t enum i40e_filter_pctype pctype);\n+int i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len);\n+void i40e_fdir_info_get(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_eth_fdir_info *fdir);\n+void i40e_fdir_stats_get(struct rte_eth_dev *dev,\n+\t\t\t struct rte_eth_fdir_stats *stat);\n int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,\n \t\t\t enum rte_filter_op filter_op,\n \t\t\t void *arg);\ndiff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c\nindex d59399afe..4a778db4c 100644\n--- a/drivers/net/i40e/i40e_fdir.c\n+++ b/drivers/net/i40e/i40e_fdir.c\n@@ -2169,7 +2169,7 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,\n * @fdir: a pointer to a structure of type *rte_eth_fdir_info* to be filled with\n * the flow director information.\n */\n-static void\n+void\n i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir)\n {\n \tstruct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n@@ -2214,7 +2214,7 @@ i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir)\n * @stat: a pointer to a structure of type *rte_eth_fdir_stats* to be filled with\n * the flow director statistics.\n */\n-static void\n+void\n i40e_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *stat)\n {\n \tstruct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c\nindex 446e31710..e216e6783 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.c\n+++ b/drivers/net/i40e/rte_pmd_i40e.c\n@@ -3209,6 +3209,57 @@ rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype,\n \treturn 0;\n }\n \n+int\n+rte_pmd_i40e_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_i40e_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\ti40e_fdir_info_get(dev, fdir_info);\n+\n+\treturn 0;\n+}\n+\n+int\n+rte_pmd_i40e_get_fdir_stats(uint16_t port, struct rte_eth_fdir_stats *fdir_stat)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_i40e_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\ti40e_fdir_stats_get(dev, fdir_stat);\n+\n+\treturn 0;\n+}\n+\n+int\n+rte_pmd_i40e_set_gre_key_len(uint16_t port, uint8_t len)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct i40e_pf *pf;\n+\tstruct i40e_hw *hw;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\tif (!is_i40e_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\tpf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\thw = I40E_PF_TO_HW(pf);\n+\n+\treturn i40e_dev_set_gre_key_len(hw, len);\n+}\n+\n int\n rte_pmd_i40e_set_switch_dev(uint16_t port_id, struct rte_eth_dev *switch_dev)\n {\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h\nindex 915cdf076..0f6715efc 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.h\n+++ b/drivers/net/i40e/rte_pmd_i40e.h\n@@ -1061,6 +1061,55 @@ rte_pmd_i40e_inset_field_clear(uint64_t *inset, uint8_t field_idx)\n \treturn 0;\n }\n \n+/**\n+ * Get port fdir info\n+ *\n+ * @param port\n+ * The port identifier of the Ethernet device.\n+ * @param fdir_info\n+ * The fdir info of the port\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENODEV) if *port* invalid.\n+ * - (-ENOTSUP) if operation not supported.\n+ */\n+__rte_experimental\n+int\n+rte_pmd_i40e_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info);\n+\n+/**\n+ * Get port fdir status\n+ *\n+ * @param port\n+ * The port identifier of the Ethernet device.\n+ * @param fdir_stat\n+ * The fdir status of the port\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENODEV) if *port* invalid.\n+ * - (-ENOTSUP) if operation not supported.\n+ */\n+__rte_experimental\n+int\n+rte_pmd_i40e_get_fdir_stats(uint16_t port,\n+\t\t\t struct rte_eth_fdir_stats *fdir_stat);\n+\n+/**\n+ * Set GRE key length\n+ *\n+ * @param port\n+ * The port identifier of the Ethernet device.\n+ * @param len\n+ * Length of gre-key\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENODEV) if *port* invalid.\n+ * - (-ENOTSUP) if operation not supported.\n+ */\n+__rte_experimental\n+int\n+rte_pmd_i40e_set_gre_key_len(uint16_t port, uint8_t len);\n+\n /**\n * For ipn3ke, i40e works with FPGA.\n * In this situation, i40e get link status from fpga,\ndiff --git a/drivers/net/i40e/rte_pmd_i40e_version.map b/drivers/net/i40e/rte_pmd_i40e_version.map\nindex c92c0cf46..f6cd3b356 100644\n--- a/drivers/net/i40e/rte_pmd_i40e_version.map\n+++ b/drivers/net/i40e/rte_pmd_i40e_version.map\n@@ -42,5 +42,8 @@ DPDK_20.0 {\n EXPERIMENTAL {\n \tglobal:\n \n+\trte_pmd_i40e_get_fdir_info;\n+\trte_pmd_i40e_get_fdir_stats;\n+\trte_pmd_i40e_set_gre_key_len;\n \trte_pmd_i40e_set_switch_dev;\n };\n", "prefixes": [ "v4", "1/5" ] }{ "id": 73486, "url": "