From: Soumyadeep Hore <soumyadeep.hore@intel.com>
To: bruce.richardson@intel.com, aman.deep.singh@intel.com
Cc: dev@dpdk.org, shaiq.wani@intel.com,
Lukasz Plachno <lukasz.plachno@intel.com>
Subject: [PATCH v1 5/9] common/iavf: add commands for HQOS management
Date: Tue, 10 Sep 2024 10:12:20 +0000 [thread overview]
Message-ID: <20240910101224.497044-6-soumyadeep.hore@intel.com> (raw)
In-Reply-To: <20240910101224.497044-1-soumyadeep.hore@intel.com>
From: Lukasz Plachno <lukasz.plachno@intel.com>
Add VIRTCHNL operations for managing scheduling nodes for VSI subtree.
E822/E830 adapters allows VNet based scheduling tree configuration.
Management of scheduling nodes up to VSIs is done by devlink interface.
Signed-off-by: Lukasz Plachno <lukasz.plachno@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
drivers/common/iavf/virtchnl.h | 66 ++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index a4f3d7724f..ae6770adaf 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -189,6 +189,11 @@ enum virtchnl_ops {
VIRTCHNL_OP_SYNCE_GET_HW_INFO = 128,
VIRTCHNL_OP_GNSS_READ_I2C = 129,
VIRTCHNL_OP_GNSS_WRITE_I2C = 130,
+ VIRTCHNL_OP_HQOS_TREE_READ = 131,
+ VIRTCHNL_OP_HQOS_ELEMS_ADD = 132,
+ VIRTCHNL_OP_HQOS_ELEMS_DEL = 133,
+ VIRTCHNL_OP_HQOS_ELEMS_MOVE = 134,
+ VIRTCHNL_OP_HQOS_ELEMS_CONF = 135,
VIRTCHNL_OP_MAX,
};
@@ -345,6 +350,16 @@ static inline const char *virtchnl_op_str(enum virtchnl_ops v_opcode)
return "VIRTCHNL_OP_FLOW_SUBSCRIBE";
case VIRTCHNL_OP_FLOW_UNSUBSCRIBE:
return "VIRTCHNL_OP_FLOW_UNSUBSCRIBE";
+ case VIRTCHNL_OP_HQOS_TREE_READ:
+ return "VIRTCHNL_OP_HQOS_TREE_READ";
+ case VIRTCHNL_OP_HQOS_ELEMS_ADD:
+ return "VIRTCHNL_OP_HQOS_ELEMS_ADD";
+ case VIRTCHNL_OP_HQOS_ELEMS_DEL:
+ return "VIRTCHNL_OP_HQOS_ELEMS_DEL";
+ case VIRTCHNL_OP_HQOS_ELEMS_MOVE:
+ return "VIRTCHNL_OP_HQOS_ELEMS_MOVE";
+ case VIRTCHNL_OP_HQOS_ELEMS_CONF:
+ return "VIRTCHNL_OP_HQOS_ELEMS_CONF";
case VIRTCHNL_OP_MAX:
return "VIRTCHNL_OP_MAX";
default:
@@ -2508,6 +2523,34 @@ struct virtchnl_gnss_read_i2c_resp {
VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_gnss_read_i2c_resp);
+/*
+ * VIRTCHNL_OP_HQOS_READ_TREE
+ * VIRTCHNL_OP_HQOS_ELEM_ADD
+ * VIRTCHNL_OP_HQOS_ELEM_DEL
+ * VIRTCHNL_OP_HQOS_ELEM_BW_SET
+ * List with tc and queues HW QoS values
+ */
+struct virtchnl_hqos_cfg {
+#define VIRTCHNL_HQOS_ELEM_TYPE_NODE 0
+#define VIRTCHNL_HQOS_ELEM_TYPE_LEAF 1
+ u8 node_type;
+ u8 pad[7];
+ u32 teid;
+ u32 parent_teid;
+ u64 tx_max;
+ u64 tx_share;
+ u32 tx_priority;
+ u32 tx_weight;
+};
+VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_hqos_cfg);
+
+struct virtchnl_hqos_cfg_list {
+ u16 num_elem;
+ u8 pad[6];
+ struct virtchnl_hqos_cfg cfg[1];
+};
+VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_hqos_cfg_list);
+
/* Since VF messages are limited by u16 size, precalculate the maximum possible
* values of nested elements in virtchnl structures that virtual channel can
* possibly handle in a single message.
@@ -2545,6 +2588,10 @@ enum virtchnl_vector_limits {
VIRTCHNL_OP_ADD_DEL_VLAN_V2_MAX =
((u16)(~0) - sizeof(struct virtchnl_vlan_filter_list_v2)) /
sizeof(struct virtchnl_vlan_filter),
+
+ VIRTCHNL_OP_HQOS_ELEMS_MAX =
+ ((u16)(~0) - sizeof(struct virtchnl_hqos_cfg_list)) /
+ sizeof(struct virtchnl_hqos_cfg),
};
/**
@@ -2928,6 +2975,25 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
virtchnl_inline_ipsec_val_msg_len(iim->ipsec_opcode);
break;
}
+ case VIRTCHNL_OP_HQOS_ELEMS_ADD:
+ case VIRTCHNL_OP_HQOS_ELEMS_DEL:
+ case VIRTCHNL_OP_HQOS_ELEMS_MOVE:
+ case VIRTCHNL_OP_HQOS_ELEMS_CONF:
+ valid_len = sizeof(struct virtchnl_hqos_cfg_list);
+ if (msglen >= valid_len) {
+ struct virtchnl_hqos_cfg_list *v_hcl =
+ (struct virtchnl_hqos_cfg_list *)msg;
+ if (v_hcl->num_elem == 0 ||
+ v_hcl->num_elem > VIRTCHNL_OP_HQOS_ELEMS_MAX) {
+ err_msg_format = true;
+ break;
+ }
+ valid_len += (v_hcl->num_elem - 1) *
+ sizeof(struct virtchnl_hqos_cfg);
+ }
+ break;
+ case VIRTCHNL_OP_HQOS_TREE_READ:
+ break;
/* These are always errors coming from the VF. */
case VIRTCHNL_OP_EVENT:
case VIRTCHNL_OP_UNKNOWN:
--
2.34.1
next prev parent reply other threads:[~2024-09-10 11:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 10:12 [PATCH v1 0/9] Update IAVF Base Driver Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 1/9] common/iavf: update the PTP enablement in virtchnl Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 2/9] common/iavf: add SyncE support over VF Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 3/9] common/iavf: add GNSS " Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 4/9] common/iavf: define the maximum MSIX index Soumyadeep Hore
2024-09-10 10:12 ` Soumyadeep Hore [this message]
2024-09-10 10:12 ` [PATCH v1 6/9] common/iavf: add flex descriptor fields enum Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 7/9] common/iavf: add RefSync support Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 8/9] common/iavf: introduce QGRP capabilities to replace ADQ caps Soumyadeep Hore
2024-09-10 10:12 ` [PATCH v1 9/9] common/iavf: add RSS CONFIG hash function Soumyadeep Hore
2024-09-16 14:29 ` [PATCH v1 0/9] Update IAVF Base Driver Bruce Richardson
2024-09-17 14:24 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240910101224.497044-6-soumyadeep.hore@intel.com \
--to=soumyadeep.hore@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=lukasz.plachno@intel.com \
--cc=shaiq.wani@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).