From patchwork Sat Apr 24 06:03:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 92096 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7965CA0547; Sat, 24 Apr 2021 08:00:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF60D41115; Sat, 24 Apr 2021 08:00:00 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A73DC4110F; Sat, 24 Apr 2021 07:59:58 +0200 (CEST) IronPort-SDR: LEXcCcSgTem6ofOx3ErXE+gGuSqS3vBiOXzIiqrsX93zIod2PoIZ62jYImDnf8J4eotWksT5O2 gdoTocsaop6A== X-IronPort-AV: E=McAfee;i="6200,9189,9963"; a="257470323" X-IronPort-AV: E=Sophos;i="5.82,247,1613462400"; d="scan'208";a="257470323" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2021 22:59:58 -0700 IronPort-SDR: yZbae2NKjuj+OmdJHu3FObPa8bSgwhfpfYuSA8InZZQC+xUceFYVJZ3tggoxXd9WT7uIh7MwcS iO3HDC5hUJoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,247,1613462400"; d="scan'208";a="421999413" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by fmsmga008.fm.intel.com with ESMTP; 23 Apr 2021 22:59:55 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: haiyue.wang@intel.com, dev@dpdk.org, Qi Zhang , stable@dpdk.org, Brett Creeley Date: Sat, 24 Apr 2021 14:03:34 +0800 Message-Id: <20210424060337.2824837-2-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210424060337.2824837-1-qi.z.zhang@intel.com> References: <20210424060337.2824837-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/4] common/iavf: fix duplicate defined offload bit 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 Sender: "dev" The value of offload VIRTCHNL_VF_OFFLOAD_CRC bit already existed as VIRTCHNL_VF_CAP_ADV_LINK_SPEED. Fix this now by changing the value of VIRTCHNL_VF_OFFLOAD_CRC to a currently unused value. Also, move the define for VIRTCHNL_VF_CAP_ADV_LINK_SPEED in the correct place to line up with the other bit values and add a comment for its purpose. Hopefully this will prevent from defining duplicate bits moving forward. Fixes: e244eeafcecb ("net/iavf/base: update virtual channel") Cc: stable@dpdk.org Signed-off-by: Brett Creeley Signed-off-by: Qi Zhang --- drivers/common/iavf/virtchnl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index 139569787f..c68128f773 100644 --- a/drivers/common/iavf/virtchnl.h +++ b/drivers/common/iavf/virtchnl.h @@ -372,9 +372,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource); #define VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010 #define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020 #define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES 0x00000040 -#define VIRTCHNL_VF_OFFLOAD_CRC 0x00000080 +/* used to negotiate communicating link speeds in Mbps */ +#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED 0x00000080 /* 0X00000100 is reserved */ #define VIRTCHNL_VF_LARGE_NUM_QPAIRS 0x00000200 +#define VIRTCHNL_VF_OFFLOAD_CRC 0x00000400 #define VIRTCHNL_VF_OFFLOAD_VLAN_V2 0x00008000 #define VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000 #define VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000 @@ -393,8 +395,6 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource); #define VIRTCHNL_VF_CAP_DCF 0X40000000 /* 0X80000000 is reserved */ -/* Define below the capability flags that are not offloads */ -#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED 0x00000080 #define VF_BASE_MODE_OFFLOADS (VIRTCHNL_VF_OFFLOAD_L2 | \ VIRTCHNL_VF_OFFLOAD_VLAN | \ VIRTCHNL_VF_OFFLOAD_RSS_PF)