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 259F243D55; Wed, 27 Mar 2024 23:51:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08C1A402C0; Wed, 27 Mar 2024 23:51:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 95323402B2 for ; Wed, 27 Mar 2024 23:51:42 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DFAED20E61C0; Wed, 27 Mar 2024 15:51:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DFAED20E61C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1711579901; bh=EEUKn53c+TDoTzir8wAlkxdEVHdsUkwc3FsNOoVl9HA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bzdGuFNhEChXnzQItoQe+3MYKqyvM9AbS2GWlHPuwmhD/gC1fKzu0dxmWrxSJBm/G nFvdzIpNz9P+ix21BDrINk0GzjqvsyNI/TAg0kgraOHs8EZoOTvjkPCsJvOtvc63y9 yLFRRRL43cmbqbwCuluopITx1QKxeiss9l4DFieE= Date: Wed, 27 Mar 2024 15:51:41 -0700 From: Tyler Retzlaff To: Bruce Richardson Cc: dev@dpdk.org, Akhil Goyal , Aman Singh , Anatoly Burakov , Byron Marohn , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Jerin Jacob , Jingjing Wu , Kirill Rybalchenko , Konstantin Ananyev , Matan Azrad , Ori Kam , Radu Nicolau , Ruifeng Wang , Sameh Gobriel , Sivaprasad Tummala , Suanming Mou , Sunil Kumar Kori , Vamsi Attunuru , Viacheslav Ovsiienko , Vladimir Medvedkin , Yipeng Wang , Yuying Zhang Subject: Re: [PATCH 07/15] dma/ioat: pack structures when building with MSVC Message-ID: <20240327225141.GA12237@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1710968771-16435-1-git-send-email-roretzla@linux.microsoft.com> <1710968771-16435-8-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Thu, Mar 21, 2024 at 04:13:32PM +0000, Bruce Richardson wrote: > On Wed, Mar 20, 2024 at 02:06:03PM -0700, Tyler Retzlaff wrote: > > Add __rte_msvc_pushpack(1) to all __rte_packed structs to cause packing > > when building with MSVC. > > > > Signed-off-by: Tyler Retzlaff > > --- > > drivers/dma/ioat/ioat_hw_defs.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/dma/ioat/ioat_hw_defs.h b/drivers/dma/ioat/ioat_hw_defs.h > > index dc3493a..6e32807 100644 > > --- a/drivers/dma/ioat/ioat_hw_defs.h > > +++ b/drivers/dma/ioat/ioat_hw_defs.h > > @@ -52,6 +52,7 @@ > > #define IOAT_DMACAP_PQ (1 << 9) > > #define IOAT_DMACAP_DMA_DIF (1 << 10) > > > > +__rte_msvc_pack > > struct ioat_registers { > > uint8_t chancnt; > > uint8_t xfercap; > > This struct has all gaps explicitly filled, so packed should not be > necessary. Struct has same size with and without the attribute. just eyeballing it i think uint32_t dmacapability; /* 0x10 */ with packing will not be aligned on a 4-byte boundary. maybe i miscounted though. > > /Bruce