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 37D6BA0560; Tue, 18 Oct 2022 21:45:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42D6F4114A; Tue, 18 Oct 2022 21:45:41 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by mails.dpdk.org (Postfix) with ESMTP id AC36F427EB for ; Tue, 18 Oct 2022 21:45:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hx3v6+9Fs+c43rlpz/EXtv9PLhLiUs5+PGLdt61iK6HZsMDnaA5xxhdXEhN0hypVjO6E5DZ9fAeBUzV9cXINZ2pgT4giZsb/ILvKEBrwZtKy80WVWXw/HPwuIlnZxBpzKqX62GovI8gdLMVoxw0cN9+gbzppZO0ru2sApnGeXkoXYT73YuzBEBW5GxHEadB/W77DJXZ0nuUf2VLeUgzss9U/Ud1OCSrxvz5rE7nsZDCo6+LkJt6ZL+UGg0RHPrS3Sf29KpGtrlSl4HygtS69Eu6m0bHb5XPDAKwjaZNCwNrEFDtkOyp6VRN1NhD4jIg4SV2h/7o0JUNqeW/mpS5KeA== 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=R6pIdxgqZKO+FPAmzNLkSa9VhmjrGzRheXzlcoG8LRg=; b=OR3PEu6aHzd5L8kiIKsIuXuXMyQ63f9PAxFP/GamKlETPGhwP8c5kugiBqrrvauqSYdkkT3XPWaWFsQpyHNyyrTlms1lInFnr7/LCZxNuiT7YhRDoyDgOe35XhPpqQR8p+8Uktf82XwXdh4fxHu1hX211zHRuG8NIiyz2BYVnyigeoWU7F/fbJWZ5PPWr51rTGC+VU6fYTNuky3EFI+N0NDyqFCPP9cvF0svX0605cNcmF8HbjLtCtLvAOdjq6dTVlI7UXHZxSCQjUJU97sOUgKcBc6yhcZWLLplsAu05STLRPzIyJZ6LgPPHBfHby0cru/PbeO/SDXyxxYPgHE7dQ== 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=R6pIdxgqZKO+FPAmzNLkSa9VhmjrGzRheXzlcoG8LRg=; b=ehrWq7c+pCn0FgHrCd68NPOGnOAIxRWyI8SCxtsKkyEE7AnPg5iJT0dV3x7zUkUu1gA2Is7V2vzkup1W+ZBRf2TxIleoFyDUos+BzGvpJfCQa1A/HiQanej8LlGF3fK9ebFvLxce5kJrQBo8AfNpoVcIgEh3NG1VGINxQ+WyIh8= Received: from BN9P221CA0019.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::34) by PH7PR12MB7116.namprd12.prod.outlook.com (2603:10b6:510:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32; Tue, 18 Oct 2022 19:45:35 +0000 Received: from BN8NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10a:cafe::c2) by BN9P221CA0019.outlook.office365.com (2603:10b6:408:10a::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30 via Frontend Transport; Tue, 18 Oct 2022 19:45:35 +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 BN8NAM11FT016.mail.protection.outlook.com (10.13.176.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Tue, 18 Oct 2022 19:45:35 +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.31; Tue, 18 Oct 2022 14:45:34 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 18/36] net/ionic: use a helper variable in packet Tx function Date: Tue, 18 Oct 2022 12:41:13 -0700 Message-ID: <20221018194131.23006-19-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221011005032.47584-1-andrew.boyer@amd.com> References: <20221011005032.47584-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT016:EE_|PH7PR12MB7116:EE_ X-MS-Office365-Filtering-Correlation-Id: c8037347-9e2c-4ab1-ee62-08dab1415335 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bqge+nn7ln5+5wc6aGbE8vPUQZlfrnIri16sS3LZ5QzOozoO3Bnnc0VZcEeMrDbax71S1UyEEUx3EzaI0k24FWHx6lWfCUs/gqiBx7Bss4x3ezD323NRGN9KaUG7sG5kbsV+pRw1qEpLlWYAj2F0OVEaPjLQrRFlKG0AAXtigV6WB0bi4rFrNouZGWzSG2sreOKJmN11tKJahNwpGg/RkDTG2zXunuQVK97AfsR1Luv0uNRcGuaVpyx2hwparqIiuf8atcg3iftwJ6PZ92Ooupg9iAGBQ+tgh0XKHCRFWN7Pit2mek5/dJnLO34DViSOE26gMPxEqQ5AwKfqyQZ3DTIvFHby+31vU5N5tEGK1LdUV5Jo0r69SiwOFhzyIXdW4IqsxrvwqHG9S0lFcXzUtf99I1+xyxUIPqx0wS9ubtsfNh7ZsrHjs6tVFqQlAj+aqBo0Lfzt0q4vQP+Nhu6olyaLsYHZd9dCsldEsbSXLkwvh5g5koMfJttIYVZ1L+OYN1K2QF4nfsJCjWQcZeJ+5H02PBTc9cJEipefjQHTO6wjzrzW5xSgP8YVYaOPmzDvEZ2xbZeXVyGO3oTHSiJKiptDYlXNgX6vsookKmBVhbNY3Dg7eCOktGTDoX6gBz/C0Pz+I6FoIaWHlmAAcNX86Wr8RWTtgT0Xruftbw1Imsz6qGGKwi7y56RjDzKmaDQMLpPV4he5e7ta3zc/zh9Rh9CarENrmFprOQ7VGKMdoclEpkQw18G1JsZM5MDqfy82hJFawlBLVAdPmVOsOKQzSc0OfDy1BPrl6unUgRgF5zCB/YyIF63vqUgWNoRbBucX 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)(39860400002)(136003)(346002)(376002)(451199015)(40470700004)(46966006)(36840700001)(478600001)(82310400005)(36860700001)(40460700003)(40480700001)(316002)(426003)(47076005)(8936002)(83380400001)(82740400003)(2906002)(6916009)(8676002)(36756003)(86362001)(6666004)(70206006)(70586007)(4326008)(41300700001)(2616005)(1076003)(356005)(186003)(16526019)(26005)(44832011)(5660300002)(81166007)(336012)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 19:45:35.2911 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8037347-9e2c-4ab1-ee62-08dab1415335 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: BN8NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7116 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 This improves readability. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_rxtx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 27678ccb6e..93a29a0326 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -560,6 +560,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, struct ionic_tx_qcq *txq = tx_queue; struct ionic_queue *q = &txq->qcq.q; struct ionic_tx_stats *stats = &txq->stats; + struct rte_mbuf *mbuf; uint32_t next_q_head_idx; uint32_t bytes_tx = 0; uint16_t nb_avail, nb_tx = 0; @@ -582,16 +583,18 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, rte_prefetch0(&q->info[next_q_head_idx]); } - if (tx_pkts[nb_tx]->ol_flags & RTE_MBUF_F_TX_TCP_SEG) - err = ionic_tx_tso(txq, tx_pkts[nb_tx]); + mbuf = tx_pkts[nb_tx]; + + if (mbuf->ol_flags & RTE_MBUF_F_TX_TCP_SEG) + err = ionic_tx_tso(txq, mbuf); else - err = ionic_tx(txq, tx_pkts[nb_tx]); + err = ionic_tx(txq, mbuf); if (err) { stats->drop += nb_pkts - nb_tx; break; } - bytes_tx += tx_pkts[nb_tx]->pkt_len; + bytes_tx += mbuf->pkt_len; nb_tx++; } -- 2.17.1