[PATCH] net/cpfl: fix a compiler issue about virtchnl opcode
Mingxia Liu
mingxia.liu at intel.com
Thu Mar 9 11:31:42 CET 2023
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: 20618563b81b ("net/cpfl: support device initialization")
Signed-off-by: Mingxia Liu <mingxia.liu at intel.com>
---
drivers/net/cpfl/cpfl_ethdev.c | 2 +-
drivers/net/idpf/idpf_ethdev.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
index 0940bf1276..54261d5743 100644
--- a/drivers/net/cpfl/cpfl_ethdev.c
+++ b/drivers/net/cpfl/cpfl_ethdev.c
@@ -1095,8 +1095,8 @@ cpfl_handle_virtchnl_msg(struct cpfl_adapter_ext *adapter)
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) {
diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index db58157ba3..59883af8a8 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -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;
+ enum virtchnl_ops vc_op;
int ret;
while (pending) {
--
2.34.1
More information about the dev
mailing list