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 1DDC5A00C3; Mon, 15 Aug 2022 01:09:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6896542B88; Mon, 15 Aug 2022 01:04:51 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8CAED42CB0 for ; Mon, 15 Aug 2022 01:04:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660518288; x=1692054288; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z47RY6Gfi/LTvot5CPS/rkg12Sp0wrgohQDo1hR5KCA=; b=eyxbvJgKFXqYZ94un3iDeDX7FG9sU3cZCxDyOci7ozEqUproTdvGNYG9 XcS9A9ADzrf0HiehcrGgtftABmsfShcJKhmsWoj57SzIS4C0hg+M93Y2g XE1qIOYvUcqZkoicqCgTUAYC31+1wwPkbIa8HbBd+1m7ZfuMJhUTvP2Ge cKuWiQt5P3J4H+BWV3PwZsDBLArb9xeAKIWL8F0opZVeGOHAPEBa0eeni 6YSuaHV3RoYwbc64kUwFPU0ZXNAWvTOy0HRYaFzXqkjhM0mI6ncu7JXWF eVotsUUCC1WWk/r4luOsLCeNDaFBbPgbGmx1+BXKMP0mBAn+GjS868oLI A==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="293128815" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="293128815" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:04:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="934296969" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2022 16:04:47 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Karol Kolacinski Subject: [PATCH 64/70] net/ice/base: convert 1588 structs to use bitfields Date: Mon, 15 Aug 2022 03:13:00 -0400 Message-Id: <20220815071306.2910599-65-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815071306.2910599-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-1-qi.z.zhang@intel.com> 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 Use bitfields in 1588 structs so they don't waste too much space. Signed-off-by: Karol Kolacinski Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_type.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 6d0adf0dd1..043dae7781 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -662,12 +662,12 @@ struct ice_ts_func_info { /* Function specific info */ enum ice_time_ref_freq time_ref; u8 clk_freq; - u8 clk_src; - u8 tmr_index_assoc; - u8 ena; - u8 tmr_index_owned; - u8 src_tmr_owned; - u8 tmr_ena; + u8 clk_src : 1; + u8 tmr_index_assoc : 1; + u8 ena : 1; + u8 tmr_index_owned : 1; + u8 src_tmr_owned : 1; + u8 tmr_ena : 1; }; /* Device specific definitions */ @@ -685,14 +685,14 @@ struct ice_ts_dev_info { /* Device specific info */ u32 ena_ports; u32 tmr_own_map; - u32 tmr0_owner; - u32 tmr1_owner; - u8 tmr0_owned; - u8 tmr1_owned; - u8 ena; - u8 tmr0_ena; - u8 tmr1_ena; - u8 ts_ll_read; + u8 tmr0_owner; + u8 tmr1_owner; + u8 tmr0_owned : 1; + u8 tmr1_owned : 1; + u8 ena : 1; + u8 tmr0_ena : 1; + u8 tmr1_ena : 1; + u8 ts_ll_read : 1; }; /* Function specific capabilities */ -- 2.31.1