Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44706/?format=api
https://patches.dpdk.org/api/patches/44706/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1536906477-118136-1-git-send-email-xuemingl@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": "<1536906477-118136-1-git-send-email-xuemingl@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1536906477-118136-1-git-send-email-xuemingl@mellanox.com", "date": "2018-09-14T06:27:57", "name": "[v2] net/mlx5: fix wrong representor port link status", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c9d5d502aa98beb4bff93fb3cc2fe1046c8ffcef", "submitter": { "id": 814, "url": "https://patches.dpdk.org/api/people/814/?format=api", "name": "Xueming Li", "email": "xuemingl@mellanox.com" }, "delegate": { "id": 6624, "url": "https://patches.dpdk.org/api/users/6624/?format=api", "username": "shahafs", "first_name": "Shahaf", "last_name": "Shuler", "email": "shahafs@mellanox.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1536906477-118136-1-git-send-email-xuemingl@mellanox.com/mbox/", "series": [ { "id": 1316, "url": "https://patches.dpdk.org/api/series/1316/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1316", "date": "2018-09-14T06:27:57", "name": "[v2] net/mlx5: fix wrong representor port link status", "version": 2, "mbox": "https://patches.dpdk.org/series/1316/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44706/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/44706/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 6E9485B2E;\n\tFri, 14 Sep 2018 08:28:13 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 60D1A5B16\n\tfor <dev@dpdk.org>; Fri, 14 Sep 2018 08:28:12 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n\txuemingl@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 14 Sep 2018 09:32:27 +0300", "from dev-r630-05.mtbc.labs.mlnx (dev-r630-05.mtbc.labs.mlnx\n\t[10.12.205.160])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w8E6S92O019933;\n\tFri, 14 Sep 2018 09:28:10 +0300", "from dev-r630-05.mtbc.labs.mlnx (localhost [127.0.0.1])\n\tby dev-r630-05.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id\n\tw8E6S8gD118724; Fri, 14 Sep 2018 14:28:08 +0800", "(from xuemingl@localhost)\n\tby dev-r630-05.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id\n\tw8E6S4W5118723; Fri, 14 Sep 2018 14:28:04 +0800" ], "From": "Xueming Li <xuemingl@mellanox.com>", "To": "Shahaf Shuler <shahafs@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>", "Cc": "Xueming Li <xuemingl@mellanox.com>, dev@dpdk.org,\n\tadrien.mazarguil@6wind.com", "Date": "Fri, 14 Sep 2018 14:27:57 +0800", "Message-Id": "<1536906477-118136-1-git-send-email-xuemingl@mellanox.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1536216636-15673-1-git-send-email-xuemingl@mellanox.com>", "References": "<1536216636-15673-1-git-send-email-xuemingl@mellanox.com>", "Subject": "[dpdk-dev] [PATCH v2] net/mlx5: fix wrong representor port link\n\tstatus", "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": "Current code uses PF links status for representor port, not the representor\ninterface itself. This caused wrong representor port link status when\ntoggling linterface up or down.\n\nFixes: 5a4b8e2612c5 (\"net/mlx5: probe all port representors\")\nCc: adrien.mazarguil@6wind.com\n\nSigned-off-by: Xueming Li <xuemingl@mellanox.com>\n---\n drivers/net/mlx5/mlx5_ethdev.c | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c\nindex 34c5b95..7391ab8 100644\n--- a/drivers/net/mlx5/mlx5_ethdev.c\n+++ b/drivers/net/mlx5/mlx5_ethdev.c\n@@ -627,7 +627,7 @@ struct ethtool_link_settings {\n \tint link_speed = 0;\n \tint ret;\n \n-\tret = mlx5_ifreq(dev, SIOCGIFFLAGS, &ifr, 1);\n+\tret = mlx5_ifreq(dev, SIOCGIFFLAGS, &ifr, 0);\n \tif (ret) {\n \t\tDRV_LOG(WARNING, \"port %u ioctl(SIOCGIFFLAGS) failed: %s\",\n \t\t\tdev->data->port_id, strerror(rte_errno));\n@@ -636,6 +636,7 @@ struct ethtool_link_settings {\n \tmemset(&dev_link, 0, sizeof(dev_link));\n \tdev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&\n \t\t\t\t(ifr.ifr_flags & IFF_RUNNING));\n+\tmemset(&ifr, 0, sizeof(ifr));\n \tifr.ifr_data = (void *)&edata;\n \tret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr, 1);\n \tif (ret) {\n@@ -666,8 +667,9 @@ struct ethtool_link_settings {\n \t\t\t\tETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);\n \tdev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &\n \t\t\tETH_LINK_SPEED_FIXED);\n-\tif ((dev_link.link_speed && !dev_link.link_status) ||\n-\t (!dev_link.link_speed && dev_link.link_status)) {\n+\tif (!priv->representor &&\n+\t ((dev_link.link_speed && !dev_link.link_status) ||\n+\t (!dev_link.link_speed && dev_link.link_status))) {\n \t\trte_errno = EAGAIN;\n \t\treturn -rte_errno;\n \t}\n@@ -698,7 +700,7 @@ struct ethtool_link_settings {\n \tuint64_t sc;\n \tint ret;\n \n-\tret = mlx5_ifreq(dev, SIOCGIFFLAGS, &ifr, 1);\n+\tret = mlx5_ifreq(dev, SIOCGIFFLAGS, &ifr, 0);\n \tif (ret) {\n \t\tDRV_LOG(WARNING, \"port %u ioctl(SIOCGIFFLAGS) failed: %s\",\n \t\t\tdev->data->port_id, strerror(rte_errno));\n@@ -707,6 +709,7 @@ struct ethtool_link_settings {\n \tmemset(&dev_link, 0, sizeof(dev_link));\n \tdev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&\n \t\t\t\t(ifr.ifr_flags & IFF_RUNNING));\n+\tmemset(&ifr, 0, sizeof(ifr));\n \tifr.ifr_data = (void *)&gcmd;\n \tret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr, 1);\n \tif (ret) {\n@@ -775,8 +778,9 @@ struct ethtool_link_settings {\n \t\t\t\tETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);\n \tdev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &\n \t\t\t\t ETH_LINK_SPEED_FIXED);\n-\tif ((dev_link.link_speed && !dev_link.link_status) ||\n-\t (!dev_link.link_speed && dev_link.link_status)) {\n+\tif (!priv->representor &&\n+\t ((dev_link.link_speed && !dev_link.link_status) ||\n+\t (!dev_link.link_speed && dev_link.link_status))) {\n \t\trte_errno = EAGAIN;\n \t\treturn -rte_errno;\n \t}\n", "prefixes": [ "v2" ] }{ "id": 44706, "url": "