Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/118936/?format=api
http://patchwork.dpdk.org/api/patches/118936/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221021091928.2674471-5-junfeng.guo@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20221021091928.2674471-5-junfeng.guo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221021091928.2674471-5-junfeng.guo@intel.com", "date": "2022-10-21T09:19:24", "name": "[v7,4/8] net/gve: add support for link update", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "b4d53bc13d09ec4de42b1cf9b193ae742e09aa8e", "submitter": { "id": 1785, "url": "http://patchwork.dpdk.org/api/people/1785/?format=api", "name": "Junfeng Guo", "email": "junfeng.guo@intel.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20221021091928.2674471-5-junfeng.guo@intel.com/mbox/", "series": [ { "id": 25366, "url": "http://patchwork.dpdk.org/api/series/25366/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25366", "date": "2022-10-21T09:19:20", "name": "introduce GVE PMD", "version": 7, "mbox": "http://patchwork.dpdk.org/series/25366/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/118936/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/118936/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C23C1A0032;\n\tFri, 21 Oct 2022 11:21:26 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1CB0442C0F;\n\tFri, 21 Oct 2022 11:21:15 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id C061742BF3\n for <dev@dpdk.org>; Fri, 21 Oct 2022 11:21:12 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Oct 2022 02:21:12 -0700", "from dpdk-jf-ntb-one.sh.intel.com ([10.67.111.104])\n by FMSMGA003.fm.intel.com with ESMTP; 21 Oct 2022 02:21:09 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1666344073; x=1697880073;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=gZ8c11OML51hEL0Yu/QNp7vHJnBTeNcq194+xwtlhLE=;\n b=j9Y4N4N37+bl3eYdue7TDCi2MzyzOXUwPvPuUYVx15LhN9RR+oAjZWBT\n c+4w0G7vVwcY998DPwSLso3KreUbY6+iOW9ithjYdj3LHgOBeFrem/Pyc\n zvEZvIP5cLZRXNdhrIo5d8nsyckU7nZbSzIRKhNltPhlMM5rilI6U6H5b\n qjX6EFiMSem3j55VLtoLQqICTxLTwfaK7ixZ4FHmOTyzRJOKZV8XcRyoM\n apkpsJ8fJtwF0+g4PlcITg06wbavDBN87oRwYyCX87s2DwGTzrxqs4/ZN\n L+hctyFWBVsNjMAuMNpApBeVvWzYnqAWaZDDAteizUOMRrSWhaatJN+a4 A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10506\"; a=\"294355064\"", "E=Sophos;i=\"5.95,200,1661842800\"; d=\"scan'208\";a=\"294355064\"", "E=McAfee;i=\"6500,9779,10506\"; a=\"719619871\"", "E=Sophos;i=\"5.95,200,1661842800\"; d=\"scan'208\";a=\"719619871\"" ], "X-ExtLoop1": "1", "From": "Junfeng Guo <junfeng.guo@intel.com>", "To": "qi.z.zhang@intel.com, jingjing.wu@intel.com, ferruh.yigit@xilinx.com,\n beilei.xing@intel.com", "Cc": "dev@dpdk.org, xiaoyun.li@intel.com, awogbemila@google.com,\n bruce.richardson@intel.com, hemant.agrawal@nxp.com,\n stephen@networkplumber.org, chenbo.xia@intel.com, helin.zhang@intel.com,\n Junfeng Guo <junfeng.guo@intel.com>", "Subject": "[PATCH v7 4/8] net/gve: add support for link update", "Date": "Fri, 21 Oct 2022 17:19:24 +0800", "Message-Id": "<20221021091928.2674471-5-junfeng.guo@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20221021091928.2674471-1-junfeng.guo@intel.com>", "References": "<20221020103656.1068036-1-junfeng.guo@intel.com>\n <20221021091928.2674471-1-junfeng.guo@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "Support dev_ops link_update.\n\nSigned-off-by: Xiaoyun Li <xiaoyun.li@intel.com>\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n doc/guides/nics/features/gve.ini | 1 +\n doc/guides/nics/gve.rst | 3 +++\n drivers/net/gve/gve_ethdev.c | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 34 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/gve.ini b/doc/guides/nics/features/gve.ini\nindex 44aec28009..ae466ad677 100644\n--- a/doc/guides/nics/features/gve.ini\n+++ b/doc/guides/nics/features/gve.ini\n@@ -4,6 +4,7 @@\n ; Refer to default.ini for the full list of available PMD features.\n ;\n [Features]\n+Link status = Y\n Linux = Y\n x86-32 = Y\n x86-64 = Y\ndiff --git a/doc/guides/nics/gve.rst b/doc/guides/nics/gve.rst\nindex 703fbcc5de..c42ff23841 100644\n--- a/doc/guides/nics/gve.rst\n+++ b/doc/guides/nics/gve.rst\n@@ -60,6 +60,9 @@ Features and Limitations\n \n In this release, the GVE PMD provides the basic functionality of packet\n reception and transmission.\n+Supported features of the GVE PMD are:\n+\n+- Link state information\n \n Currently, only GQI_QPL and GQI_RDA queue format are supported in PMD.\n Jumbo Frame is not supported in PMD for now. It'll be added in the future\ndiff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c\nindex acbb412509..34243c1672 100644\n--- a/drivers/net/gve/gve_ethdev.c\n+++ b/drivers/net/gve/gve_ethdev.c\n@@ -34,10 +34,39 @@ gve_dev_configure(__rte_unused struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n+static int\n+gve_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete)\n+{\n+\tstruct gve_priv *priv = dev->data->dev_private;\n+\tstruct rte_eth_link link;\n+\tint err;\n+\n+\tmemset(&link, 0, sizeof(link));\n+\tlink.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;\n+\tlink.link_autoneg = RTE_ETH_LINK_AUTONEG;\n+\n+\tif (!dev->data->dev_started) {\n+\t\tlink.link_status = RTE_ETH_LINK_DOWN;\n+\t\tlink.link_speed = RTE_ETH_SPEED_NUM_NONE;\n+\t} else {\n+\t\tlink.link_status = RTE_ETH_LINK_UP;\n+\t\tPMD_DRV_LOG(DEBUG, \"Get link status from hw\");\n+\t\terr = gve_adminq_report_link_speed(priv);\n+\t\tif (err) {\n+\t\t\tPMD_DRV_LOG(ERR, \"Failed to get link speed.\");\n+\t\t\tpriv->link_speed = RTE_ETH_SPEED_NUM_UNKNOWN;\n+\t\t}\n+\t\tlink.link_speed = priv->link_speed;\n+\t}\n+\n+\treturn rte_eth_linkstatus_set(dev, &link);\n+}\n+\n static int\n gve_dev_start(struct rte_eth_dev *dev)\n {\n \tdev->data->dev_started = 1;\n+\tgve_link_update(dev, 0);\n \n \treturn 0;\n }\n@@ -72,6 +101,7 @@ static const struct eth_dev_ops gve_eth_dev_ops = {\n \t.dev_start = gve_dev_start,\n \t.dev_stop = gve_dev_stop,\n \t.dev_close = gve_dev_close,\n+\t.link_update = gve_link_update,\n };\n \n static void\n", "prefixes": [ "v7", "4/8" ] }{ "id": 118936, "url": "