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 91394A0032; Wed, 17 Aug 2022 09:04:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4946640694; Wed, 17 Aug 2022 09:04:44 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id 31EA040691; Wed, 17 Aug 2022 09:04:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SYDSjY1Id474G07FGuw5VPrvuQjV/1mHrbYm9lO1R9QgEL2auXfOR+SZ+BpTBgCYvw94pippnapDosZLbJwEgNeDk+kY6VYN9j3hpzNFZjBckEGzOGD2mwXvHbTVdqTdsDmVmDGAn7m95GnbjiCdZlt8BFbCJj9g/DuSbDDIYJSQst5GyouSlyne/GTS1k32GUAPEJ0oomURKKkVDuKBZGNBSraRsqWq+eSxsr+LlNhWbqlvp6xhMtuYjo7Iz9HJwCg/PJz0KFxk3yFvzg8t3yg8MA4dS7Mm1MlQw741Lsg4rIBtqM4hamedIDH4YgJdDgIalBn/vmnXPPsMBRXdNQ== 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=Hp5Z48T77VKJ1qjqPoZRbwIDmWy37bs0ls/YcOqV9Cc=; b=fUoXM8NOMn9JiuDcC65FacSEK0DFwMlIMvDTvJ/mk7XE/PHlsSIftbZpQWFGXRmaSczTL4k6EkZzt4YdsaliC9nbUXDRQSDFuT0+m0Yeeax12YReQvxYKHkPa0z8przzBPxGgER9L2+CXSHr6azkAUGmhY3tTJ/9x/F2TxW8718TKoImJlP/LZtQZyZrogW6ACLvV5Z6Entgb5RcnRSnrdzbiwFuNdtyqEw7LVSylQPiRDzOt9/WpkhhoadqGEhFOJuUvt//k/lT+9gD5Jp5IUIfOyfBU1aF73W4HMMk2e8HWGkQ7t29aDuaUHfAGVpvCyAAYcqzxTP0NNm/YVtB7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org 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=Hp5Z48T77VKJ1qjqPoZRbwIDmWy37bs0ls/YcOqV9Cc=; b=DS5ngPkGR/Xx3KpYcLyyGbrn2sOZgqZZK2esb/OaWgXiyci6eBJC0jsE4tyRuZTiFsmNv1EywhcREkHt5qpzJ3JoIoZpLIu0idVegrWMCOOmsz7l2BGnhgawRBsvLHHNVwJ+7ocz6zV2C0Md3H6CZRtMKrT1ia4IaWFH9wsFAv7yw8uHH3ni67Ezml+UcDkVxPU7C/4zWBxFaIo0sx21bT4oxzn4MxcFvA4VxEF8OCLgkmAYRuuCAh495Xv6E6vYA1Yjr3HRra4k7HUMFCryxl96VxMt+B5siju1mc+G/9Ha/Y8cGS8aaMwz3E8srHZJCsJTGcKUXMt8pzX/93umBA== Received: from DM6PR07CA0094.namprd07.prod.outlook.com (2603:10b6:5:337::27) by BL0PR12MB5555.namprd12.prod.outlook.com (2603:10b6:208:1c2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Wed, 17 Aug 2022 07:04:41 +0000 Received: from DM6NAM11FT047.eop-nam11.prod.protection.outlook.com (2603:10b6:5:337:cafe::41) by DM6PR07CA0094.outlook.office365.com (2603:10b6:5:337::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.14 via Frontend Transport; Wed, 17 Aug 2022 07:04:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT047.mail.protection.outlook.com (10.13.172.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5546.15 via Frontend Transport; Wed, 17 Aug 2022 07:04:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Wed, 17 Aug 2022 07:04:41 +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.29; Wed, 17 Aug 2022 00:04:39 -0700 From: Viacheslav Ovsiienko To: CC: , , Subject: [PATCH v2] net/mlx5: fix single not inline packet elts storing Date: Wed, 17 Aug 2022 10:04:25 +0300 Message-ID: <20220817070425.30121-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20220811055215.30214-1-viacheslavo@nvidia.com> References: <20220811055215.30214-1-viacheslavo@nvidia.com> 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: 819e2391-aa63-47f6-6276-08da801ec1f4 X-MS-TrafficTypeDiagnostic: BL0PR12MB5555:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c0xjqwsPj9U95a7tpJGtigqUKXXEIJOeo+FSyXjUFr/EArq7Uy/ZeTqVS77oThIvEF1f4ovnb7kpPwU3zBsyYuOxuHpRtOnRVzZu9hnmUx8YWOZky68SfNlMm8NUvKQuQJpV77yfgFvIoqOrQ8MOaaGcsN5Y/A41rhJS5hRNzZsDrPAYMx083d4I7NX3Ba9pAhYSygtc+NWkupU46evDrGcvk9PNPdZnL1+dsYdWTd1tSj+WpY5VjYiPJ3qhN972w/YCLDRjW4npj+M47ASn8GGbTM4HtPoBpqw8w2UVuHnpz8X2TkzKDAEmQgqwfIIh6O07oJxYl/8mMDnC+DElPFBBkIPgE7hQ4T0qhYOg9INCA02rxFL27dqOFSgo8lVdZTMUvzKNd/z38i+EdRqdeLZuPMy1voAU51Pi94dvkFEQXVVPJMcOp7r9YpNtac4gJtOeocPO65g0zrMj0F1s/zQNXEOvB+ShzVmYy+VvBk3mofP9AN65D30xzcPwLNReCVlb6tQMM8RGfG5osSdZBYqBEwab2KWzhL8c59yuIaSQz3Aepv0qk5Qww3TyOSyZ9LLBINI359qKEd/HISpkcDhvBiQLZOGwTzHgYbD87tPn3UE/R5Y17e99alo6Ws8Zlglbdese8BdcH3cpYRPWl26vPM5XQrioFSzkNC8eGlHsqOTiBCVZdksCq0LABwV3R0T/m7ddGSxSHNyxwUpJ9tnsyTLDcP+TSD4DfE94J2rCBXe5SNJuXwZ7R114EEYc3bQJNJmgR73Xh5LHg0oYRjXgu3UxdSet5OCcj7O48i4D1XlF9+NhRA4RvAs2x/qLznOHYFun0nHbx3SpjY4hSA== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(346002)(396003)(376002)(136003)(46966006)(36840700001)(40470700004)(40480700001)(47076005)(26005)(1076003)(2616005)(6286002)(82310400005)(426003)(16526019)(82740400003)(83380400001)(336012)(55016003)(356005)(81166007)(186003)(2906002)(450100002)(6916009)(5660300002)(70586007)(4326008)(70206006)(36860700001)(8676002)(7696005)(41300700001)(8936002)(6666004)(54906003)(478600001)(316002)(86362001)(36756003)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2022 07:04:41.6489 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 819e2391-aa63-47f6-6276-08da801ec1f4 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.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT047.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB5555 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. Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko --- v2: "Fixes tag" added 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 20776919c2..c65031ed3b 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -3314,7 +3314,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