Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/87859/?format=api
http://patches.dpdk.org/api/patches/87859/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210211141620.12482-5-hemant.agrawal@nxp.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": "<20210211141620.12482-5-hemant.agrawal@nxp.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210211141620.12482-5-hemant.agrawal@nxp.com", "date": "2021-02-11T14:16:04", "name": "[v2,04/20] net/dpaa: fix link get API implementation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "69255dd9eef8d580f12b0a796a7417b77032fbfc", "submitter": { "id": 477, "url": "http://patches.dpdk.org/api/people/477/?format=api", "name": "Hemant Agrawal", "email": "hemant.agrawal@nxp.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210211141620.12482-5-hemant.agrawal@nxp.com/mbox/", "series": [ { "id": 15239, "url": "http://patches.dpdk.org/api/series/15239/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15239", "date": "2021-02-11T14:16:00", "name": "NXP DPAAx ethernet PMD changes", "version": 2, "mbox": "http://patches.dpdk.org/series/15239/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/87859/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/87859/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 C6D0DA054A;\n\tThu, 11 Feb 2021 15:28:33 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8DEF51CC562;\n\tThu, 11 Feb 2021 15:28:05 +0100 (CET)", "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by mails.dpdk.org (Postfix) with ESMTP id 6C80F1CC3B1\n for <dev@dpdk.org>; Thu, 11 Feb 2021 15:28:00 +0100 (CET)", "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 508161A061E;\n Thu, 11 Feb 2021 15:28:00 +0100 (CET)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 123191A05C7;\n Thu, 11 Feb 2021 15:27:59 +0100 (CET)", "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 10A66402E5;\n Thu, 11 Feb 2021 15:27:56 +0100 (CET)" ], "From": "Hemant Agrawal <hemant.agrawal@nxp.com>", "To": "dev@dpdk.org,\n\tferruh.yigit@intel.com", "Date": "Thu, 11 Feb 2021 19:46:04 +0530", "Message-Id": "<20210211141620.12482-5-hemant.agrawal@nxp.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210211141620.12482-1-hemant.agrawal@nxp.com>", "References": "<20210120142723.14090-1-hemant.agrawal@nxp.com>\n <20210211141620.12482-1-hemant.agrawal@nxp.com>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Subject": "[dpdk-dev] [PATCH v2 04/20] net/dpaa: fix link get API\n implementation", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Rohit Raj <rohit.raj@nxp.com>\n\nAccording to DPDK Documentation, rte_eth_link_get API can wait upto 9\nseconds for auto-negotiation to finish and then returns link status.\n\nIn current implementation of rte_eth_link_get API in DPAA drivers, it\nwasn't waiting for auto negotiation to finish and was returning link\nstatus DOWN\nIt can cause issues with DPDK applications which relies\non rte_eth_link_get API for link statusand doesn't support link status\ninterrupt.\n\nThis patch fixes this bug by adding wait for up to 9 seconds for auto\nnegotiation to finish.\n\nFixes: 2aa10990a8dd (\"bus/dpaa: enable link state interrupt\")\nCc: stable@dpdk.org\n\nSigned-off-by: Rohit Raj <rohit.raj@nxp.com>\nAcked-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/net/dpaa/dpaa_ethdev.c | 20 +++++++++++++++-----\n 1 file changed, 15 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c\nindex d643514de6..c59873dd8a 100644\n--- a/drivers/net/dpaa/dpaa_ethdev.c\n+++ b/drivers/net/dpaa/dpaa_ethdev.c\n@@ -49,6 +49,9 @@\n #include <process.h>\n #include <fmlib/fm_ext.h>\n \n+#define CHECK_INTERVAL 100 /* 100ms */\n+#define MAX_REPEAT_TIME 90 /* 9s (90 * 100ms) in total */\n+\n /* Supported Rx offloads */\n static uint64_t dev_rx_offloads_sup =\n \t\tDEV_RX_OFFLOAD_JUMBO_FRAME |\n@@ -669,23 +672,30 @@ dpaa_dev_tx_burst_mode_get(struct rte_eth_dev *dev,\n }\n \n static int dpaa_eth_link_update(struct rte_eth_dev *dev,\n-\t\t\t\tint wait_to_complete __rte_unused)\n+\t\t\t\tint wait_to_complete)\n {\n \tstruct dpaa_if *dpaa_intf = dev->data->dev_private;\n \tstruct rte_eth_link *link = &dev->data->dev_link;\n \tstruct fman_if *fif = dev->process_private;\n \tstruct __fman_if *__fif = container_of(fif, struct __fman_if, __if);\n \tint ret, ioctl_version;\n+\tuint8_t count;\n \n \tPMD_INIT_FUNC_TRACE();\n \n \tioctl_version = dpaa_get_ioctl_version_number();\n \n-\n \tif (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {\n-\t\tret = dpaa_get_link_status(__fif->node_name, link);\n-\t\tif (ret)\n-\t\t\treturn ret;\n+\t\tfor (count = 0; count <= MAX_REPEAT_TIME; count++) {\n+\t\t\tret = dpaa_get_link_status(__fif->node_name, link);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n+\t\t\tif (link->link_status == ETH_LINK_DOWN &&\n+\t\t\t wait_to_complete)\n+\t\t\t\trte_delay_ms(CHECK_INTERVAL);\n+\t\t\telse\n+\t\t\t\tbreak;\n+\t\t}\n \t} else {\n \t\tlink->link_status = dpaa_intf->valid;\n \t}\n", "prefixes": [ "v2", "04/20" ] }{ "id": 87859, "url": "