[PATCH 23/25] common/idpf: redefining idpf vc queue switch

Soumyadeep Hore soumyadeep.hore at intel.com
Tue May 28 09:36:28 CEST 2024


unint32_t type has been introduced in the function idpf_vc_queue_switch().
This helps in providing right queue type while calling the function.

Signed-off-by: Soumyadeep Hore <soumyadeep.hore at intel.com>
---
 drivers/common/idpf/idpf_common_virtchnl.c | 8 ++------
 drivers/common/idpf/idpf_common_virtchnl.h | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/common/idpf/idpf_common_virtchnl.c b/drivers/common/idpf/idpf_common_virtchnl.c
index f00202f43c..de511da788 100644
--- a/drivers/common/idpf/idpf_common_virtchnl.c
+++ b/drivers/common/idpf/idpf_common_virtchnl.c
@@ -769,15 +769,11 @@ idpf_vc_ena_dis_one_queue(struct idpf_vport *vport, uint16_t qid,
 
 int
 idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid,
-		     bool rx, bool on)
+		     bool rx, bool on, uint32_t type)
 {
-	uint32_t type;
 	int err, queue_id;
 
-	/* switch txq/rxq */
-	type = rx ? VIRTCHNL2_QUEUE_TYPE_RX : VIRTCHNL2_QUEUE_TYPE_TX;
-
-	if (type == VIRTCHNL2_QUEUE_TYPE_RX)
+	if (rx)
 		queue_id = vport->chunks_info.rx_start_qid + qid;
 	else
 		queue_id = vport->chunks_info.tx_start_qid + qid;
diff --git a/drivers/common/idpf/idpf_common_virtchnl.h b/drivers/common/idpf/idpf_common_virtchnl.h
index 73446ded86..d6555978d5 100644
--- a/drivers/common/idpf/idpf_common_virtchnl.h
+++ b/drivers/common/idpf/idpf_common_virtchnl.h
@@ -31,7 +31,7 @@ int idpf_vc_cmd_execute(struct idpf_adapter *adapter,
 			struct idpf_cmd_info *args);
 __rte_internal
 int idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid,
-			 bool rx, bool on);
+			 bool rx, bool on, uint32_t type);
 __rte_internal
 int idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable);
 __rte_internal
-- 
2.43.0



More information about the dev mailing list