get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126377,
    "url": "http://patchwork.dpdk.org/api/patches/126377/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230421084043.135503-14-wenjing.qiao@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230421084043.135503-14-wenjing.qiao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230421084043.135503-14-wenjing.qiao@intel.com",
    "date": "2023-04-21T08:40:41",
    "name": "[v2,13/15] common/idpf: add/delete queue groups commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "69bea26b2f5c5815d39637a9507b179d86bd4418",
    "submitter": {
        "id": 2680,
        "url": "http://patchwork.dpdk.org/api/people/2680/?format=api",
        "name": "Wenjing Qiao",
        "email": "wenjing.qiao@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230421084043.135503-14-wenjing.qiao@intel.com/mbox/",
    "series": [
        {
            "id": 27813,
            "url": "http://patchwork.dpdk.org/api/series/27813/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=27813",
            "date": "2023-04-21T08:40:28",
            "name": "update idpf shared code",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/27813/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/126377/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/126377/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 BFCA9429AA;\n\tFri, 21 Apr 2023 10:47:20 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 920C342D3F;\n\tFri, 21 Apr 2023 10:46:27 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 79A8242D0B\n for <dev@dpdk.org>; Fri, 21 Apr 2023 10:46:24 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Apr 2023 01:46:24 -0700",
            "from dpdk-wenjing-01.sh.intel.com ([10.67.118.239])\n by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2023 01:46:22 -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=1682066784; x=1713602784;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=WouZ5MZLkn3YhMvzRAOlChwCZIa7TiiCq3lLPL1CLLI=;\n b=hB93H4LU+SJ2qig5athTR26Ao0uxz9Yy0oArBGYgSqUwhKBtreY4sSo/\n LHXKEcdGmw6dMRfr+M7YZIIydUObMBUfX9uipocsfANcX0pBsSi5ehiFV\n JG67wPB3QUrwJA32QUrfapy9cKz9CI2TO7S37L51Cgv3uTKxl+dpjXLIi\n ILa8yOjrD7CXZP3FOaaIfESyoXhCVLEVAMVxEN50QdFG0pECv7EEAKgZu\n OYQt003LGBcYqWkJD5J+Rm8d9GuJQI/yvwp1/d6XtAXTKYBM9+Q0KR4Tl\n BjNjreIabDIffXsGQIgYYzvJw0tOf3FVygu4awctN0K0RfMydQVo8r2jf w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10686\"; a=\"334822921\"",
            "E=Sophos;i=\"5.99,214,1677571200\"; d=\"scan'208\";a=\"334822921\"",
            "E=McAfee;i=\"6600,9927,10686\"; a=\"761501529\"",
            "E=Sophos;i=\"5.99,214,1677571200\"; d=\"scan'208\";a=\"761501529\""
        ],
        "X-ExtLoop1": "1",
        "From": "Wenjing Qiao <wenjing.qiao@intel.com>",
        "To": "jingjing.wu@intel.com,\n\tbeilei.xing@intel.com,\n\tqi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Wenjing Qiao <wenjing.qiao@intel.com>,\n Nizan Zorea <nizan.zorea@intel.com>",
        "Subject": "[PATCH v2 13/15] common/idpf: add/delete queue groups commands",
        "Date": "Fri, 21 Apr 2023 04:40:41 -0400",
        "Message-Id": "<20230421084043.135503-14-wenjing.qiao@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230421084043.135503-1-wenjing.qiao@intel.com>",
        "References": "<20230413094502.1714755-2-wenjing.qiao@intel.com>\n <20230421084043.135503-1-wenjing.qiao@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": "Add types for new two virtchnl commands: add & delete queue group\n\nSigned-off-by: Nizan Zorea <nizan.zorea@intel.com>\nSigned-off-by: Wenjing Qiao <wenjing.qiao@intel.com>\n---\n drivers/common/idpf/base/virtchnl2.h | 189 +++++++++++++++++++++++++++\n 1 file changed, 189 insertions(+)",
    "diff": "diff --git a/drivers/common/idpf/base/virtchnl2.h b/drivers/common/idpf/base/virtchnl2.h\nindex 415e90358e..9e70e5b10e 100644\n--- a/drivers/common/idpf/base/virtchnl2.h\n+++ b/drivers/common/idpf/base/virtchnl2.h\n@@ -95,6 +95,8 @@\n #define\t\tVIRTCHNL2_OP_ADD_MAC_ADDR\t\t535\n #define\t\tVIRTCHNL2_OP_DEL_MAC_ADDR\t\t536\n #define\t\tVIRTCHNL2_OP_CONFIG_PROMISCUOUS_MODE\t537\n+#define\t\tVIRTCHNL2_OP_ADD_QUEUE_GROUPS\t\t538\n+#define\t\tVIRTCHNL2_OP_DEL_QUEUE_GROUPS\t\t539\n \n #define VIRTCHNL2_RDMA_INVALID_QUEUE_IDX\t0xFFFF\n \n@@ -345,6 +347,14 @@\n #define VIRTCHNL2_UNICAST_PROMISC\t\tBIT(0)\n #define VIRTCHNL2_MULTICAST_PROMISC\t\tBIT(1)\n \n+/* VIRTCHNL2_QUEUE_GROUP_TYPE\n+ * Type of queue groups\n+ * 0 till 0xFF is for general use\n+ */\n+#define VIRTCHNL2_QUEUE_GROUP_DATA\t\t1\n+#define VIRTCHNL2_QUEUE_GROUP_MBX\t\t2\n+#define VIRTCHNL2_QUEUE_GROUP_CONFIG\t\t3\n+\n /* VIRTCHNL2_PROTO_HDR_TYPE\n  * Protocol header type within a packet segment. A segment consists of one or\n  * more protocol headers that make up a logical group of protocol headers. Each\n@@ -794,6 +804,133 @@ struct virtchnl2_add_queues {\n \n VIRTCHNL2_CHECK_STRUCT_LEN(56, virtchnl2_add_queues);\n \n+/* Queue Groups Extension */\n+\n+struct virtchnl2_rx_queue_group_info {\n+\t/* IN/OUT, user can ask to update rss_lut size originally allocated\n+\t * by CreateVport command. New size will be returned if allocation\n+\t * suceeded, otherwise original rss_size from CreateVport will\n+\t * be returned.\n+\t */\n+\t__le16 rss_lut_size;\n+\t/* Future extension purpose */\n+\tu8 pad[6];\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(8, virtchnl2_rx_queue_group_info);\n+\n+struct virtchnl2_tx_queue_group_info { /* IN */\n+\t/* TX TC queue group will be connected to */\n+\tu8 tx_tc;\n+\t/* Each group can have its own priority, value 0-7, while each group\n+\t * with unique priority is strict priority.\n+\t * It can be single set of queue groups which configured with\n+\t * same priority, then they are assumed part of WFQ arbitration\n+\t * group and are expected to be assigned with weight.\n+\t */\n+\tu8 priority;\n+\t/* Determines if queue group is expected to be Strict Priority\n+\t * according to its priority\n+\t */\n+\tu8 is_sp;\n+\tu8 pad;\n+\n+\t/* Peak Info Rate Weight in case Queue Group is part of WFQ\n+\t * arbitration set.\n+\t * The weights of the groups are independent of each other.\n+\t * Possible values: 1-200\n+\t */\n+\t__le16 pir_weight;\n+\t/* Future extension purpose for CIR only */\n+\tu8 cir_pad[2];\n+\t/* Future extension purpose*/\n+\tu8 pad2[8];\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(16, virtchnl2_tx_queue_group_info);\n+\n+struct virtchnl2_queue_group_id {\n+\t/* Queue group ID - depended on it's type\n+\t * Data: is an ID which is relative to Vport\n+\t * Config & Mailbox: is an ID which is relative to func.\n+\t * This ID is use in future calls, i.e. delete.\n+\t * Requested by host and assigned by Control plane.\n+\t */\n+\t__le16 queue_group_id;\n+\t/* Functional type: see VIRTCHNL2_QUEUE_GROUP_TYPE definitions */\n+\t__le16 queue_group_type;\n+\tu8 pad[4];\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(8, virtchnl2_queue_group_id);\n+\n+struct virtchnl2_queue_group_info {\n+\t/* IN */\n+\tstruct virtchnl2_queue_group_id qg_id;\n+\t/* IN, Number of queue of different types in the group. */\n+\t__le16 num_tx_q;\n+\t__le16 num_tx_complq;\n+\t__le16 num_rx_q;\n+\t__le16 num_rx_bufq;\n+\n+\tstruct virtchnl2_tx_queue_group_info tx_q_grp_info;\n+\tstruct virtchnl2_rx_queue_group_info rx_q_grp_info;\n+\t/* Future extension purpose */\n+\tu8 pad[40];\n+\tstruct virtchnl2_queue_reg_chunks chunks; /* OUT */\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(120, virtchnl2_queue_group_info);\n+\n+struct virtchnl2_queue_groups {\n+\t__le16 num_queue_groups;\n+\tu8 pad[6];\n+\tstruct virtchnl2_queue_group_info groups[1];\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(128, virtchnl2_queue_groups);\n+\n+/* VIRTCHNL2_OP_ADD_QUEUE_GROUPS\n+ * PF sends this message to request additional transmit/receive queue groups\n+ * beyond the ones that were assigned via CREATE_VPORT request.\n+ * virtchnl2_add_queue_groups structure is used to specify the number of each\n+ * type of queues. CP responds with the same structure with the actual number of\n+ * groups and queues assigned followed by num_queue_groups and num_chunks of\n+ * virtchnl2_queue_groups and virtchnl2_queue_chunk structures.\n+ */\n+struct virtchnl2_add_queue_groups {\n+\t/* IN, vport_id to add queue group to, same as allocated by CreateVport.\n+\t * NA for mailbox and other types not assigned to vport\n+\t */\n+\t__le32 vport_id;\n+\tu8 pad[4];\n+\t/* IN/OUT */\n+\tstruct virtchnl2_queue_groups qg_info;\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(136, virtchnl2_add_queue_groups);\n+\n+/* VIRTCHNL2_OP_DEL_QUEUE_GROUPS\n+ * PF sends this message to delete queue groups.\n+ * PF sends virtchnl2_delete_queue_groups struct to specify the queue groups\n+ * to be deleted. CP performs requested action and returns status and update\n+ * num_queue_groups with number of successfully deleted queue groups.\n+ */\n+struct virtchnl2_delete_queue_groups {\n+\t/* IN, vport_id to delete queue group from, same as\n+\t * allocated by CreateVport.\n+\t */\n+\t__le32 vport_id;\n+\t/* IN/OUT, Defines number of groups provided below */\n+\t__le16 num_queue_groups;\n+\tu8 pad[2];\n+\n+\t/* IN, IDs & types of Queue Groups to delete */\n+\tstruct virtchnl2_queue_group_id qg_ids[1];\n+};\n+\n+VIRTCHNL2_CHECK_STRUCT_LEN(16, virtchnl2_delete_queue_groups);\n+\n /* Structure to specify a chunk of contiguous interrupt vectors */\n struct virtchnl2_vector_chunk {\n \t__le16 start_vector_id;\n@@ -1243,6 +1380,10 @@ static inline const char *virtchnl2_op_str(__le32 v_opcode)\n \t\treturn \"VIRTCHNL2_OP_CREATE_ADI\";\n \tcase VIRTCHNL2_OP_DESTROY_ADI:\n \t\treturn \"VIRTCHNL2_OP_DESTROY_ADI\";\n+\tcase VIRTCHNL2_OP_ADD_QUEUE_GROUPS:\n+\t\treturn \"VIRTCHNL2_OP_ADD_QUEUE_GROUPS\";\n+\tcase VIRTCHNL2_OP_DEL_QUEUE_GROUPS:\n+\t\treturn \"VIRTCHNL2_OP_DEL_QUEUE_GROUPS\";\n \tdefault:\n \t\treturn \"Unsupported (update virtchnl2.h)\";\n \t}\n@@ -1373,6 +1514,54 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3\n \t\t\t\t      sizeof(struct virtchnl2_queue_chunk);\n \t\t}\n \t\tbreak;\n+\tcase VIRTCHNL2_OP_ADD_QUEUE_GROUPS:\n+\t\tvalid_len = sizeof(struct virtchnl2_add_queue_groups);\n+\t\tif (msglen != valid_len) {\n+\t\t\t__le32 i = 0, offset = 0;\n+\t\t\tstruct virtchnl2_add_queue_groups *add_queue_grp =\n+\t\t\t\t(struct virtchnl2_add_queue_groups *)msg;\n+\t\t\tstruct virtchnl2_queue_groups *groups = &(add_queue_grp->qg_info);\n+\t\t\tstruct virtchnl2_queue_group_info *grp_info;\n+\t\t\t__le32 chunk_size = sizeof(struct virtchnl2_queue_reg_chunk);\n+\t\t\t__le32 group_size = sizeof(struct virtchnl2_queue_group_info);\n+\t\t\t__le32 total_chunks_size;\n+\n+\t\t\tif (groups->num_queue_groups == 0) {\n+\t\t\t\terr_msg_format = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tvalid_len += (groups->num_queue_groups - 1) *\n+\t\t\t\t      sizeof(struct virtchnl2_queue_group_info);\n+\t\t\toffset = (u8 *)(&groups->groups[0]) - (u8 *)groups;\n+\n+\t\t\tfor (i = 0; i < groups->num_queue_groups; i++) {\n+\t\t\t\tgrp_info = (struct virtchnl2_queue_group_info *)\n+\t\t\t\t\t\t   ((u8 *)groups + offset);\n+\t\t\t\tif (grp_info->chunks.num_chunks == 0) {\n+\t\t\t\t\toffset += group_size;\n+\t\t\t\t\tcontinue;\n+\t\t\t\t}\n+\t\t\t\ttotal_chunks_size = (grp_info->chunks.num_chunks - 1) * chunk_size;\n+\t\t\t\toffset += group_size + total_chunks_size;\n+\t\t\t\tvalid_len += total_chunks_size;\n+\t\t\t}\n+\t\t}\n+\t\tbreak;\n+\tcase VIRTCHNL2_OP_DEL_QUEUE_GROUPS:\n+\t\tvalid_len = sizeof(struct virtchnl2_delete_queue_groups);\n+\t\tif (msglen != valid_len) {\n+\t\t\tstruct virtchnl2_delete_queue_groups *del_queue_grp =\n+\t\t\t\t(struct virtchnl2_delete_queue_groups *)msg;\n+\n+\t\t\tif (del_queue_grp->num_queue_groups == 0) {\n+\t\t\t\terr_msg_format = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\tvalid_len += (del_queue_grp->num_queue_groups - 1) *\n+\t\t\t\t      sizeof(struct virtchnl2_queue_group_id);\n+\t\t}\n+\t\tbreak;\n \tcase VIRTCHNL2_OP_MAP_QUEUE_VECTOR:\n \tcase VIRTCHNL2_OP_UNMAP_QUEUE_VECTOR:\n \t\tvalid_len = sizeof(struct virtchnl2_queue_vector_maps);\n",
    "prefixes": [
        "v2",
        "13/15"
    ]
}