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 8642FA04FD; Fri, 7 Oct 2022 19:45:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F38E3427FF; Fri, 7 Oct 2022 19:44:39 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2042.outbound.protection.outlook.com [40.107.101.42]) by mails.dpdk.org (Postfix) with ESMTP id A171A42B86 for ; Fri, 7 Oct 2022 19:44:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXnksKdH1RA8iODgM1TZvX3sqs0fe6odT9eanxxc7RCddCcl0lYKOPtjLeB7HZ4ZpYSQFwaxSWBoYLc9yZoZBlcto41oIdKh+2vfmYHMLxn7MDl7NoYjlRX1ZM4xG99fpNMfebUEwLSlfQj6ke+lJNvM0kQ4W7bbltpm2nuCnSOmxjFoFVAdOGNyAt7nqMUQwpu8oEw6zMvRz2SqNVTD9qgYF6m/dvoDrKpE/l82uoi3DPvIowAN8ozgl23UBjnmR6M7OPRMh5WktB49u4J4EMPILn5ST3pUWIAuE5hIUsjrNFJqpu6sZOrgGIFxjmRBl83d+R5tcoAcXz3nQqzLKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xpe7rAgn0p6HBIttnAnosBrj0GdNJBay+S3oYUvH1wY=; b=eCP+TchDZWX0VwqhWvI2qZno+06a1Zbzhyt3sKR38HrgFkM6AOSAssN02XCRpJNffKA8bS+yFImGWBzv3NJvmJAt7eiKr/M1+nwgujF29P9uZvshRNY3mjSC6E9LeEJyNv8bvXuMUZYkjltnppJ0NUkL5lSE6S3qP0DOqOliPv4vAOXtGOW2jzk3kGxZI6WlT7P16mFkI2Cp0v4qnwbJW6raL+lksk+UZpbehN5FkyfCl/vV0N7DlJOTvgznEwkjsgaVYzPTwX9DWLsLN+rpe4qtzN/Q7F4VP2F28MkZJHlguQe/fadYu4iUn60KLOKs4rOdpc4pLXQxJK7cpa/5RQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xpe7rAgn0p6HBIttnAnosBrj0GdNJBay+S3oYUvH1wY=; b=nsmrQW3AcoJerBuKdMbwjjVzXwuOlQ3TVlwHmwB/giLzhDBzr4hRYBKA2cOvweWz6aRi/0XMoO7mm+u/3GChskVH7dTtBljZoU2QvuooojAfvdvgRlax7B9t04ZWtSDKp2g0KB8N67Z97vS9pZ2nUAxG7CjXws/CfE2SHesXoss= Received: from MW4PR03CA0005.namprd03.prod.outlook.com (2603:10b6:303:8f::10) by SA1PR12MB6800.namprd12.prod.outlook.com (2603:10b6:806:25c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.15; Fri, 7 Oct 2022 17:44:34 +0000 Received: from CO1NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::6e) by MW4PR03CA0005.outlook.office365.com (2603:10b6:303:8f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24 via Frontend Transport; Fri, 7 Oct 2022 17:44:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT055.mail.protection.outlook.com (10.13.175.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Fri, 7 Oct 2022 17:44:34 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 7 Oct 2022 12:44:31 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH 09/35] net/ionic: simplify code by removing doorbell map helper Date: Fri, 7 Oct 2022 10:43:10 -0700 Message-ID: <20221007174336.54354-10-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221007174336.54354-1-andrew.boyer@amd.com> References: <20221007174336.54354-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT055:EE_|SA1PR12MB6800:EE_ X-MS-Office365-Filtering-Correlation-Id: 2bbb7794-cf1f-4f54-7734-08daa88b98ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JGJW/4P8zIfIDEXLzgofA/I9cLqLYb95hVX0FiyG+nDbJpYZGDYDLWDBlL5nqfJgTKtnz1lwZm4XyQc41FbJVj3hnovah1gkJ29qQgX11umY8MkHdmcu8B/0jjrMRnxC/uDuDQrZrsUZvkwZauiN3APtFhCsf2KTddfTS2dlHXWjGwFtPBcB47H8TrgHUYP1GjsRWuUnv7xfgULHkc8ZCqFgarMpmgQcD+8Eyzak1KyiDUr7lGktJ8XsA2JaldALViH8Hy3glN6p9dQGKw9b69nCazPujfrkjcQzA2hHaKjZ1E29KlnJsi1b4rCqV3uqedK/lfw32U0SlASA0etPtPYSKx8CPW4lBMUG8Gefi7uEiNLl+FrLuq0gehP27d5GowO7AxkK1cfY2qeFauMDR3nBoxzGDDF/HAVvhwbS7Z0gDQ17FAF8kBKFoo5K/3alLiieV1Shh5tbZYb/Lza/XIkqLPzOIgdAaGllAICztxke8iM87zpMFXSA278bdKiJcrAr8UCoie4d0u9hjM49njPCaK2Sp8txMub52OELpDUMbe5i7Nihkx26oV5H57yphZii3Eyvw0qGol6rQvODEAg9hKgeT4JIMQcrcwr4XWAu89MJsu387okany+XXoEH5cATGbPOq1n/oGlV8rmUqj3+q8Lt5dRoQFLgytJfG0PrByzwkqtRW61evkYd7CYafaPSpFCQ6RGvdJhw44/mBV4A6V2mIN5ApaJ0OIK2jRH5+fo4U5gZYDVlbWUA4ZpwaabH5eZdq2lK0b12x9X+uv2Zs73CdIh9BKWmGIXkAWEB50nuY13zcH5FQMgU0HIq X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(396003)(346002)(376002)(136003)(451199015)(36840700001)(40470700004)(46966006)(426003)(16526019)(47076005)(356005)(336012)(1076003)(83380400001)(186003)(81166007)(86362001)(82310400005)(36860700001)(82740400003)(70206006)(5660300002)(8936002)(41300700001)(4326008)(316002)(44832011)(6916009)(8676002)(40480700001)(6666004)(70586007)(2616005)(26005)(478600001)(40460700003)(2906002)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 17:44:34.0118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2bbb7794-cf1f-4f54-7734-08daa88b98ae X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6800 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 There is only one doorbell page in DPDK configurations, so no helper function is needed. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 2c6f7f7f4e..4cc44a6a2f 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -846,17 +846,6 @@ ionic_notify_qcq_alloc(struct ionic_lif *lif) return 0; } -static void * -ionic_bus_map_dbpage(struct ionic_adapter *adapter, int page_num) -{ - char *vaddr = adapter->bars[IONIC_PCI_BAR_DBELL].vaddr; - - if (adapter->num_bars <= IONIC_PCI_BAR_DBELL) - return NULL; - - return (void *)&vaddr[page_num << PAGE_SHIFT]; -} - static void ionic_lif_queue_identify(struct ionic_lif *lif) { @@ -959,7 +948,7 @@ ionic_lif_alloc(struct ionic_lif *lif) rte_spinlock_init(&lif->adminq_lock); rte_spinlock_init(&lif->adminq_service_lock); - lif->kern_dbpage = ionic_bus_map_dbpage(adapter, 0); + lif->kern_dbpage = adapter->idev.db_pages; if (!lif->kern_dbpage) { IONIC_PRINT(ERR, "Cannot map dbpage, aborting"); return -ENOMEM; -- 2.17.1