Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/131354/?format=api
http://patches.dpdk.org/api/patches/131354/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230912162640.1439383-7-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": "<20230912162640.1439383-7-beilei.xing@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230912162640.1439383-7-beilei.xing@intel.com", "date": "2023-09-12T16:26:36", "name": "[v5,06/10] net/cpfl: support vport list/info get", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "74148e86deedfc35f8fcc3bd132a912ad4c1b84d", "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/20230912162640.1439383-7-beilei.xing@intel.com/mbox/", "series": [ { "id": 29484, "url": "http://patches.dpdk.org/api/series/29484/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29484", "date": "2023-09-12T16:26:30", "name": "net/cpfl: support port representor", "version": 5, "mbox": "http://patches.dpdk.org/series/29484/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/131354/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/131354/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 280294257B;\n\tTue, 12 Sep 2023 10:08:48 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5C0E440647;\n\tTue, 12 Sep 2023 10:08:18 +0200 (CEST)", "from mgamail.intel.com (mgamail.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id E5FF940693\n for <dev@dpdk.org>; Tue, 12 Sep 2023 10:08:14 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Sep 2023 01:08:14 -0700", "from dpdk-beileix-icelake.sh.intel.com ([10.67.116.248])\n by fmsmga002.fm.intel.com with ESMTP; 12 Sep 2023 01:08:12 -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=1694506095; x=1726042095;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=9JFeyaIM8QJCwDjJb+6HGRyI/IrnpSUF5+EwuRDHvLQ=;\n b=PZ2hefxQfjFXTIAVxLYJdtdEAYFDmQaL2WAZbIAQEiKdM9hK4//ILmgA\n ijJhE0YdDM9AjcSzCwhnTcekvmq4ZQXbvNRRot/ZQp4hkEHHtymhzBn4F\n Lsy6GCkmXGOXZq+fyANybriPWdeQn80Y3o0iMfh8au5kCbdg+bZLKHlTL\n WGQtTMUPQeV+//j0q6KMe4sgGFZXxMZc1mQmqsICXwnnUTmOFYkpn0Oke\n ENdY9tj7VM29rl5pndxxgDK8N0u+pfELIwe1wUQn1K2p6WS4jzol04pbz\n naRvx0p9sjlmPy7YjhGTqbFkJaFdpQKoF6ALSG2U9Tek13LRfMQksEOUp A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10830\"; a=\"375639571\"", "E=Sophos;i=\"6.02,245,1688454000\"; d=\"scan'208\";a=\"375639571\"", "E=McAfee;i=\"6600,9927,10830\"; a=\"858702577\"", "E=Sophos;i=\"6.02,245,1688454000\"; d=\"scan'208\";a=\"858702577\"" ], "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 v5 06/10] net/cpfl: support vport list/info get", "Date": "Tue, 12 Sep 2023 16:26:36 +0000", "Message-Id": "<20230912162640.1439383-7-beilei.xing@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230912162640.1439383-1-beilei.xing@intel.com>", "References": "<20230908111701.1022724-1-beilei.xing@intel.com>\n <20230912162640.1439383-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 de86c49016..4975c05a55 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.h\n+++ b/drivers/net/cpfl/cpfl_ethdev.h\n@@ -148,6 +148,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 28167bb81d..2f0f5d8434 100644\n--- a/drivers/net/cpfl/meson.build\n+++ b/drivers/net/cpfl/meson.build\n@@ -16,6 +16,7 @@ deps += ['hash', 'common_idpf']\n sources = files(\n 'cpfl_ethdev.c',\n 'cpfl_rxtx.c',\n+ 'cpfl_vchnl.c',\n )\n \n if arch_subdir == 'x86'\n", "prefixes": [ "v5", "06/10" ] }{ "id": 131354, "url": "