get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94685,
    "url": "https://patches.dpdk.org/api/patches/94685/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210622200554.1544-2-hkalra@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": "<20210622200554.1544-2-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210622200554.1544-2-hkalra@marvell.com",
    "date": "2021-06-22T20:05:54",
    "name": "[2/2] net/octeontx2: callback for getting link status",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "bb9a7e44ee3b115abba20a97543a9d67db7f9c96",
    "submitter": {
        "id": 1182,
        "url": "https://patches.dpdk.org/api/people/1182/?format=api",
        "name": "Harman Kalra",
        "email": "hkalra@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/20210622200554.1544-2-hkalra@marvell.com/mbox/",
    "series": [
        {
            "id": 17445,
            "url": "https://patches.dpdk.org/api/series/17445/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17445",
            "date": "2021-06-22T20:05:53",
            "name": "[1/2] common/octeontx2: send link event to VF",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17445/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94685/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/94685/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 48FC8A0548;\n\tTue, 22 Jun 2021 22:06:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2F65840DDD;\n\tTue, 22 Jun 2021 22:06:26 +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 B148C40DDA\n for <dev@dpdk.org>; Tue, 22 Jun 2021 22:06:24 +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 15MK1TVh001994 for <dev@dpdk.org>; Tue, 22 Jun 2021 13:06:23 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com with ESMTP id 39b91hbqdx-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 22 Jun 2021 13:06:23 -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.18;\n Tue, 22 Jun 2021 13:06:22 -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; Tue, 22 Jun 2021 13:06:22 -0700",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id C77B95B6925;\n Tue, 22 Jun 2021 13:06:20 -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=dzmNyJwqvyV4hJPWEfe+Em1DWd6KusvAi3TPRBrvqZg=;\n b=HKoBImFTqPTTa3B+snwHiB/jTW9mD5pkEHAAxRTV4WKCkoKZlH05KmLMrpLpZ+nuhb1D\n j1/a02JSN9jMFMsMqxuET2n7UkLDiWNvyySp2W92sfZKmGnTvPgGlE0L5rK4qevaGY/N\n cUXDbes1yhx0Q9K0lXuft2Z1r3+1jcoYSnsMFwa9qxvPHFqdp+HQPGBIBfeqqQOj1SPw\n J3KJdwqclGrFg2dZt6B3S0etedkD/90i62kJrrGg8mu3QxY4aNZ/ftcAtZiNQ3aP5LY8\n MRpTEgodcr+UKVoJzgrrb0kdG6cropXarudyX9dqpwfJPkOnq/qUGtsr6XACN+4zu3yN Hw==",
        "From": "Harman Kalra <hkalra@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Nithin Dabilpuram\n <ndabilpuram@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>",
        "CC": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>",
        "Date": "Wed, 23 Jun 2021 01:35:54 +0530",
        "Message-ID": "<20210622200554.1544-2-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20210622200554.1544-1-hkalra@marvell.com>",
        "References": "<20210622200554.1544-1-hkalra@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "oNPJcqzFG4LnRxQSukKA1O9bONQ_Hl7n",
        "X-Proofpoint-GUID": "oNPJcqzFG4LnRxQSukKA1O9bONQ_Hl7n",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-06-22_13:2021-06-22,\n 2021-06-22 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 2/2] net/octeontx2: callback for getting link\n 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/octeontx2/otx2_ethdev.c |  8 +++++++-\n drivers/net/octeontx2/otx2_ethdev.h |  2 ++\n drivers/net/octeontx2/otx2_link.c   | 23 +++++++++++++++++++++++\n 3 files changed, 32 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c\nindex 0834de0cb1..471fa34da1 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.c\n+++ b/drivers/net/octeontx2/otx2_ethdev.c\n@@ -42,7 +42,8 @@ nix_get_tx_offload_capa(struct otx2_eth_dev *dev)\n \n static const struct otx2_dev_ops otx2_dev_ops = {\n \t.link_status_update = otx2_eth_dev_link_status_update,\n-\t.ptp_info_update = otx2_eth_dev_ptp_info_update\n+\t.ptp_info_update = otx2_eth_dev_ptp_info_update,\n+\t.link_status_get = otx2_eth_dev_link_status_get\n };\n \n static int\n@@ -2625,6 +2626,11 @@ otx2_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool mbox_close)\n \n \tnix_cgx_stop_link_event(dev);\n \n+\t/* Unregister the dev ops, this is required to stop VFs from\n+\t * receiving link status updates on exit path.\n+\t */\n+\tdev->ops = NULL;\n+\n \t/* Free up SQs */\n \tfor (i = 0; i < eth_dev->data->nb_tx_queues; i++) {\n \t\totx2_nix_tx_queue_release(eth_dev->data->tx_queues[i]);\ndiff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h\nindex ac50da7b18..08f9a2a7bc 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.h\n+++ b/drivers/net/octeontx2/otx2_ethdev.h\n@@ -453,6 +453,8 @@ void otx2_nix_toggle_flag_link_cfg(struct otx2_eth_dev *dev, bool set);\n int otx2_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete);\n void otx2_eth_dev_link_status_update(struct otx2_dev *dev,\n \t\t\t\t     struct cgx_link_user_info *link);\n+void otx2_eth_dev_link_status_get(struct otx2_dev *dev,\n+\t\t\t\t  struct cgx_link_user_info *link);\n int otx2_nix_dev_set_link_up(struct rte_eth_dev *eth_dev);\n int otx2_nix_dev_set_link_down(struct rte_eth_dev *eth_dev);\n int otx2_apply_link_speed(struct rte_eth_dev *eth_dev);\ndiff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c\nindex a79b997376..5378e5c3b9 100644\n--- a/drivers/net/octeontx2/otx2_link.c\n+++ b/drivers/net/octeontx2/otx2_link.c\n@@ -47,6 +47,29 @@ nix_link_status_print(struct rte_eth_dev *eth_dev, struct rte_eth_link *link)\n \t\totx2_info(\"Port %d: Link Down\", (int)(eth_dev->data->port_id));\n }\n \n+void\n+otx2_eth_dev_link_status_get(struct otx2_dev *dev,\n+\t\t\t     struct cgx_link_user_info *link)\n+{\n+\tstruct otx2_eth_dev *otx2_dev = (struct otx2_eth_dev *)dev;\n+\tstruct rte_eth_link eth_link;\n+\tstruct rte_eth_dev *eth_dev;\n+\n+\tif (!link || !dev)\n+\t\treturn;\n+\n+\teth_dev = otx2_dev->eth_dev;\n+\tif (!eth_dev)\n+\t\treturn;\n+\n+\trte_eth_linkstatus_get(eth_dev, &eth_link);\n+\n+\tlink->link_up = eth_link.link_status;\n+\tlink->speed = eth_link.link_speed;\n+\tlink->an = eth_link.link_autoneg;\n+\tlink->full_duplex = eth_link.link_duplex;\n+}\n+\n void\n otx2_eth_dev_link_status_update(struct otx2_dev *dev,\n \t\t\t\tstruct cgx_link_user_info *link)\n",
    "prefixes": [
        "2/2"
    ]
}