get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94856,
    "url": "https://patches.dpdk.org/api/patches/94856/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210625093157.24436-2-ting.xu@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": "<20210625093157.24436-2-ting.xu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210625093157.24436-2-ting.xu@intel.com",
    "date": "2021-06-25T09:31:53",
    "name": "[v3,1/5] common/iavf: support ETS-based QoS offload configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "71820471cf3db0842bbede9f246c4702263b5790",
    "submitter": {
        "id": 1363,
        "url": "https://patches.dpdk.org/api/people/1363/?format=api",
        "name": "Xu, Ting",
        "email": "ting.xu@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/20210625093157.24436-2-ting.xu@intel.com/mbox/",
    "series": [
        {
            "id": 17486,
            "url": "https://patches.dpdk.org/api/series/17486/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17486",
            "date": "2021-06-25T09:31:52",
            "name": "Enable ETS-based Tx QoS for VF in DCF",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/17486/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94856/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94856/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 DEFE1A0547;\n\tFri, 25 Jun 2021 11:33:40 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 65DEA40E78;\n\tFri, 25 Jun 2021 11:33:40 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 14C484068A\n for <dev@dpdk.org>; Fri, 25 Jun 2021 11:33:33 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Jun 2021 02:33:27 -0700",
            "from dpdk-xuting-main.sh.intel.com ([10.67.117.76])\n by orsmga001.jf.intel.com with ESMTP; 25 Jun 2021 02:33:24 -0700"
        ],
        "IronPort-SDR": [
            "\n KQ3uaex//0YyyiphDjzQQIu5eJBFpkMXMo7SRUZ2pwlI5N6FG2md0NY3mUc9MqFwxsOVGvl3qT\n W3/Ktny9nydQ==",
            "\n iQYNPwuD94erTGBSvyYMAx5j+pK4BvTfRqm2Z1SYms+M1h6MqiteN5ZOFjXalHBQjAikHJfsWq\n mOcA5z7QXcVA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10025\"; a=\"188022036\"",
            "E=Sophos;i=\"5.83,298,1616482800\"; d=\"scan'208\";a=\"188022036\"",
            "E=Sophos;i=\"5.83,298,1616482800\"; d=\"scan'208\";a=\"488117884\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ting Xu <ting.xu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com,\n qiming.yang@intel.com",
        "Date": "Fri, 25 Jun 2021 17:31:53 +0800",
        "Message-Id": "<20210625093157.24436-2-ting.xu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210625093157.24436-1-ting.xu@intel.com>",
        "References": "<20210601014034.36100-1-ting.xu@intel.com>\n <20210625093157.24436-1-ting.xu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 1/5] common/iavf: support ETS-based QoS\n offload configuration",
        "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": "This patch adds new virtchnl opcodes and structures for QoS\nconfiguration, which includes:\n1. VIRTCHNL_VF_OFFLOAD_TC, to negotiate the capability supporting QoS\nconfiguration. If VF and PF both have this flag, then the ETS-based QoS\noffload function is supported.\n2. VIRTCHNL_OP_DCF_CONFIG_BW, DCF is supposed to configure min and max\nbandwidth for each VF per enabled TCs. To make the VSI node bandwidth\nconfiguration work, DCF also needs to configure TC node bandwidth\ndirectly.\n3. VIRTCHNL_OP_GET_QOS_CAPS, VF queries current QoS configuration, such\nas enabled TCs, arbiter type, up2tc and bandwidth of VSI node. The\nconfiguration is previously set by DCB and DCF, and now is the potential\nQoS capability of VF. VF can take it as reference to configure queue TC\nmapping.\n4. VIRTCHNL_OP_CONFIG_TC_MAP, set VF queues to TC mapping for all Tx and\nRx queues. Queues mapping to one TC should be continuous and all\nallocated queues should be mapped.\n\nSigned-off-by: Ting Xu <ting.xu@intel.com>\n---\n drivers/common/iavf/iavf_type.h |   2 +\n drivers/common/iavf/virtchnl.h  | 131 ++++++++++++++++++++++++++++++++\n 2 files changed, 133 insertions(+)",
    "diff": "diff --git a/drivers/common/iavf/iavf_type.h b/drivers/common/iavf/iavf_type.h\nindex f3815d523b..73dfb47e70 100644\n--- a/drivers/common/iavf/iavf_type.h\n+++ b/drivers/common/iavf/iavf_type.h\n@@ -141,6 +141,8 @@ enum iavf_debug_mask {\n #define IAVF_PHY_LED_MODE_MASK\t\t\t0xFFFF\n #define IAVF_PHY_LED_MODE_ORIG\t\t\t0x80000000\n \n+#define IAVF_MAX_TRAFFIC_CLASS\t8\n+\n /* Memory types */\n enum iavf_memset_type {\n \tIAVF_NONDMA_MEM = 0,\ndiff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h\nindex 197edce8a1..1cf0866124 100644\n--- a/drivers/common/iavf/virtchnl.h\n+++ b/drivers/common/iavf/virtchnl.h\n@@ -85,6 +85,10 @@ enum virtchnl_rx_hsplit {\n \tVIRTCHNL_RX_HSPLIT_SPLIT_SCTP    = 8,\n };\n \n+enum virtchnl_bw_limit_type {\n+\tVIRTCHNL_BW_SHAPER = 0,\n+};\n+\n #define VIRTCHNL_ETH_LENGTH_OF_ADDRESS\t6\n /* END GENERIC DEFINES */\n \n@@ -130,6 +134,7 @@ enum virtchnl_ops {\n \tVIRTCHNL_OP_ADD_CLOUD_FILTER = 32,\n \tVIRTCHNL_OP_DEL_CLOUD_FILTER = 33,\n \t/* opcodes 34, 35, 36, and 37 are reserved */\n+\tVIRTCHNL_OP_DCF_CONFIG_BW = 37,\n \tVIRTCHNL_OP_DCF_VLAN_OFFLOAD = 38,\n \tVIRTCHNL_OP_DCF_CMD_DESC = 39,\n \tVIRTCHNL_OP_DCF_CMD_BUFF = 40,\n@@ -152,6 +157,8 @@ enum virtchnl_ops {\n \tVIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2 = 57,\n \tVIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 = 58,\n \tVIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 = 59,\n+\tVIRTCHNL_OP_GET_QOS_CAPS = 66,\n+\tVIRTCHNL_OP_CONFIG_QUEUE_TC_MAP = 67,\n \tVIRTCHNL_OP_ENABLE_QUEUES_V2 = 107,\n \tVIRTCHNL_OP_DISABLE_QUEUES_V2 = 108,\n \tVIRTCHNL_OP_MAP_QUEUE_VECTOR = 111,\n@@ -398,6 +405,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);\n #define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC\tBIT(26)\n #define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF\t\tBIT(27)\n #define VIRTCHNL_VF_OFFLOAD_FDIR_PF\t\tBIT(28)\n+#define VIRTCHNL_VF_OFFLOAD_QOS\t\tBIT(29)\n #define VIRTCHNL_VF_CAP_DCF\t\t\tBIT(30)\n \t/* BIT(31) is reserved */\n \n@@ -1285,6 +1293,14 @@ struct virtchnl_filter {\n \n VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);\n \n+struct virtchnl_shaper_bw {\n+\t/* Unit is Kbps */\n+\tu32 committed;\n+\tu32 peak;\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_shaper_bw);\n+\n /* VIRTCHNL_OP_DCF_GET_VSI_MAP\n  * VF sends this message to get VSI mapping table.\n  * PF responds with an indirect message containing VF's\n@@ -1357,6 +1373,37 @@ struct virtchnl_dcf_vlan_offload {\n \n VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_dcf_vlan_offload);\n \n+struct virtchnl_dcf_bw_cfg {\n+\tu8 tc_num;\n+#define VIRTCHNL_DCF_BW_CIR\t\tBIT(0)\n+#define VIRTCHNL_DCF_BW_PIR\t\tBIT(1)\n+\tu8 bw_type;\n+\tu8 pad[2];\n+\tenum virtchnl_bw_limit_type type;\n+\tunion {\n+\t\tstruct virtchnl_shaper_bw shaper;\n+\t\tu8 pad2[32];\n+\t};\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_dcf_bw_cfg);\n+\n+/* VIRTCHNL_OP_DCF_CONFIG_BW\n+ * VF send this message to set the bandwidth configuration of each\n+ * TC with a specific vf id. The flag node_type is to indicate that\n+ * this message is to configure VSI node or TC node bandwidth.\n+ */\n+struct virtchnl_dcf_bw_cfg_list {\n+\tu16 vf_id;\n+\tu8 num_elem;\n+#define VIRTCHNL_DCF_TARGET_TC_BW\t0\n+#define VIRTCHNL_DCF_TARGET_VF_BW\t1\n+\tu8 node_type;\n+\tstruct virtchnl_dcf_bw_cfg cfg[1];\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(44, virtchnl_dcf_bw_cfg_list);\n+\n struct virtchnl_supported_rxdids {\n \t/* see enum virtchnl_rx_desc_id_bitmasks */\n \tu64 supported_rxdids;\n@@ -1768,6 +1815,62 @@ struct virtchnl_fdir_del {\n \n VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_fdir_del);\n \n+/* VIRTCHNL_OP_GET_QOS_CAPS\n+ * VF sends this message to get its QoS Caps, such as\n+ * TC number, Arbiter and Bandwidth.\n+ */\n+struct virtchnl_qos_cap_elem {\n+\tu8 tc_num;\n+\tu8 tc_prio;\n+#define VIRTCHNL_ABITER_STRICT      0\n+#define VIRTCHNL_ABITER_ETS         2\n+\tu8 arbiter;\n+#define VIRTCHNL_STRICT_WEIGHT      1\n+\tu8 weight;\n+\tenum virtchnl_bw_limit_type type;\n+\tunion {\n+\t\tstruct virtchnl_shaper_bw shaper;\n+\t\tu8 pad2[32];\n+\t};\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_qos_cap_elem);\n+\n+struct virtchnl_qos_cap_list {\n+\tu16 vsi_id;\n+\tu16 num_elem;\n+\tstruct virtchnl_qos_cap_elem cap[1];\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(44, virtchnl_qos_cap_list);\n+\n+/* VIRTCHNL_OP_CONFIG_QUEUE_TC_MAP\n+ * VF sends message virtchnl_queue_tc_mapping to set queue to tc\n+ * mapping for all the Tx and Rx queues with a specified VSI, and\n+ * would get response about bitmap of valid user priorities\n+ * associated with queues.\n+ */\n+struct virtchnl_queue_tc_mapping {\n+\tu16 vsi_id;\n+\tu16 num_tc;\n+\tu16 num_queue_pairs;\n+\tu8 pad[2];\n+\tunion {\n+\t\tstruct {\n+\t\t\tu16 start_queue_id;\n+\t\t\tu16 queue_count;\n+\t\t} req;\n+\t\tstruct {\n+#define VIRTCHNL_USER_PRIO_TYPE_UP\t0\n+#define VIRTCHNL_USER_PRIO_TYPE_DSCP\t1\n+\t\t\tu16 prio_type;\n+\t\t\tu16 valid_prio_bitmap;\n+\t\t} resp;\n+\t} tc[1];\n+};\n+\n+VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_tc_mapping);\n+\n /* VIRTCHNL_OP_QUERY_FDIR_FILTER\n  * VF sends this request to PF by filling out vsi_id,\n  * flow_id and reset_counter. PF will return query_info\n@@ -2118,6 +2221,19 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,\n \tcase VIRTCHNL_OP_DCF_GET_VSI_MAP:\n \tcase VIRTCHNL_OP_DCF_GET_PKG_INFO:\n \t\tbreak;\n+\tcase VIRTCHNL_OP_DCF_CONFIG_BW:\n+\t\tvalid_len = sizeof(struct virtchnl_dcf_bw_cfg_list);\n+\t\tif (msglen >= valid_len) {\n+\t\t\tstruct virtchnl_dcf_bw_cfg_list *cfg_list =\n+\t\t\t\t(struct virtchnl_dcf_bw_cfg_list *)msg;\n+\t\t\tif (cfg_list->num_elem == 0) {\n+\t\t\t\terr_msg_format = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tvalid_len += (cfg_list->num_elem - 1) *\n+\t\t\t\t\t sizeof(struct virtchnl_dcf_bw_cfg);\n+\t\t}\n+\t\tbreak;\n \tcase VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:\n \t\tbreak;\n \tcase VIRTCHNL_OP_ADD_RSS_CFG:\n@@ -2133,6 +2249,21 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,\n \tcase VIRTCHNL_OP_QUERY_FDIR_FILTER:\n \t\tvalid_len = sizeof(struct virtchnl_fdir_query);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_GET_QOS_CAPS:\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_CONFIG_QUEUE_TC_MAP:\n+\t\tvalid_len = sizeof(struct virtchnl_queue_tc_mapping);\n+\t\tif (msglen >= valid_len) {\n+\t\t\tstruct virtchnl_queue_tc_mapping *q_tc =\n+\t\t\t\t(struct virtchnl_queue_tc_mapping *)msg;\n+\t\t\tif (q_tc->num_tc == 0) {\n+\t\t\t\terr_msg_format = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tvalid_len += (q_tc->num_tc - 1) *\n+\t\t\t\t\t sizeof(q_tc->tc[0]);\n+\t\t}\n+\t\tbreak;\n \tcase VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS:\n \t\tbreak;\n \tcase VIRTCHNL_OP_ADD_VLAN_V2:\n",
    "prefixes": [
        "v3",
        "1/5"
    ]
}