Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/62998/?format=api
http://patches.dpdk.org/api/patches/62998/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1573722187-148846-2-git-send-email-rosen.xu@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": "<1573722187-148846-2-git-send-email-rosen.xu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1573722187-148846-2-git-send-email-rosen.xu@intel.com", "date": "2019-11-14T09:02:49", "name": "[v18,01/19] net/i40e: i40e support ipn3ke FPGA port bonding", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "2750771cb05cf31a470f59ea9050069675115976", "submitter": { "id": 946, "url": "http://patches.dpdk.org/api/people/946/?format=api", "name": "Xu, Rosen", "email": "rosen.xu@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/1573722187-148846-2-git-send-email-rosen.xu@intel.com/mbox/", "series": [ { "id": 7455, "url": "http://patches.dpdk.org/api/series/7455/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7455", "date": "2019-11-14T09:02:48", "name": "add PCIe AER disable and IRQ support for ipn3ke", "version": 18, "mbox": "http://patches.dpdk.org/series/7455/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/62998/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/62998/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 85E81A04C2;\n\tThu, 14 Nov 2019 10:04:35 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5857444C7;\n\tThu, 14 Nov 2019 10:04:29 +0100 (CET)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by dpdk.org (Postfix) with ESMTP id 90325374E\n for <dev@dpdk.org>; Thu, 14 Nov 2019 10:04:27 +0100 (CET)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 14 Nov 2019 01:04:27 -0800", "from dpdk-rosen-02.sh.intel.com ([10.67.110.156])\n by fmsmga006.fm.intel.com with ESMTP; 14 Nov 2019 01:04:26 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.68,302,1569308400\"; d=\"scan'208\";a=\"406259463\"", "From": "Rosen Xu <rosen.xu@intel.com>", "To": "dev@dpdk.org", "Cc": "rosen.xu@intel.com, tianfei.zhang@intel.com, andy.pei@intel.com,\n xiaolong.ye@intel.com, ferruh.yigit@intel.com", "Date": "Thu, 14 Nov 2019 17:02:49 +0800", "Message-Id": "<1573722187-148846-2-git-send-email-rosen.xu@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1573722187-148846-1-git-send-email-rosen.xu@intel.com>", "References": "<1571917119-149534-2-git-send-email-andy.pei@intel.com>\n <1573722187-148846-1-git-send-email-rosen.xu@intel.com>", "Subject": "[dpdk-dev] [PATCH v18 01/19] net/i40e: i40e support ipn3ke FPGA\n\tport bonding", "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": "From: Andy Pei <andy.pei@intel.com>\n\nIn ipn3ke, each FPGA network side port bonding to an i40e pf,\neach i40e pf link status should get data from FPGA network,\nside port. This patch provide bonding relationship.\n\nSigned-off-by: Rosen Xu <rosen.xu@intel.com>\nSigned-off-by: Andy Pei <andy.pei@intel.com>\n---\n drivers/net/i40e/base/i40e_type.h | 3 +++\n drivers/net/i40e/i40e_ethdev.c | 6 ++++++\n drivers/net/i40e/rte_pmd_i40e.c | 21 +++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e.h | 18 ++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e_version.map | 8 +++++++-\n 5 files changed, 55 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h\nindex 112866b..06863d7 100644\n--- a/drivers/net/i40e/base/i40e_type.h\n+++ b/drivers/net/i40e/base/i40e_type.h\n@@ -660,6 +660,9 @@ struct i40e_hw {\n \tstruct i40e_nvm_info nvm;\n \tstruct i40e_fc_info fc;\n \n+\t/* switch device is used to get link status when i40e is in ipn3ke */\n+\tstruct rte_eth_dev *switch_dev;\n+\n \t/* pci info */\n \tu16 device_id;\n \tu16 vendor_id;\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 9a81f99..1afddeb 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -1393,6 +1393,9 @@ static inline void i40e_config_automask(struct i40e_pf *pf)\n \thw->adapter_stopped = 0;\n \thw->adapter_closed = 0;\n \n+\t/* Init switch device pointer */\n+\thw->switch_dev = NULL;\n+\n \t/*\n \t * Switch Tag value should not be identical to either the First Tag\n \t * or Second Tag values. So set something other than common Ethertype\n@@ -2906,6 +2909,9 @@ void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\n \telse\n \t\tupdate_link_aq(hw, &link, enable_lse, wait_to_complete);\n \n+\tif (hw->switch_dev)\n+\t\trte_eth_linkstatus_get(hw->switch_dev, &link);\n+\n \tret = rte_eth_linkstatus_set(dev, &link);\n \ti40e_notify_all_vfs_link_status(dev);\n \ndiff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c\nindex 4c3c708..fdcb1a4 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.c\n+++ b/drivers/net/i40e/rte_pmd_i40e.c\n@@ -3207,3 +3207,24 @@ int rte_pmd_i40e_flow_add_del_packet_template(\n \tI40E_WRITE_FLUSH(hw);\n \treturn 0;\n }\n+\n+int\n+rte_pmd_i40e_set_switch_dev(uint16_t port_id, struct rte_eth_dev *switch_dev)\n+{\n+\tstruct rte_eth_dev *i40e_dev;\n+\tstruct i40e_hw *hw;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\n+\ti40e_dev = &rte_eth_devices[port_id];\n+\tif (!is_i40e_supported(i40e_dev))\n+\t\treturn -ENOTSUP;\n+\n+\thw = I40E_DEV_PRIVATE_TO_HW(i40e_dev->data->dev_private);\n+\tif (!hw)\n+\t\treturn -1;\n+\n+\thw->switch_dev = switch_dev;\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h\nindex faac9e2..915cdf0 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.h\n+++ b/drivers/net/i40e/rte_pmd_i40e.h\n@@ -1061,4 +1061,22 @@ int rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype,\n \treturn 0;\n }\n \n+/**\n+ * For ipn3ke, i40e works with FPGA.\n+ * In this situation, i40e get link status from fpga,\n+ * fpga works as switch_dev for i40e.\n+ * This function set switch_dev for i40e.\n+ *\n+ * @param port_id\n+ * port_id of i40e device to be set switch device.\n+ * @param switch_dev\n+ * target switch device from which i40e device to get link status from.\n+ * @return\n+ * - (less than 0) if failed.\n+ * - (0) if success.\n+ */\n+__rte_experimental\n+int\n+rte_pmd_i40e_set_switch_dev(uint16_t port_id, struct rte_eth_dev *switch_dev);\n+\n #endif /* _PMD_I40E_H_ */\ndiff --git a/drivers/net/i40e/rte_pmd_i40e_version.map b/drivers/net/i40e/rte_pmd_i40e_version.map\nindex cccd576..ca5bcee 100644\n--- a/drivers/net/i40e/rte_pmd_i40e_version.map\n+++ b/drivers/net/i40e/rte_pmd_i40e_version.map\n@@ -64,4 +64,10 @@ DPDK_18.02 {\n \n \trte_pmd_i40e_inset_get;\n \trte_pmd_i40e_inset_set;\n-} DPDK_17.11;\n\\ No newline at end of file\n+} DPDK_17.11;\n+\n+EXPERIMENTAL {\n+\tglobal:\n+\n+\trte_pmd_i40e_set_switch_dev;\n+};\n", "prefixes": [ "v18", "01/19" ] }{ "id": 62998, "url": "