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 8856DA0562; Tue, 4 May 2021 14:04:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 101DB40147; Tue, 4 May 2021 14:04:55 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 29CA540141 for ; Tue, 4 May 2021 14:04:52 +0200 (CEST) IronPort-SDR: NZ4yUgIShmoOtwSu7M0z4K+yBqIHqByi9pC9vMK3HkbZHYtfyr2W3Kp2+l7grMQ6xfRKEBqFUe 5e68WbQ5dPNg== X-IronPort-AV: E=McAfee;i="6200,9189,9973"; a="185097507" X-IronPort-AV: E=Sophos;i="5.82,272,1613462400"; d="scan'208";a="185097507" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2021 05:04:51 -0700 IronPort-SDR: 25REGoUQyui+SlPzkxTMIigRg+xkcDYvf1IBv1ccwXk6JD8BStSRDrg2g77EFyfgS9XdBrzvU2 KYysLGNz3Fdg== X-IronPort-AV: E=Sophos;i="5.82,272,1613462400"; d="scan'208";a="389942859" Received: from plaurenx-mobl.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.252.15.85]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 04 May 2021 05:04:50 -0700 Date: Tue, 4 May 2021 13:04:47 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, kevin.laatz@intel.com, sunil.pai.g@intel.com, jiayu.hu@intel.com Message-ID: References: <20210318182042.43658-1-bruce.richardson@intel.com> <20210430150637.362610-1-bruce.richardson@intel.com> <20210430150637.362610-5-bruce.richardson@intel.com> <10801772.08G8JL9ftu@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10801772.08G8JL9ftu@thomas> Subject: Re: [dpdk-dev] [PATCH v4 04/12] raw/ioat: add explicit padding to descriptor struct 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" On Mon, May 03, 2021 at 11:20:40PM +0200, Thomas Monjalon wrote: > 30/04/2021 17:06, Bruce Richardson: > > Add an explicit padding field to the end of the descriptor structure so > > that when the batch descriptor is defined on the stack for perform-ops, the > > unused space is all zeroed appropriately. > > > > Signed-off-by: Bruce Richardson > > --- > > --- a/drivers/raw/ioat/rte_ioat_rawdev_fns.h > > +++ b/drivers/raw/ioat/rte_ioat_rawdev_fns.h > > - /* 28 bytes of padding here */ > > + uint16_t intr_handle; /* completion interrupt handle */ > > This is more than padding. > Does it deserve its own commit? > This field is unused by the driver, since we don't use any interrupts, so I consider it as padding in that regard. However, I agree that in reality it's not padding, but I think rather than having it's own commit, I can just reword the patch commit log to cover it. Something like: raw/ioat: expand descriptor struct to full 64 bytes Although it's unused by the driver, add the interrupt handle field in the descriptor to the descriptor structure for completeness, and explicitly add the reserved padding field on the end of the structure too. This means that when a descriptor is defined on the stack, or initialized by the compiler, the unused/reserved space will be zeroed appropriately. > > + > > + /* remaining 26 bytes are reserved */ > > + uint16_t __reserved[13]; > > } __rte_aligned(64); > > >