Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/62253/?format=api
https://patches.dpdk.org/api/patches/62253/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1572479604-178752-8-git-send-email-orika@mellanox.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": "<1572479604-178752-8-git-send-email-orika@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1572479604-178752-8-git-send-email-orika@mellanox.com", "date": "2019-10-30T23:53:16", "name": "[v7,07/14] net/mlx5: add get hairpin capabilities", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b2200a05e4f311553cf3ce9c46e4c9ff9e9a553d", "submitter": { "id": 795, "url": "https://patches.dpdk.org/api/people/795/?format=api", "name": "Ori Kam", "email": "orika@mellanox.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1572479604-178752-8-git-send-email-orika@mellanox.com/mbox/", "series": [ { "id": 7165, "url": "https://patches.dpdk.org/api/series/7165/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7165", "date": "2019-10-30T23:53:09", "name": "add hairpin feature", "version": 7, "mbox": "https://patches.dpdk.org/series/7165/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/62253/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/62253/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 62652A00BE;\n\tThu, 31 Oct 2019 00:54:31 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E380C1C192;\n\tThu, 31 Oct 2019 00:53:48 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 74A731C12A\n for <dev@dpdk.org>; Thu, 31 Oct 2019 00:53:40 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n orika@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 31 Oct 2019 01:53:38 +0200", "from pegasus04.mtr.labs.mlnx. (pegasus04.mtr.labs.mlnx\n [10.210.16.126])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x9UNrQvV007114;\n Thu, 31 Oct 2019 01:53:38 +0200" ], "From": "Ori Kam <orika@mellanox.com>", "To": "John McNamara <john.mcnamara@intel.com>,\n Marko Kovacevic <marko.kovacevic@intel.com>,\n Matan Azrad <matan@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>", "Cc": "dev@dpdk.org, orika@mellanox.com, jingjing.wu@intel.com,\n stephen@networkplumber.org", "Date": "Wed, 30 Oct 2019 23:53:16 +0000", "Message-Id": "<1572479604-178752-8-git-send-email-orika@mellanox.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1572479604-178752-1-git-send-email-orika@mellanox.com>", "References": "<1569479349-36962-1-git-send-email-orika@mellanox.com>\n <1572479604-178752-1-git-send-email-orika@mellanox.com>", "Subject": "[dpdk-dev] [PATCH v7 07/14] net/mlx5: add get hairpin capabilities", "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": "This commits adds the hairpin get capabilities function.\n\nSigned-off-by: Ori Kam <orika@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n doc/guides/rel_notes/release_19_11.rst | 1 +\n drivers/net/mlx5/mlx5.c | 2 ++\n drivers/net/mlx5/mlx5.h | 3 ++-\n drivers/net/mlx5/mlx5_ethdev.c | 27 +++++++++++++++++++++++++++\n 4 files changed, 32 insertions(+), 1 deletion(-)", "diff": "diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst\nindex 6871453..f6e90cb 100644\n--- a/doc/guides/rel_notes/release_19_11.rst\n+++ b/doc/guides/rel_notes/release_19_11.rst\n@@ -156,6 +156,7 @@ New Features\n * Added support for VLAN set PCP offload command.\n * Added support for VLAN set VID offload command.\n * Added support for matching on packets withe Geneve tunnel header.\n+ * Added hairpin support.\n \n * **Updated the AF_XDP PMD.**\n \ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 8e7ff1d..e72e9eb 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1039,6 +1039,7 @@ struct mlx5_dev_spawn_data {\n \t.udp_tunnel_port_add = mlx5_udp_tunnel_port_add,\n \t.get_module_info = mlx5_get_module_info,\n \t.get_module_eeprom = mlx5_get_module_eeprom,\n+\t.hairpin_cap_get = mlx5_hairpin_cap_get,\n };\n \n /* Available operations from secondary process. */\n@@ -1101,6 +1102,7 @@ struct mlx5_dev_spawn_data {\n \t.is_removed = mlx5_is_removed,\n \t.get_module_info = mlx5_get_module_info,\n \t.get_module_eeprom = mlx5_get_module_eeprom,\n+\t.hairpin_cap_get = mlx5_hairpin_cap_get,\n };\n \n /**\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 566bf2d..742bedd 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -789,7 +789,8 @@ int mlx5_get_module_info(struct rte_eth_dev *dev,\n \t\t\t struct rte_eth_dev_module_info *modinfo);\n int mlx5_get_module_eeprom(struct rte_eth_dev *dev,\n \t\t\t struct rte_dev_eeprom_info *info);\n-\n+int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,\n+\t\t\t struct rte_eth_hairpin_cap *cap);\n /* mlx5_mac.c */\n \n int mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN]);\ndiff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c\nindex 2278b24..fe1b4d4 100644\n--- a/drivers/net/mlx5/mlx5_ethdev.c\n+++ b/drivers/net/mlx5/mlx5_ethdev.c\n@@ -2114,3 +2114,30 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,\n \trte_free(eeprom);\n \treturn ret;\n }\n+\n+/**\n+ * DPDK callback to retrieve hairpin capabilities.\n+ *\n+ * @param dev\n+ * Pointer to Ethernet device structure.\n+ * @param[out] cap\n+ * Storage for hairpin capability data.\n+ *\n+ * @return\n+ * 0 on success, a negative errno value otherwise and rte_errno is set.\n+ */\n+int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,\n+\t\t\t struct rte_eth_hairpin_cap *cap)\n+{\n+\tstruct mlx5_priv *priv = dev->data->dev_private;\n+\n+\tif (priv->sh->devx == 0) {\n+\t\trte_errno = ENOTSUP;\n+\t\treturn -rte_errno;\n+\t}\n+\tcap->max_nb_queues = UINT16_MAX;\n+\tcap->max_rx_2_tx = 1;\n+\tcap->max_tx_2_rx = 1;\n+\tcap->max_nb_desc = 8192;\n+\treturn 0;\n+}\n", "prefixes": [ "v7", "07/14" ] }{ "id": 62253, "url": "