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 8F9CEA046B for ; Wed, 24 Jul 2019 15:08:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE1011C202; Wed, 24 Jul 2019 15:08:24 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 5EC8F1C1F2 for ; Wed, 24 Jul 2019 15:08:17 +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 4EA546C0053 for ; Wed, 24 Jul 2019 13:08:16 +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:08:13 -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:08:12 -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 x6OD8Bkb014042 for ; Wed, 24 Jul 2019 14:08:11 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id A2CF41613C5 for ; Wed, 24 Jul 2019 14:08:11 +0100 (BST) From: Andrew Rybchenko To: Date: Wed, 24 Jul 2019 14:08:02 +0100 Message-ID: <1563973684-24127-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.734400-4.000000-10 X-TMASE-MatchedRID: qODGUxeApuy1Ex1hMscILk95wQijrwBLEAImHgFYA95+SLLtNOiBhihX k2o7PB3tuW76JsuTd2VktokPgethAZsgjpxKhfKzAZ0lncqeHqHpVMb1xnESMtHHJnNDqaTc8FS rkmy6/FKWm1ySr9ym7skWVeHghw5wr78SC5iivxwURSScn+QSXt0H8LFZNFG7CKFCmhdu5cXetD 73MyCQLzprdy+eBAJc+rdgsGltAuBxkpEzIyabCjgjZF8XW/lTF39c1RlUZ6qPbjYFZMiEncp81 ipNBAdM9W2MsehLErkA5SS2XRjKFM+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: 1563973696-iNzDhRJsK9qL Subject: [dpdk-dev] [PATCH v2 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. 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