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 8C7B7A0548; Thu, 11 Aug 2022 07:52:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7978040DDE; Thu, 11 Aug 2022 07:52:37 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) by mails.dpdk.org (Postfix) with ESMTP id 5FDA940DDA for ; Thu, 11 Aug 2022 07:52:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JZtxcJwsRebAVuqZnZIybWqk6o5dwfg9t7MCrBIF/cw5mQivB3Tvw6Lkd2S3daolVWqgUWoB1lMR0czI2ONk6WoXZjsBNBTSkpA8jVtk/DNjntf7eE5TtUktQHsk8leNaxrF20haf40CRtRt7quARg7dtSdBmi+DTz6tepjHdpyg1/gvRMRPhJmjruC2MNLJUNi9tbyds2ZwI1d+uKk9rXWA122Bw0UBuUBORm/4ohuuePTFI79JKviUmu66yGqQ8VOMUq2K4IXxAhCLD9lOD7T9XdNneOoM7tgrsWY4BYmzUWJZ8vbFwv7Wmqgse6kS73vurqAlq7BDL/WiVdBipA== 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=AZehh0oRx2he+oQMEwHN1oRK0ixumkMt4gIwZxNj/X8=; b=foH3tu12bgk2PGRUW4RfYqXxWfPHHPVLdrIZ5i9tITkuMQawT9uAQ0NV9cN+p36CZFVNJ09F0398Ll4xY941AGqzAcVZz3pjLaMDbKHcHjJcT7A6M5fVrvsNdAkqo/NsZrZY6DZ5rIzdwEnaJx42CF1Nwk5WM1ybNM4NRrlMO650jkN3c8ICiX8yBJGu6r0kHJwphJ5CAa1/Xj0MIUheoK29f/U1M5qvBmJgr5Tw+bFkcbMA1V0SSwpAHj9dgvzoaBaZA0gEyIq8Mgqpd+1zi/sr1R4tQ4jOhetdgFv2HrRQ4a1H5PF57ntp9nWAOlXhRzyuByPUDuHh7Ar5YGx3HQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AZehh0oRx2he+oQMEwHN1oRK0ixumkMt4gIwZxNj/X8=; b=Mm26enhnpI6giNTFIFJ7i+MLUwooMNWcRfz1UP1I+N/nVVnHZqQmNeI3va0Wfa2CBYoh9eoXCEathezOUpedGTGat2fcbSYMOg0SaS7Nyd4VWhXTdrlT+lJMmJpPaGndz2xu0suJxayJZDHfB0csoSQpdarqZ6+o+llpReDZL4l7QELQNs41H6nQzqnIlemVSxGlPAhaHEsTkkY7F7XUDpgaB0mw4PETjTSOkPhl+leEP/SUy9pBZw+BOtLEZSTF3drF5MnQgOv7/f7BTXAB8N5c/OWeHEeqrNHq34eYeEiRHMuyibt6+/YHO/jWs3LTNcub/iXIMIIIPMFZNOAn7A== Received: from MW4PR04CA0242.namprd04.prod.outlook.com (2603:10b6:303:88::7) by SJ1PR12MB6316.namprd12.prod.outlook.com (2603:10b6:a03:455::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.21; Thu, 11 Aug 2022 05:52:33 +0000 Received: from CO1NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:303:88:cafe::3) by MW4PR04CA0242.outlook.office365.com (2603:10b6:303:88::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.20 via Frontend Transport; Thu, 11 Aug 2022 05:52:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT003.mail.protection.outlook.com (10.13.175.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5525.11 via Frontend Transport; Thu, 11 Aug 2022 05:52:33 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 11 Aug 2022 05:52:31 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 10 Aug 2022 22:52:29 -0700 From: Viacheslav Ovsiienko To: CC: , , Subject: [PATCH] net/mlx5: fix single not inline packet elts storing Date: Thu, 11 Aug 2022 08:52:15 +0300 Message-ID: <20220811055215.30214-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89334671-ef73-4bba-b1a8-08da7b5dafbb X-MS-TrafficTypeDiagnostic: SJ1PR12MB6316:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r+JGRfitKCId6vTJqGGEgzbpTvsJB/W80pc+2l8QeCXObIbgMi0MLtzz4goXwlwIaVHJt66vkwYYHPrB5BxWhfjXhY44E81eYWcWWofiC1dCQpHFN64K2IrSnJyMePWGPITihzzNlatRNrpI6XlIMpX0XviXGsnMnVGBaERHFz3vDaQ40LCNl9HAr9sn6lQ/rE8c/AGrSn/F7VDq8FGrHnS+ZHOS2df/iuxtxeBU/lC470pJmaoqetXPd+l+F+jaNtPDrqKF7LMYq7EXt5v3phFCcSbKCLWdSU5/xBRlrBhH+Nj5d8q9AMXZjENx15tl9ZM8ASfKpqJsUvGRR8AgyyTfzWbNLobATLJbqlDkCy/yVoxXt6baKLp/b7joM72vvi1TEhWKThdcxOCZuZrjf+4EuoeiE9d4Fyww3mauWar3J645F+hjKu/vUYtC3E4D9u3gBrxoY8q5VWjywcfNmcxroXvgttvHV4ItMLm79uX2k6LgttPcScr59qAayEzHJGYLyFOKPAr/guu1Z5sBHwtJQreL8Ngnqszyrr0D5wClJlYuVmokmqfRgQOgPEax7adHw2Iid5W3Y9W/FKpvWdp8MNQvl3vnI3m46I9JJUkQrMCKK4of5ulU8RHY7J0af/bfDq0AqAWmwTWVoUWbp5K7o+ZwiTBPUZ3bNeZbM1eGct6ZMVi0NMfn7mmYNgE3P3tTR1UJ6epMqVkYRMAzrOeYgQj9Q2UJSr1lOhS0FVk9TSg1G0Yl4uYN8ARcPyI5M+IAvC1TImFogLKlFSFtMNTk4GwXWogCbxGgsVjCNa5n1isTrfU9/wIFf3U6BJu+WnXFI8KyiNpbOppaN0kVpg== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(39860400002)(136003)(396003)(376002)(46966006)(40470700004)(36840700001)(426003)(107886003)(8676002)(47076005)(36756003)(55016003)(40480700001)(82310400005)(54906003)(26005)(6916009)(6286002)(81166007)(83380400001)(82740400003)(356005)(16526019)(316002)(336012)(186003)(2616005)(7696005)(70206006)(6666004)(70586007)(86362001)(2906002)(41300700001)(8936002)(36860700001)(5660300002)(1076003)(4326008)(40460700003)(478600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2022 05:52:33.5897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89334671-ef73-4bba-b1a8-08da7b5dafbb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6316 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 The mlx5 PMD can inline packet data into transmitting descriptor (WQE) and free mbuf immediately as data no longer needed, for non-inline packets the mbuf pointer should be stored in elts array for coming freeing on send completion. There was an optimization on storing pointers in batch and there was missed storing mbuf for single packet if non-inline was explicitly requested by flag. Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_tx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index f081921ffc..8e113e3778 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -3322,7 +3322,9 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq, * if no inlining is configured, this is done * by calling routine in a batch copy. */ - MLX5_ASSERT(!MLX5_TXOFF_CONFIG(INLINE)); + if (MLX5_TXOFF_CONFIG(INLINE)) + txq->elts[txq->elts_head++ & txq->elts_m] = + loc->mbuf; --loc->elts_free; #ifdef MLX5_PMD_SOFT_COUNTERS /* Update sent data bytes counter. */ -- 2.18.1