From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11F0E41E34; Thu, 9 Mar 2023 03:16:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE45E40ED7; Thu, 9 Mar 2023 03:16:38 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id E9D2040A7E for ; Thu, 9 Mar 2023 03:16:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678328197; x=1709864197; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wFGfa2zs+gVH7K8W8MA3kyMVctKAiu1+vxocOWsb2fk=; b=gRXZemHQ/7sfX9UooW/dgw3IWa6aBQMZQnTUWvu3BBi7BuRBPSIn7Kmf srh8//Dy2rpA1c2xhdnKag+vdgxt3ZdyM15BZolAuPL0n6AW19gZkWGbS QREHHpD5wnQ3SBk20khJm78IoD6/vUd+RYFk6GmqgJrtO5d0F8eUpbEJ1 M14YbBLYAPJaJRI+hiaDn7nwVtKbupo5xHzVfNFQzpPquzdn7IYKd1a/t F0TAw404gafKFwsBdIksu5aw23WlFpKKdSUvgp/faTxSITKWSdgzqhmPA LSVCeIl06vn0BxHa+8QXZEBDU1pkIpZ4T5sZxaA/1YGYDDjoHuZDBOLTR w==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="320161892" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="320161892" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2023 18:16:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="766241851" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="766241851" Received: from dpdk-mingxial-ice.sh.intel.com ([10.67.110.153]) by FMSMGA003.fm.intel.com with ESMTP; 08 Mar 2023 18:16:34 -0800 From: Mingxia Liu To: dev@dpdk.org, beilei.xing@intel.com, yuying.zhang@intel.com Cc: Mingxia Liu Subject: [PATCH] net/cpfl: fix a compiler issue about virtchnl opcode Date: Thu, 9 Mar 2023 10:31:42 +0000 Message-Id: <20230309103142.276726-1-mingxia.liu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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