Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/111247/?format=api
http://patches.dpdk.org/api/patches/111247/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220517173941.189330-3-hkalra@marvell.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": "<20220517173941.189330-3-hkalra@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220517173941.189330-3-hkalra@marvell.com", "date": "2022-05-17T17:39:32", "name": "[03/12] net/octeontx: fix port close", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "11ef7bf35897b4171756ec9f5b541c01173ddad9", "submitter": { "id": 1182, "url": "http://patches.dpdk.org/api/people/1182/?format=api", "name": "Harman Kalra", "email": "hkalra@marvell.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220517173941.189330-3-hkalra@marvell.com/mbox/", "series": [ { "id": 22975, "url": "http://patches.dpdk.org/api/series/22975/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22975", "date": "2022-05-17T17:39:30", "name": "[01/12] config: add thundert83 config", "version": 1, "mbox": "http://patches.dpdk.org/series/22975/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/111247/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/111247/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 3A96AA0503;\n\tTue, 17 May 2022 19:40:15 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2E25C42B6C;\n\tTue, 17 May 2022 19:40:15 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 5FCAB42B6A\n for <dev@dpdk.org>; Tue, 17 May 2022 19:40:13 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 24H9j2pr016783\n for <dev@dpdk.org>; Tue, 17 May 2022 10:40:11 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g2bxsw8y8-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 17 May 2022 10:40:11 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Tue, 17 May 2022 10:39:56 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Tue, 17 May 2022 10:39:56 -0700", "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id 197A13F7048;\n Tue, 17 May 2022 10:39:54 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : subject\n : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=ElwPjVtyFcwVCbU/ZRUmtthq2glHiwt7Vpfrsusm+bo=;\n b=fgIshjyp+iTSJk3/cFm1IVrOEZfL8zeZHdmDcXyod20W04PvAV3SaKSXk9dGBDJuulyk\n 2Hd87QrUyaX2jbJHhPqBqrCi8Ym2OPEI7wgEkCOFKslEFy16EdbYFRfonXakw8I0A3SC\n 4YX7Xf1fHlD6RGyQw3XL1YVH6ECqkkY6r4idhXsLRdwAIqfXhGoKZhVhtFX5WLSQrcDe\n aQpdSAlOoF4nt0dF8cKzUTPSIMuPBrudGbedtV0DTNh3fVPh9/cqE6+bN+lq4xOMN7Uj\n kW5qiPLGtIID2fT+xwPtx1pC1E0JMatCZovYgZGqpIH70EMtvE0CrNN3I4q/MkbJYOvK uA==", "From": "Harman Kalra <hkalra@marvell.com>", "To": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>", "Subject": "[PATCH 03/12] net/octeontx: fix port close", "Date": "Tue, 17 May 2022 23:09:32 +0530", "Message-ID": "<20220517173941.189330-3-hkalra@marvell.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20220517173941.189330-1-hkalra@marvell.com>", "References": "<20220517173941.189330-1-hkalra@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "jK8JniscmoR2gt7bqoDxw36yF1gOBjZA", "X-Proofpoint-GUID": "jK8JniscmoR2gt7bqoDxw36yF1gOBjZA", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514\n definitions=2022-05-17_03,2022-05-17_02,2022-02-23_01", "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": "Segmentation fault has been observed while closing the ethernet\nport. Reason for the segfault is, eth port close also shuts down\nevent device while other ethernet port is still using the event\ndevice.\n\nFixes: da6c687471a3 (\"net/octeontx: add start and stop support\")\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n drivers/net/octeontx/octeontx_ethdev.c | 15 ++++++++++++---\n 1 file changed, 12 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c\nindex f5ea9de8ef..6469fd0a96 100644\n--- a/drivers/net/octeontx/octeontx_ethdev.c\n+++ b/drivers/net/octeontx/octeontx_ethdev.c\n@@ -26,6 +26,11 @@\n #include \"octeontx_rxtx.h\"\n #include \"octeontx_logs.h\"\n \n+/* Useful in stopping/closing event device if no of\n+ * eth ports are using it.\n+ */\n+uint16_t evdev_refcnt;\n+\n struct evdev_priv_data {\n \tOFFLOAD_FLAGS; /*Sequence should not be changed */\n } __rte_cache_aligned;\n@@ -491,7 +496,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n-\trte_event_dev_close(nic->evdev);\n+\t/* Stopping/closing event device once all eth ports are closed. */\n+\tif (__atomic_sub_fetch(&evdev_refcnt, 1, __ATOMIC_ACQUIRE) == 0) {\n+\t\trte_event_dev_stop(nic->evdev);\n+\t\trte_event_dev_close(nic->evdev);\n+\t}\n \n \tocteontx_dev_flow_ctrl_fini(dev);\n \n@@ -671,8 +680,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)\n \n \tPMD_INIT_FUNC_TRACE();\n \n-\trte_event_dev_stop(nic->evdev);\n-\n \tret = octeontx_port_stop(nic);\n \tif (ret < 0) {\n \t\tocteontx_log_err(\"failed to req stop port %d res=%d\",\n@@ -1333,6 +1340,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,\n \tnic->pko_vfid = pko_vfid;\n \tnic->port_id = port;\n \tnic->evdev = evdev;\n+\t__atomic_add_fetch(&evdev_refcnt, 1, __ATOMIC_ACQUIRE);\n \n \tres = octeontx_port_open(nic);\n \tif (res < 0)\n@@ -1582,6 +1590,7 @@ octeontx_probe(struct rte_vdev_device *dev)\n \t\t}\n \t}\n \n+\t__atomic_store_n(&evdev_refcnt, 0, __ATOMIC_RELEASE);\n \t/*\n \t * Do 1:1 links for ports & queues. All queues would be mapped to\n \t * one port. If there are more ports than queues, then some ports\n", "prefixes": [ "03/12" ] }{ "id": 111247, "url": "