get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131248,
    "url": "https://patches.dpdk.org/api/patches/131248/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230908111701.1022724-11-beilei.xing@intel.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": "<20230908111701.1022724-11-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230908111701.1022724-11-beilei.xing@intel.com",
    "date": "2023-09-08T11:17:01",
    "name": "[v4,10/10] net/cpfl: support link update for representor",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "937ecdbef40720bdc91a01b424c785231d8b680b",
    "submitter": {
        "id": 410,
        "url": "https://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230908111701.1022724-11-beilei.xing@intel.com/mbox/",
    "series": [
        {
            "id": 29454,
            "url": "https://patches.dpdk.org/api/series/29454/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29454",
            "date": "2023-09-08T11:16:51",
            "name": "net/cpfl: support port representor",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/29454/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/131248/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/131248/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 0EE8F4253D;\n\tFri,  8 Sep 2023 04:59:35 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2304D40A6D;\n\tFri,  8 Sep 2023 04:58:41 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 5916740A67\n for <dev@dpdk.org>; Fri,  8 Sep 2023 04:58:38 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Sep 2023 19:58:36 -0700",
            "from dpdk-beileix-icelake.sh.intel.com ([10.67.116.248])\n by fmsmga008.fm.intel.com with ESMTP; 07 Sep 2023 19:58:35 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1694141918; x=1725677918;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=s1jSWnDvgZz2HXnaZpny6S84ZAjR0QjuzHPmnI74SoM=;\n b=RaRUv1m7Z+iGXRlKI4H9o4PUbkSWCIPncvhaBBxxiBuflWATZSBIsc7P\n ojgjxmPJZEZRUXva3JCpEaAatyWIOBgqbTB7lhMDmADy4S9ToVyWvkfTU\n y6n+wkX/DyPANIg+DChGs7GtdnFT5r3cRqnw97zU4AMiTy8brhieB3kbf\n wSfBNC81TC0cCJdG8976yQ6b9UKnPu5aznHz8H4lRL3aTNF6IlBmAZITb\n zD7Pmp/MtnALzHBVbP5Ohgi/tVrYmbGj7R4ZplV7PStm5ZLXkpyMNs6oe\n BFV9tl8+MaTLinndbuVMFDDqLrKrkTLeL6c8nPa8cDWpKwkT3AUbLB5H6 Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10826\"; a=\"357002112\"",
            "E=Sophos;i=\"6.02,236,1688454000\"; d=\"scan'208\";a=\"357002112\"",
            "E=McAfee;i=\"6600,9927,10826\"; a=\"807789894\"",
            "E=Sophos;i=\"6.02,236,1688454000\"; d=\"scan'208\";a=\"807789894\""
        ],
        "X-ExtLoop1": "1",
        "From": "beilei.xing@intel.com",
        "To": "jingjing.wu@intel.com",
        "Cc": "dev@dpdk.org, mingxia.liu@intel.com, Beilei Xing <beilei.xing@intel.com>",
        "Subject": "[PATCH v4 10/10] net/cpfl: support link update for representor",
        "Date": "Fri,  8 Sep 2023 11:17:01 +0000",
        "Message-Id": "<20230908111701.1022724-11-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230908111701.1022724-1-beilei.xing@intel.com>",
        "References": "<20230907151606.849612-1-beilei.xing@intel.com>\n <20230908111701.1022724-1-beilei.xing@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "From: Beilei Xing <beilei.xing@intel.com>\n\nAdd link update ops for representor.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/cpfl/cpfl_ethdev.h      |  1 +\n drivers/net/cpfl/cpfl_representor.c | 21 +++++++++++++++++++++\n 2 files changed, 22 insertions(+)",
    "diff": "diff --git a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h\nindex 4937d2c6e3..0dd9d4e7f9 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.h\n+++ b/drivers/net/cpfl/cpfl_ethdev.h\n@@ -162,6 +162,7 @@ struct cpfl_repr {\n \tstruct cpfl_repr_id repr_id;\n \tstruct rte_ether_addr mac_addr;\n \tstruct cpfl_vport_info *vport_info;\n+\tbool func_up; /* If the represented function is up */\n };\n \n struct cpfl_adapter_ext {\ndiff --git a/drivers/net/cpfl/cpfl_representor.c b/drivers/net/cpfl/cpfl_representor.c\nindex 0cd92b1351..3c0fa957de 100644\n--- a/drivers/net/cpfl/cpfl_representor.c\n+++ b/drivers/net/cpfl/cpfl_representor.c\n@@ -308,6 +308,23 @@ cpfl_repr_tx_queue_setup(__rte_unused struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+cpfl_repr_link_update(struct rte_eth_dev *ethdev,\n+\t\t      __rte_unused int wait_to_complete)\n+{\n+\tstruct cpfl_repr *repr = CPFL_DEV_TO_REPR(ethdev);\n+\tstruct rte_eth_link *dev_link = &ethdev->data->dev_link;\n+\n+\tif (!(ethdev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR)) {\n+\t\tPMD_INIT_LOG(ERR, \"This ethdev is not representor.\");\n+\t\treturn -EINVAL;\n+\t}\n+\tdev_link->link_status = repr->func_up ?\n+\t\tRTE_ETH_LINK_UP : RTE_ETH_LINK_DOWN;\n+\n+\treturn 0;\n+}\n+\n static const struct eth_dev_ops cpfl_repr_dev_ops = {\n \t.dev_start\t\t= cpfl_repr_dev_start,\n \t.dev_stop\t\t= cpfl_repr_dev_stop,\n@@ -317,6 +334,8 @@ static const struct eth_dev_ops cpfl_repr_dev_ops = {\n \n \t.rx_queue_setup\t\t= cpfl_repr_rx_queue_setup,\n \t.tx_queue_setup\t\t= cpfl_repr_tx_queue_setup,\n+\n+\t.link_update\t\t= cpfl_repr_link_update,\n };\n \n static int\n@@ -331,6 +350,8 @@ cpfl_repr_init(struct rte_eth_dev *eth_dev, void *init_param)\n \trepr->itf.type = CPFL_ITF_TYPE_REPRESENTOR;\n \trepr->itf.adapter = adapter;\n \trepr->itf.data = eth_dev->data;\n+\tif (repr->vport_info->vport_info.vport_status == CPCHNL2_VPORT_STATUS_ENABLED)\n+\t\trepr->func_up = true;\n \n \teth_dev->dev_ops = &cpfl_repr_dev_ops;\n \n",
    "prefixes": [
        "v4",
        "10/10"
    ]
}