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 79778A04FD; Fri, 7 Oct 2022 19:46:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42D5342BCA; Fri, 7 Oct 2022 19:44:49 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2062.outbound.protection.outlook.com [40.107.93.62]) by mails.dpdk.org (Postfix) with ESMTP id 8380F42B85 for ; Fri, 7 Oct 2022 19:44:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f89BCVDb2L9aZFzjIvORcsJ/dp0LMn+MsSV8H3o+Lxps9Zm6cr44QcZUwj/7JH0pHeiXmYjGgYuUjkOSSB731qdECPEDIDALLbXb5Wi3+PqqoMFtXH/Z5YMFHO7cFk/njRGbMc90A2hqXXBwHiuJNZ3HOTtjM5HTMkuqxmknHW8HF+B8Ab/VYboIyrgXnXt/BlrowvQhlxjklwTPCibD8Y8hZJNYo+RmDOQu5sQdRBZCYZDIcFOvGPAkNade1OGO/LIPc7Awgpk4td3zed8qtkoz70baQh9ug8Xu9ZaVerbx4y/8AdAgSSHL1gWKixlbh8LYqpGIEQM8nzpE4RLzOQ== 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=lFbOKfWEzeY8mso/8cAHlkU+W7UJoRECDbuqZRi3pTs=; b=IBei3l5lIaf/0wHqGarHLdNlIeuXhsvyOZ89ss19hVk9U4snaNZtuF1S2egi8nExwqocIt8y7k+cTgsKPBWu7C5u4507GTWACcc8eNtQqhYWGBRJD2KktmpPKZgLUTJIb8+z2ZU/4YUNlJyKIzUtaayDZnhI+7WoI9ua9V1kps/YGVfOv2nogS+ffYqx/wL42lESt75qyDhIk+eylgLGgwevIZ8qgQr3grmW2AtTdBPJJYDyc6ZkBaW2ZYacTBjPD9b++eN6goaBpove5uMKuWrEVR/Gp/o46BI5eTuOQDXDqteyfp0K0n5fvxxaY98fP600+7Dx9sqgcK9XQISbxw== 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=lFbOKfWEzeY8mso/8cAHlkU+W7UJoRECDbuqZRi3pTs=; b=cfS2IAlOuLebMwrpR/RLfO7sykA/y8mOxJh32H7MhX+E5RCzn0E0AEnTPswz0YB9RMGkLh6UGtnBefUIM//aV3+85/nZHp6e1pSdFYi4by39YeieTvMrnb2G7uOb43ZRyV+qnwmj+44OCBtwd0I8dTmqAO2B57BMwluRjmyPmPY= Received: from MW4PR04CA0364.namprd04.prod.outlook.com (2603:10b6:303:81::9) by DS0PR12MB6581.namprd12.prod.outlook.com (2603:10b6:8:d3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Fri, 7 Oct 2022 17:44:46 +0000 Received: from CO1NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:303:81:cafe::49) by MW4PR04CA0364.outlook.office365.com (2603:10b6:303:81::9) 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:46 +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 CO1NAM11FT050.mail.protection.outlook.com (10.13.174.79) 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:46 +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:45 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH 17/35] net/ionic: use a helper variable in packet Tx function Date: Fri, 7 Oct 2022 10:43:18 -0700 Message-ID: <20221007174336.54354-18-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: CO1NAM11FT050:EE_|DS0PR12MB6581:EE_ X-MS-Office365-Filtering-Correlation-Id: 89c22df9-67a2-4a32-9c34-08daa88ba024 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CHealSoeprNWS4uxs8ZHovfAOGUAYtgrDVRMUC3eOTFx2Oh0Wn5lr/6ZwFSSzoQxzV+Zf1m+M5tAUpP5U6vY50W7XLUsEk7MW6RwSBv3pRtpfbl5XQZUE/M0ZiGgXydaD1QrWzpUWZ1qgq4RtpygCV1tlMztVSXHh23eNHNL35qXRlQKa0xFKSs37wPGzi+QfQ29r6rocMUM3SS3Lk6nPLmh8DoUz2a31yiBA/v2vTTVYHNs2IhZz+PbjIcIznz0cZ/yey1az+xY3mzCIovkHbUDMdHpXB03nWOFsHhkU1LlXO2wuZY6sohlO2ib8UwrpQIldeX5ZOyvLqfQJc9x7DnKBVgqhFV+wyfVJpQg4a4J1OzaspzF7seDzhHhAigRJO1id62Ipf5ljvcXk+KEGugqT0xO+kmIUNWUKmjnnUi/e98bx9DX0oSdoBkt4naCxLLIQyFgxI6BQB3nZvyb9FXV1GeZ0Uwwl8rBFzs38oKPbG2D0OcBSTpq2wUcMOd3B2W8SM9H3qcRi+LCLqrOfWX/GHOhlkJaXadt8pwHMipyniLGrO8ooFoGSkCUecG6jYG1CjfMrTGCjSoIc7yn6XVC+DibeQDsUKchi/IeWKzw7lXCyuP0ue4CSXcgIPxVVED1IfWoHKeJs2zw19sqe0W6Sgk1PA7X53/z/fNCL8WxwxOPlXfP4eBq6P6AiIikBMS5hyvjtxlu/D/rZ35AV9u/pCcNfjJQfY7KzVLq46xtRg+WEmAhZ41kqKfojnMs8HBTzdwKILbs1oiBoiAoKnnMpLqO30zWM4bwG6TPyhVFpiWk9ECuyz1Pr+QH61Ie 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)(136003)(39860400002)(376002)(346002)(451199015)(40470700004)(46966006)(36840700001)(82310400005)(81166007)(186003)(6916009)(8936002)(2906002)(478600001)(1076003)(40460700003)(86362001)(70206006)(2616005)(6666004)(36756003)(26005)(8676002)(70586007)(83380400001)(47076005)(16526019)(316002)(82740400003)(44832011)(336012)(4326008)(426003)(5660300002)(36860700001)(40480700001)(41300700001)(356005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 17:44:46.5302 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89c22df9-67a2-4a32-9c34-08daa88ba024 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: CO1NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6581 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 0f251eca13..0c1cc842cf 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