get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131219,
    "url": "http://patches.dpdk.org/api/patches/131219/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230907151606.849612-10-beilei.xing@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20230907151606.849612-10-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230907151606.849612-10-beilei.xing@intel.com",
    "date": "2023-09-07T15:16:04",
    "name": "[v3,09/11] net/cpfl: support vport list/info get",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "276a4baa2fb02e9893de3138e0b93542a583e9b7",
    "submitter": {
        "id": 410,
        "url": "http://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230907151606.849612-10-beilei.xing@intel.com/mbox/",
    "series": [
        {
            "id": 29441,
            "url": "http://patches.dpdk.org/api/series/29441/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29441",
            "date": "2023-09-07T15:15:55",
            "name": "net/cpfl: support port representor",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/29441/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/131219/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/131219/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 D958F42532;\n\tThu,  7 Sep 2023 08:58:30 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CEDF24069F;\n\tThu,  7 Sep 2023 08:57:40 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 9D52D40649\n for <dev@dpdk.org>; Thu,  7 Sep 2023 08:57:38 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Sep 2023 23:57:38 -0700",
            "from dpdk-beileix-icelake.sh.intel.com ([10.67.116.248])\n by fmsmga001.fm.intel.com with ESMTP; 06 Sep 2023 23:57:23 -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=1694069858; x=1725605858;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=AYHbXmJbpTEyWLL+RW38ia66GczrVSNRckXTVmgRr/g=;\n b=L0tWw3tKHThHNNZ9nkO/N+r3iXit1fz0N3o9tP/f64p7Faq7NOKT1LTQ\n BSuozz6V1oRtH9LjCg5+7nQ0I0yZqLYGQA7EMKqfpyP4/BDczhwsRSp82\n +Eit6XmTE8758CYXfue1YF11C8mVcO6zwo77gMpVwd+jnEDVRduRfPkHQ\n vcxOntWo0ReNB02eY9rHBK8ttN5tkPCt0ElFTXhptjUt5+l+njLA8dKYR\n EQdtnIbB3XD0Iqg9KFvx7wsY57UxV9jOEbVwZ6cBT0/rUqbpR6yJPq53x\n s8CZ58wDgrVnssKQYUK+tpAXYMkVKK2GpCkS5ERbM46KAbu7Xyybv0ueR w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10825\"; a=\"356758139\"",
            "E=Sophos;i=\"6.02,234,1688454000\"; d=\"scan'208\";a=\"356758139\"",
            "E=McAfee;i=\"6600,9927,10825\"; a=\"885035798\"",
            "E=Sophos;i=\"6.02,234,1688454000\"; d=\"scan'208\";a=\"885035798\""
        ],
        "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 v3 09/11] net/cpfl: support vport list/info get",
        "Date": "Thu,  7 Sep 2023 15:16:04 +0000",
        "Message-Id": "<20230907151606.849612-10-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230907151606.849612-1-beilei.xing@intel.com>",
        "References": "<20230816150541.144532-1-beilei.xing@intel.com>\n <20230907151606.849612-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\nSupport cp channel ops CPCHNL2_OP_CPF_GET_VPORT_LIST and\nCPCHNL2_OP_CPF_GET_VPORT_INFO.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/cpfl/cpfl_ethdev.h |  8 ++++\n drivers/net/cpfl/cpfl_vchnl.c  | 72 ++++++++++++++++++++++++++++++++++\n drivers/net/cpfl/meson.build   |  1 +\n 3 files changed, 81 insertions(+)\n create mode 100644 drivers/net/cpfl/cpfl_vchnl.c",
    "diff": "diff --git a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h\nindex 1a87e5931c..4c6653e113 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.h\n+++ b/drivers/net/cpfl/cpfl_ethdev.h\n@@ -198,6 +198,14 @@ struct cpfl_adapter_ext {\n \n TAILQ_HEAD(cpfl_adapter_list, cpfl_adapter_ext);\n \n+int cpfl_cc_vport_list_get(struct cpfl_adapter_ext *adapter,\n+\t\t\t   struct cpfl_vport_id *vi,\n+\t\t\t   struct cpchnl2_get_vport_list_response *response);\n+int cpfl_cc_vport_info_get(struct cpfl_adapter_ext *adapter,\n+\t\t\t   struct cpchnl2_vport_id *vport_id,\n+\t\t\t   struct cpfl_vport_id *vi,\n+\t\t\t   struct cpchnl2_get_vport_info_response *response);\n+\n #define CPFL_DEV_TO_PCI(eth_dev)\t\t\\\n \tRTE_DEV_TO_PCI((eth_dev)->device)\n #define CPFL_ADAPTER_TO_EXT(p)\t\t\t\t\t\\\ndiff --git a/drivers/net/cpfl/cpfl_vchnl.c b/drivers/net/cpfl/cpfl_vchnl.c\nnew file mode 100644\nindex 0000000000..a21a4a451f\n--- /dev/null\n+++ b/drivers/net/cpfl/cpfl_vchnl.c\n@@ -0,0 +1,72 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2023 Intel Corporation\n+ */\n+\n+#include \"cpfl_ethdev.h\"\n+#include <idpf_common_virtchnl.h>\n+\n+int\n+cpfl_cc_vport_list_get(struct cpfl_adapter_ext *adapter,\n+\t\t       struct cpfl_vport_id *vi,\n+\t\t       struct cpchnl2_get_vport_list_response *response)\n+{\n+\tstruct cpchnl2_get_vport_list_request request;\n+\tstruct idpf_cmd_info args;\n+\tint err;\n+\n+\tmemset(&request, 0, sizeof(request));\n+\trequest.func_type = vi->func_type;\n+\trequest.pf_id = vi->pf_id;\n+\trequest.vf_id = vi->vf_id;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.ops = CPCHNL2_OP_GET_VPORT_LIST;\n+\targs.in_args = (uint8_t *)&request;\n+\targs.in_args_size = sizeof(struct cpchnl2_get_vport_list_request);\n+\targs.out_buffer = adapter->base.mbx_resp;\n+\targs.out_size = IDPF_DFLT_MBX_BUF_SIZE;\n+\n+\terr = idpf_vc_cmd_execute(&adapter->base, &args);\n+\tif (err != 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to execute command of CPCHNL2_OP_GET_VPORT_LIST\");\n+\t\treturn err;\n+\t}\n+\n+\trte_memcpy(response, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);\n+\n+\treturn 0;\n+}\n+\n+int\n+cpfl_cc_vport_info_get(struct cpfl_adapter_ext *adapter,\n+\t\t       struct cpchnl2_vport_id *vport_id,\n+\t\t       struct cpfl_vport_id *vi,\n+\t\t       struct cpchnl2_get_vport_info_response *response)\n+{\n+\tstruct cpchnl2_get_vport_info_request request;\n+\tstruct idpf_cmd_info args;\n+\tint err;\n+\n+\trequest.vport.vport_id = vport_id->vport_id;\n+\trequest.vport.vport_type = vport_id->vport_type;\n+\trequest.func.func_type = vi->func_type;\n+\trequest.func.pf_id = vi->pf_id;\n+\trequest.func.vf_id = vi->vf_id;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.ops = CPCHNL2_OP_GET_VPORT_INFO;\n+\targs.in_args = (uint8_t *)&request;\n+\targs.in_args_size = sizeof(struct cpchnl2_get_vport_info_request);\n+\targs.out_buffer = adapter->base.mbx_resp;\n+\targs.out_size = IDPF_DFLT_MBX_BUF_SIZE;\n+\n+\terr = idpf_vc_cmd_execute(&adapter->base, &args);\n+\tif (err != 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to execute command of CPCHNL2_OP_GET_VPORT_INFO\");\n+\t\treturn err;\n+\t}\n+\n+\trte_memcpy(response, args.out_buffer, sizeof(*response));\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build\nindex 1d963e5fd1..fb075c6860 100644\n--- a/drivers/net/cpfl/meson.build\n+++ b/drivers/net/cpfl/meson.build\n@@ -17,6 +17,7 @@ sources = files(\n         'cpfl_ethdev.c',\n         'cpfl_rxtx.c',\n         'cpfl_representor.c',\n+        'cpfl_vchnl.c',\n )\n \n if arch_subdir == 'x86'\n",
    "prefixes": [
        "v3",
        "09/11"
    ]
}