From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E369A046B for ; Wed, 24 Jul 2019 14:59:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CF771C1D5; Wed, 24 Jul 2019 14:59:23 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 0EDDE1C1D5 for ; Wed, 24 Jul 2019 14:59:22 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 447E0A40064 for ; Wed, 24 Jul 2019 12:59:20 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 24 Jul 2019 05:59:16 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 24 Jul 2019 05:59:16 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x6OCxFaV001004 for ; Wed, 24 Jul 2019 13:59:15 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 969751613C5 for ; Wed, 24 Jul 2019 13:59:15 +0100 (BST) From: Andrew Rybchenko To: Date: Wed, 24 Jul 2019 13:59:03 +0100 Message-ID: <1563973146-16577-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24792.002 X-TM-AS-Result: No-0.734400-4.000000-10 X-TMASE-MatchedRID: qODGUxeApuy1Ex1hMscILk95wQijrwBLEAImHgFYA95+SLLtNOiBhihX k2o7PB3tuW76JsuTd2VktokPgethAZsgjpxKhfKzuwdUMMznEA9XjjsM2/DfxtHHJnNDqaTc8FS rkmy6/FKWm1ySr9ym7skWVeHghw5wr78SC5iivxwURSScn+QSXt0H8LFZNFG7CKFCmhdu5cU7ch cRk2H7LPpAaGKVSHlW5eBn2DxOcKVRlxdPLM+qCblhjnzTzpazbB74W00m9I2FHK9qMaHR0V7lw Kt+im2mIJY5KYL8vwQA5SS2XRjKFM+aZOIheolUvvUo0hZPhlzM/43UL1MJR/qy+VVvqH2X X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.734400-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24792.002 X-MDID: 1563973160-OmVZjQa3acif Subject: [dpdk-dev] [PATCH 0/3] net/sfc: fix power of 2 alignment macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" P2ROUNDUP() and P2ALIGN() macros are buggy when alignment type is smaller than type of the value to be aligned. IS_P2ALIGNED() has no the problem since it cast its arugments to uintptr_t inside, but fixed anyway to follow the same approach as new EFX_P2ROUNDUP() and EFX_P2ALIGN(). Patches have checkpatches.sh warnings in base driver since space is required after sizeof. Andrew Rybchenko (3): net/sfc: fix power of 2 round up when align has smaller type net/sfc: fix align to power of 2 when align has smaller type net/sfc: unify power of 2 alignment check macro drivers/net/sfc/base/ef10_impl.h | 9 +++--- drivers/net/sfc/base/ef10_nvram.c | 3 +- drivers/net/sfc/base/ef10_rx.c | 11 ++++--- drivers/net/sfc/base/efx.h | 21 ++++++++++--- drivers/net/sfc/base/efx_mcdi.h | 9 ++++-- drivers/net/sfc/base/efx_tx.c | 4 +-- drivers/net/sfc/efsys.h | 51 +++++++++++++++---------------- drivers/net/sfc/sfc_ethdev.c | 2 +- drivers/net/sfc/sfc_rx.c | 2 +- 9 files changed, 64 insertions(+), 48 deletions(-) -- 2.17.1