get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94684,
    "url": "https://patches.dpdk.org/api/patches/94684/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210622200554.1544-1-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-1-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210622200554.1544-1-hkalra@marvell.com",
    "date": "2021-06-22T20:05:53",
    "name": "[1/2] common/octeontx2: send link event to VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e1366e0c77282072debc54752706d44598bc7af6",
    "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-1-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/94684/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94684/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 99366A0548;\n\tTue, 22 Jun 2021 22:06:19 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 24A044003F;\n\tTue, 22 Jun 2021 22:06:19 +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 162FD4003E\n for <dev@dpdk.org>; Tue, 22 Jun 2021 22:06:16 +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 15MK1S6l001976 for <dev@dpdk.org>; Tue, 22 Jun 2021 13:06:16 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 39b91hbqd8-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:15 -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 Tue, 22 Jun 2021 13:06:14 -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:14 -0700",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id 372C65B6925;\n Tue, 22 Jun 2021 13:06:12 -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 : mime-version : content-type; s=pfpt0220;\n bh=div95r1xZw8wQ7cE4seRgnaN0Bum2Q8NApqzYMLFqPw=;\n b=bAV8Z1krk++KNzj48phLqLgDys0ihCJUhP6ei1w2GR2ppSfxpJE3ZtAC+dTEoxJ8U0Du\n JFlB2D3k2qBjPsTfNVdkyDcH+e1Ao8qkp2bLpt6+ssWQXlgCeVxjmRCknrayERIIxnzm\n eV6xKu44fv1EJleds/9Exsq9X/dHQxB3mZAjTzNcZzElKEAe96ZGVAAgCp0eJl49JxD7\n qeoOnFaSgOg/0f7yFHDIbEx2hCCnBtfuMSN6SZyo8qVzbN+jqr32gIIQ2FpYuUoxULmJ\n qIdTKjOXfZZ5WQMZbwbaODGd7qlDetYrAcpN/9dIdRwzCFEKkVKL3MjPtzSyvnQt1Cgz 5g==",
        "From": "Harman Kalra <hkalra@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Nithin Dabilpuram\n <ndabilpuram@marvell.com>",
        "CC": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>",
        "Date": "Wed, 23 Jun 2021 01:35:53 +0530",
        "Message-ID": "<20210622200554.1544-1-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "PGzNtFZJ2HEydMsnioLiOIPr3hRL0mG_",
        "X-Proofpoint-GUID": "PGzNtFZJ2HEydMsnioLiOIPr3hRL0mG_",
        "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 1/2] common/octeontx2: send link event to VF",
        "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": "Currently link event is only sent to the PF by AF as soon as it comes\nup, or in case of any physical change in link. PF will broadcast\nthese link events to all its VFs as soon as it receives it.\nBut no event is sent when a new VF comes up, hence it will not have\nthe link status.\nAdding support for sending link status to the VF once it comes up\nsuccessfully.\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n drivers/common/octeontx2/otx2_dev.c | 26 ++++++++++++++++++++++++++\n drivers/common/octeontx2/otx2_dev.h | 10 +++++++---\n 2 files changed, 33 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/common/octeontx2/otx2_dev.c b/drivers/common/octeontx2/otx2_dev.c\nindex 6a84df2344..1485e2b357 100644\n--- a/drivers/common/octeontx2/otx2_dev.c\n+++ b/drivers/common/octeontx2/otx2_dev.c\n@@ -163,6 +163,32 @@ af_pf_wait_msg(struct otx2_dev *dev, uint16_t vf, int num_msg)\n \t\trsp->rc = msg->rc;\n \t\trsp->pcifunc = msg->pcifunc;\n \n+\t\t/* Whenever a PF comes up, AF sends the link status to it but\n+\t\t * when VF comes up no such event is sent to respective VF.\n+\t\t * Using MBOX_MSG_NIX_LF_START_RX response from AF for the\n+\t\t * purpose and send the link status of PF to VF.\n+\t\t */\n+\t\tif (msg->id == MBOX_MSG_NIX_LF_START_RX) {\n+\t\t\t/* Send link status to VF */\n+\t\t\tstruct cgx_link_user_info linfo;\n+\t\t\tstruct mbox_msghdr *vf_msg;\n+\n+\t\t\t/* Get the link status */\n+\t\t\tif (dev->ops && dev->ops->link_status_get)\n+\t\t\t\tdev->ops->link_status_get(dev, &linfo);\n+\n+\t\t\t/* Prepare the message to be sent */\n+\t\t\tvf_msg = otx2_mbox_alloc_msg(&dev->mbox_vfpf_up, vf,\n+\t\t\t\t\t\t     size);\n+\t\t\totx2_mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg);\n+\t\t\tmemcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr),\n+\t\t\t       &linfo, sizeof(struct cgx_link_user_info));\n+\n+\t\t\tvf_msg->rc = msg->rc;\n+\t\t\tvf_msg->pcifunc = msg->pcifunc;\n+\t\t\t/* Send to VF */\n+\t\t\totx2_mbox_msg_send(&dev->mbox_vfpf_up, vf);\n+\t\t}\n \t\toffset = mbox->rx_start + msg->next_msgoff;\n \t}\n \trte_spinlock_unlock(&mdev->mbox_lock);\ndiff --git a/drivers/common/octeontx2/otx2_dev.h b/drivers/common/octeontx2/otx2_dev.h\nindex cd4fe517db..be0faacc6a 100644\n--- a/drivers/common/octeontx2/otx2_dev.h\n+++ b/drivers/common/octeontx2/otx2_dev.h\n@@ -57,15 +57,19 @@\n \n struct otx2_dev;\n \n-/* Link status callback */\n-typedef void (*otx2_link_status_t)(struct otx2_dev *dev,\n+/* Link status update callback */\n+typedef void (*otx2_link_status_update_t)(struct otx2_dev *dev,\n \t\t\t\t   struct cgx_link_user_info *link);\n /* PTP info callback */\n typedef int (*otx2_ptp_info_t)(struct otx2_dev *dev, bool ptp_en);\n+/* Link status get callback */\n+typedef void (*otx2_link_status_get_t)(struct otx2_dev *dev,\n+\t\t\t\t   struct cgx_link_user_info *link);\n \n struct otx2_dev_ops {\n-\totx2_link_status_t link_status_update;\n+\totx2_link_status_update_t link_status_update;\n \totx2_ptp_info_t ptp_info_update;\n+\totx2_link_status_get_t link_status_get;\n };\n \n #define OTX2_DEV\t\t\t\t\t\\\n",
    "prefixes": [
        "1/2"
    ]
}