get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96472,
    "url": "http://patchwork.dpdk.org/api/patches/96472/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210730160829.13597-2-hkalra@marvell.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": "<20210730160829.13597-2-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210730160829.13597-2-hkalra@marvell.com",
    "date": "2021-07-30T16:08:29",
    "name": "[2/2] net/cnxk: callback for getting link status",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2e71a6fa73f7994174ee8df80874e319dcf05856",
    "submitter": {
        "id": 1182,
        "url": "http://patchwork.dpdk.org/api/people/1182/?format=api",
        "name": "Harman Kalra",
        "email": "hkalra@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patchwork.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210730160829.13597-2-hkalra@marvell.com/mbox/",
    "series": [
        {
            "id": 18105,
            "url": "http://patchwork.dpdk.org/api/series/18105/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18105",
            "date": "2021-07-30T16:08:28",
            "name": "[1/2] common/cnxk: send link event to VF",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18105/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96472/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/96472/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 03FCAA0C40;\n\tFri, 30 Jul 2021 18:08:56 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B54E2410DA;\n\tFri, 30 Jul 2021 18:08:54 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 16BEF410DA\n for <dev@dpdk.org>; Fri, 30 Jul 2021 18:08:52 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 16UG6GLO002356 for <dev@dpdk.org>; Fri, 30 Jul 2021 09:08:52 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 3a4866try5-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 30 Jul 2021 09:08:52 -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 Fri, 30 Jul 2021 09:08:50 -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.18 via Frontend\n Transport; Fri, 30 Jul 2021 09:08:50 -0700",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id EAF843F705F;\n Fri, 30 Jul 2021 09:08:48 -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=Xeh8kHEoErUNt0hen2pNPnAx/nE1yJzxRaW2bhHa+DM=;\n b=gGo7pYZEQVTQfolG8ZDl9jL+xA61RJHis6X1seqEQt1QkFXydBb8y3InHVOMt7X9+Sle\n 9DtdFmPIbW+xk03pHAXENkwoHH8Nlgn7YehvyRieM3uS44FcBzSKehYV1ZnXNtlcJFOv\n AYJu5ymEOI2mIlOIlVDHvSLETWTLWu8+QcyjhVQ1/+c5+TPX/yNt8nUoVUCgr4VCxFK5\n 39gIOcTNCb24GisgkcYBRsAo2lzFit8IZ/M/ikSVvn8zX+r9sgxWnjqZ6mPtIt6wpp7m\n +oOAzXqkljuZIAZzEHu2/22o11Sh9pFi1xlYYCCC4lrDYVsFuGbp1dq3YA2j48bZOs5b Dw==",
        "From": "Harman Kalra <hkalra@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>",
        "Date": "Fri, 30 Jul 2021 21:38:29 +0530",
        "Message-ID": "<20210730160829.13597-2-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20210730160829.13597-1-hkalra@marvell.com>",
        "References": "<20210730160829.13597-1-hkalra@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "n1zHwxChvAA0gauPDgTsWFS-QNJ2G-FR",
        "X-Proofpoint-ORIG-GUID": "n1zHwxChvAA0gauPDgTsWFS-QNJ2G-FR",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-07-30_11:2021-07-30,\n 2021-07-30 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 2/2] net/cnxk: callback for getting link status",
        "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": "Adding a new callback for reading the link status. PF can read it's\nlink status and can forward the same to VF once it comes up.\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n drivers/net/cnxk/cnxk_ethdev.c |  9 +++++++++\n drivers/net/cnxk/cnxk_ethdev.h |  2 ++\n drivers/net/cnxk/cnxk_link.c   | 23 +++++++++++++++++++++++\n 3 files changed, 34 insertions(+)",
    "diff": "diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c\nindex 0e3652ed51..7152dcd002 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.c\n+++ b/drivers/net/cnxk/cnxk_ethdev.c\n@@ -1314,6 +1314,10 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)\n \t/* Register up msg callbacks */\n \troc_nix_mac_link_cb_register(nix, cnxk_eth_dev_link_status_cb);\n \n+\t/* Register up msg callbacks */\n+\troc_nix_mac_link_info_get_cb_register(nix,\n+\t\t\t\t\t      cnxk_eth_dev_link_status_get_cb);\n+\n \tdev->eth_dev = eth_dev;\n \tdev->configured = 0;\n \tdev->ptype_disable = 0;\n@@ -1415,6 +1419,11 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)\n \t/* Disable link status events */\n \troc_nix_mac_link_event_start_stop(nix, false);\n \n+\t/* Unregister the link update op, this is required to stop VFs from\n+\t * receiving link status updates on exit path.\n+\t */\n+\troc_nix_mac_link_cb_unregister(nix);\n+\n \t/* Free up SQs */\n \tfor (i = 0; i < eth_dev->data->nb_tx_queues; i++) {\n \t\tdev_ops->tx_queue_release(eth_dev->data->tx_queues[i]);\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h\nindex 4eead03905..4caf26303f 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.h\n+++ b/drivers/net/cnxk/cnxk_ethdev.h\n@@ -349,6 +349,8 @@ int cnxk_nix_rss_hash_conf_get(struct rte_eth_dev *eth_dev,\n void cnxk_nix_toggle_flag_link_cfg(struct cnxk_eth_dev *dev, bool set);\n void cnxk_eth_dev_link_status_cb(struct roc_nix *nix,\n \t\t\t\t struct roc_nix_link_info *link);\n+void cnxk_eth_dev_link_status_get_cb(struct roc_nix *nix,\n+\t\t\t\t     struct roc_nix_link_info *link);\n int cnxk_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete);\n int cnxk_nix_queue_stats_mapping(struct rte_eth_dev *dev, uint16_t queue_id,\n \t\t\t\t uint8_t stat_idx, uint8_t is_rx);\ndiff --git a/drivers/net/cnxk/cnxk_link.c b/drivers/net/cnxk/cnxk_link.c\nindex 3fdbdba495..6a70801675 100644\n--- a/drivers/net/cnxk/cnxk_link.c\n+++ b/drivers/net/cnxk/cnxk_link.c\n@@ -45,6 +45,29 @@ nix_link_status_print(struct rte_eth_dev *eth_dev, struct rte_eth_link *link)\n \t\tplt_info(\"Port %d: Link Down\", (int)(eth_dev->data->port_id));\n }\n \n+void\n+cnxk_eth_dev_link_status_get_cb(struct roc_nix *nix,\n+\t\t\t\tstruct roc_nix_link_info *link)\n+{\n+\tstruct cnxk_eth_dev *dev = (struct cnxk_eth_dev *)nix;\n+\tstruct rte_eth_link eth_link;\n+\tstruct rte_eth_dev *eth_dev;\n+\n+\tif (!link || !nix)\n+\t\treturn;\n+\n+\teth_dev = dev->eth_dev;\n+\tif (!eth_dev)\n+\t\treturn;\n+\n+\trte_eth_linkstatus_get(eth_dev, &eth_link);\n+\n+\tlink->status = eth_link.link_status;\n+\tlink->speed = eth_link.link_speed;\n+\tlink->autoneg = eth_link.link_autoneg;\n+\tlink->full_duplex = eth_link.link_duplex;\n+}\n+\n void\n cnxk_eth_dev_link_status_cb(struct roc_nix *nix, struct roc_nix_link_info *link)\n {\n",
    "prefixes": [
        "2/2"
    ]
}