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 D7154A046B for ; Wed, 24 Jul 2019 15:16:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B1B691C1F4; Wed, 24 Jul 2019 15:16:45 +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 696AD1C1F4 for ; Wed, 24 Jul 2019 15:16:44 +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-us3.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 439D6B4005E for ; Wed, 24 Jul 2019 13:16:43 +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 06:16:40 -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 06:16:39 -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 x6ODGcsH024214 for ; Wed, 24 Jul 2019 14:16:38 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 8FE201613C5 for ; Wed, 24 Jul 2019 14:16:38 +0100 (BST) From: Andrew Rybchenko To: Date: Wed, 24 Jul 2019 14:16:31 +0100 Message-ID: <1563974194-5930-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1563973146-16577-1-git-send-email-arybchenko@solarflare.com> References: <1563973146-16577-1-git-send-email-arybchenko@solarflare.com> 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.423500-4.000000-10 X-TMASE-MatchedRID: MJpP/GP6dri1Ex1hMscILk95wQijrwBLEAImHgFYA95+SLLtNOiBhihX k2o7PB3tuW76JsuTd2VktokPgethAZsgjpxKhfKzboe6sMfg+k9XjjsM2/Dfxh3RY4pGTCyHzkQ uWEhX2PuciqdFcKscQERTugX7HOyrkwqG9GH9l96eAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8ifEz J5hPndGTnqOJ8koTBfnJeifDbPpp5+0RU+WlDw0a8QYtG0MkNshcl1TKzPof0bAdzYgTWDkNTN9 s1576kqY35LRIGul7OJHI73B+AN1RySoBCeolQDq8uPJC94SFgR06l6KId4N3r0M0SKNnXWw8g2 HBNcF5k= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.423500-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24792.002 X-MDID: 1563974203-2jMsz_SPQJL1 Subject: [dpdk-dev] [PATCH v3 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. v3: - add lost [2/3] v2: - fix [1/3] in accordance with [2/3] changes to be correct from the very beginning 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