Skip to contentSkip to conversation

net/idpf: fix a compiler issue about virtchnl opcode

PATCH Applied Mingxia Liu 2 participants 2 messages Mar 9, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/idpf: fix a compiler issue about virtchnl opcode

Comparing an enum virtchnl_ops variable with VIRTCHNL2_OP_EVENT will cause a compiler issue, as VIRTCHNL2_OP_EVENT is not included in enum virtchnl_ops. And the PMD uses virtual msg opcodes prefixed with virtchnl2 or VIRTCHNL2.

Fixes 78049b3dc7e6 ("net/idpf: add alarm to handle virtual channel message")
---
 drivers/net/idpf/idpf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/idpf/idpf_ethdev.c +1 -1
index db58157ba3..46aec6ae37 100644
@@ -1058,8 +1058,8 @@ idpf_handle_virtchnl_msg(struct idpf_adapter_ext *adapter_ex)
 	struct idpf_ctlq_msg ctlq_msg;
 	enum idpf_mbx_opc mbx_op;
 	struct idpf_vport *vport;
-	enum virtchnl_ops vc_op;
 	uint16_t pending = 1;
+	uint32_t vc_op;
 	int ret;
 
 	while (pending) {
Signature · 1 line
2.34.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 7 lines · Mingxia Liu

Comparing an enum virtchnl_ops variable with VIRTCHNL2_OP_EVENT will cause a compiler issue, as VIRTCHNL2_OP_EVENT is not included in enum virtchnl_ops. And the PMD uses virtual msg opcodes prefixed with virtchnl2 or VIRTCHNL2.

Fixes 78049b3dc7e6 ("net/idpf: add alarm to handle virtual channel message")
Fixes d633a4859c98 ("net/idpf: add alarm to handle virtual channel

message")

Quoted 1 line

Applied to dpdk-next-net/main, thanks.