get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/110896/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 110896,
    "url": "https://patches.dpdk.org/api/patches/110896/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220508074839.6965-27-ndabilpuram@marvell.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": "<20220508074839.6965-27-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220508074839.6965-27-ndabilpuram@marvell.com",
    "date": "2022-05-08T07:48:38",
    "name": "[v5,27/28] net/cnxk: fix hotplug detach sequence for first device",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f257e40e97fc2caaeb1a4590c5deeb01206a2253",
    "submitter": {
        "id": 1202,
        "url": "https://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220508074839.6965-27-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 22839,
            "url": "https://patches.dpdk.org/api/series/22839/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22839",
            "date": "2022-05-08T07:48:12",
            "name": "[v5,01/28] common/cnxk: add multi channel support for SDP send queues",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/22839/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/110896/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/110896/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 3DDEEA050C;\n\tSun,  8 May 2022 09:51:32 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DEC43428AD;\n\tSun,  8 May 2022 09:50:02 +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 3A67B428AD;\n Sun,  8 May 2022 09:50:01 +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 2485QDrg023654;\n Sun, 8 May 2022 00:50:00 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3fwy5j13tx-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 08 May 2022 00:50:00 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Sun, 8 May 2022 00:49:58 -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; Sun, 8 May 2022 00:49:58 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 4196C3F7053;\n Sun,  8 May 2022 00:49:56 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=Cu48YBcSjj7X48L0Ce++7xYgpC8gca1MKZTgGBATMX4=;\n b=CDLY8IEHAS7MNTLP7XDrPq4R3mM8BIQ+Vg/AcfGAbSAjZpt8WJpXAni+hlBQ/+YPH/bS\n 6dE8Xqgiua9GPjm7LMEoxxlPIFjmdRd21I+geTgyBIhVMf+7NO51XDGly2WzA0YuPZF4\n qiqoaOkyCWXYNPL8l6isAlksGwS6JfcQlXs7uvTgm54h2g8xmuMEGI4nhlVgrnZyOSAa\n J99GT+Vdk07upP0H0H89kxrt4TQ9qvwSPQJIU9a9JgL+1xKir+dJsyiyBTSkVdG9dDP8\n PQFql4WSziwpQz9vg/0xM2d7lsmsBI11G5I2GviPebGa2CyVIITO4kd5/soNg1EI5mLl CA==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "<jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, \"Kiran\n Kumar K\" <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>,\n Satha Rao <skoteshwar@marvell.com>, Anatoly Burakov\n <anatoly.burakov@intel.com>",
        "CC": "<dev@dpdk.org>, <stable@dpdk.org>",
        "Subject": "[PATCH v5 27/28] net/cnxk: fix hotplug detach sequence for first\n device",
        "Date": "Sun, 8 May 2022 13:18:38 +0530",
        "Message-ID": "<20220508074839.6965-27-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20220508074839.6965-1-ndabilpuram@marvell.com>",
        "References": "<20220419055921.10566-1-ndabilpuram@marvell.com>\n <20220508074839.6965-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "L5SteyvLE_MhCCy9HO0uTDKBA_HdBPGr",
        "X-Proofpoint-GUID": "L5SteyvLE_MhCCy9HO0uTDKBA_HdBPGr",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514\n definitions=2022-05-08_02,2022-05-06_01,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": "Fix hotplug detach sequence to handle case where first PCI\ndevice that is hosting NPA LF is being destroyed while in use.\n\nFixes: 5a4341c84979 (\"net/cnxk: add platform specific probe and remove\")\nCc: stable@dpdk.org\n\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n drivers/net/cnxk/cn10k_ethdev.c | 6 +++++-\n drivers/net/cnxk/cn9k_ethdev.c  | 6 +++++-\n drivers/net/cnxk/cnxk_ethdev.c  | 8 ++++----\n 3 files changed, 14 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c\nindex bc9e10f..96eeae4 100644\n--- a/drivers/net/cnxk/cn10k_ethdev.c\n+++ b/drivers/net/cnxk/cn10k_ethdev.c\n@@ -778,8 +778,12 @@ cn10k_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \n \t/* Find eth dev allocated */\n \teth_dev = rte_eth_dev_allocated(pci_dev->device.name);\n-\tif (!eth_dev)\n+\tif (!eth_dev) {\n+\t\t/* Ignore if ethdev is in mid of detach state in secondary */\n+\t\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\t\treturn 0;\n \t\treturn -ENOENT;\n+\t}\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n \t\t/* Setup callbacks for secondary process */\ndiff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c\nindex 05a2022..4fb0e2d 100644\n--- a/drivers/net/cnxk/cn9k_ethdev.c\n+++ b/drivers/net/cnxk/cn9k_ethdev.c\n@@ -708,8 +708,12 @@ cn9k_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \n \t/* Find eth dev allocated */\n \teth_dev = rte_eth_dev_allocated(pci_dev->device.name);\n-\tif (!eth_dev)\n+\tif (!eth_dev) {\n+\t\t/* Ignore if ethdev is in mid of detach state in secondary */\n+\t\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\t\treturn 0;\n \t\treturn -ENOENT;\n+\t}\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n \t\t/* Setup callbacks for secondary process */\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c\nindex 12ff30f..3912c24 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.c\n+++ b/drivers/net/cnxk/cnxk_ethdev.c\n@@ -1781,9 +1781,6 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)\n \tstruct rte_eth_fc_conf fc_conf;\n \tint rc, i;\n \n-\t/* Disable switch hdr pkind */\n-\troc_nix_switch_hdr_set(&dev->nix, 0, 0, 0, 0);\n-\n \tplt_free(eth_dev->security_ctx);\n \teth_dev->security_ctx = NULL;\n \n@@ -1791,6 +1788,9 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\t/* Disable switch hdr pkind */\n+\troc_nix_switch_hdr_set(&dev->nix, 0, 0, 0, 0);\n+\n \t/* Clear the flag since we are closing down */\n \tdev->configured = 0;\n \n@@ -1927,7 +1927,7 @@ cnxk_nix_remove(struct rte_pci_device *pci_dev)\n \n \t/* Check if this device is hosting common resource */\n \tnix = roc_idev_npa_nix_get();\n-\tif (nix->pci_dev != pci_dev)\n+\tif (!nix || nix->pci_dev != pci_dev)\n \t\treturn 0;\n \n \t/* Try nix fini now */\n",
    "prefixes": [
        "v5",
        "27/28"
    ]
}