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 A6A4BA0544; Tue, 11 Oct 2022 02:52:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E812542BDA; Tue, 11 Oct 2022 02:51:54 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2071.outbound.protection.outlook.com [40.107.220.71]) by mails.dpdk.org (Postfix) with ESMTP id 1C5B242BC8 for ; Tue, 11 Oct 2022 02:51:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lNqRE63Ro1/8s1VfRP5e5a6L5/fCbkah9a4LcRv2ehOS5tH3+0rThoVH+7zqGOHWRlIoQ+OAK/Sa0BM/KKR3gnEHpKQuDYemwfcwprTDZDdyZVg0HzSjjtYdgggVdG7jPw1QFQOJvAPMUgDlkFvXlyZK+w8Y9kp3Mthl8zM4h4pDsZR9ePGlUhJN0Svfxe419r3+KASviYfAmW71RLPsrzyb36G6UluhBL0XXS2E7/3HFjq5dhkMOf+W/o5xS2WYLsICFYQNlvbqrg48ph1XmPTsaIa6i0Cm1TETWdIYwunNOG5FIaGYfc72L9TSs7Da/QS3lBRqADXsFGYQSeD+jA== 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=bUmiNL4gmIMtaryn0aYTi89nl7HINUsmCiscgmYhfvA3u2ii+vf+8DeCX7QcDSCsgdQzkOB8DelewpAp54YEO8HUKQgg5Vc+cBWGvwiyrrhS10r7+Znykh7PBMIDrRb3fvXsneX59xNk3m9nkc4OfKE+0I795gkBopnNtDjKx23XV2HAHQIIn8O4q1TbBD1c2MKxBCcz+jHA4eTz6IZDTuRzzAzq6WBEjOM9k/vjNZo/ccLK00MwNQrqL3mpGhcyNFggzGw94sKpyVk49R5ZkH85gdACHHP/gg+AeYc1kIxLp11vvxGh8ix8xHlMLzSCjYLjhbluUzjp50eTGnM/Uw== 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=YiHKD6q/JONcOzNRhTDNQ8mP3DPZFC/GUOpGdxnbjtMUhi89MOF/HyNZjFaqoliZFZXsJAHbpmIAW6/FFpmYh/7wm6KfIK9YWwDCBftL/pOyY3Y6IvxCx/CceGIeI8GxjPs1zi2k5H/bORJ/uU9araZQy29R7YrEGGmLJhm7qUo= Received: from BN0PR04CA0162.namprd04.prod.outlook.com (2603:10b6:408:eb::17) by DM6PR12MB4417.namprd12.prod.outlook.com (2603:10b6:5:2a4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Tue, 11 Oct 2022 00:51:51 +0000 Received: from BN8NAM11FT097.eop-nam11.prod.protection.outlook.com (2603:10b6:408:eb:cafe::e0) by BN0PR04CA0162.outlook.office365.com (2603:10b6:408:eb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15 via Frontend Transport; Tue, 11 Oct 2022 00:51:51 +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 BN8NAM11FT097.mail.protection.outlook.com (10.13.176.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Tue, 11 Oct 2022 00:51:50 +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; Mon, 10 Oct 2022 19:51:49 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v1 09/35] net/ionic: simplify code by removing doorbell map helper Date: Mon, 10 Oct 2022 17:50:06 -0700 Message-ID: <20221011005032.47584-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: BN8NAM11FT097:EE_|DM6PR12MB4417:EE_ X-MS-Office365-Filtering-Correlation-Id: 7abe51d3-a318-445e-2a1b-08daab22c89d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a/28GejQuYY0YsHW2Vx+r9adwTyLYnsVB0PDb2vJa06DYngZRM3mdZwO4BU5bANIJ7VdvaSyDSpEaaQoMo/xFM/YR6UkDHH1FYCueR/puEWVnFCRGniERApyDy9vvL5T3wObr3fK0mluvuWRGturJuWfnv7yIq8n6+fGOqKywUYXhUPVUIy7bh+gjA7nv1Y9nsJxBvuzUWq6qDFzRkWm9Iv9ol7TMWUUNfG4HgUaqVpX+NwJYiuuLfjnTnJdL5rXPXkto0ZDePMpaco2Gd0sjwtlNnYgxbX3BhdKo/SyU92aCrdsMtEBQ9GdrXfT9wLR11bHG1tlFKFI1iX8SpMX5Gy/x35CB6mS7JxcIGAzSAfz6W7/rKvWKJHWiw8Wy5bfu+qHPsdCHFzAflhKFN0YkCo+FslFCyQRD9X6mag2m1WwX6/JK4g01Xt8RLOawJAVfjHo1qJ97LI4zb74fOjGntREmWforvRjdBAeEZ8yDNxhu8tjBoTgYkV8j5V/2bna/+HIQ6qXUi3vLUsHF+pQweMtVoU8GqKL831MtIPS3uSVOJhlqlLd7fB8XFmO9XwPE4pB7Nr8aisgmJe2ngzr1hFIlRIQr7qhIt6ShWXfIGNGplya4pzYQUDqSnjxKIo+8ComnUgMdgYiqithRX9pFQnf/A5lSuYoi4lSAFTqByrR5dLpw7QFOuBYCfuWOKO550SXysMzIW0lD1kh5+hSdFHG1sEoEwHypT4GOSl2+fbotqtzpGWSLYmjNU9nDCYTPbjSNwAPCagnvxrB+Vvse5VUctIe6Ki/Wvs95UzF3VYHWCZMkq92SMFoq/Gcekzw 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)(396003)(376002)(39860400002)(346002)(136003)(451199015)(46966006)(40470700004)(36840700001)(40460700003)(86362001)(83380400001)(356005)(82740400003)(81166007)(70586007)(70206006)(41300700001)(26005)(2616005)(8676002)(4326008)(478600001)(8936002)(6666004)(6916009)(316002)(2906002)(1076003)(5660300002)(44832011)(47076005)(36860700001)(16526019)(186003)(336012)(426003)(40480700001)(82310400005)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 00:51:50.8858 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7abe51d3-a318-445e-2a1b-08daab22c89d 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: BN8NAM11FT097.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4417 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