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 5ADFDA0032; Wed, 17 Aug 2022 08:56:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0474340691; Wed, 17 Aug 2022 08:56:30 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2087.outbound.protection.outlook.com [40.107.94.87]) by mails.dpdk.org (Postfix) with ESMTP id B056340150; Wed, 17 Aug 2022 08:56:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=im5GXFr/jEk1pgaN+wMDFo792yhTJa8FSIz70gnfroX/aGYChARtSi8YlKBPc0wBAyW8qaioowfawkrHitOWbk69zs3WbP1RUl0FCoryg7Mul5NsGHZqhbEz26DTa+2JmWG2kCW/InhmeaLVFWwfVjvbAOYx/upObJ0QedJ6poLTJP7LLbPE8n+K2N8hY6CeUd8/HZmIH7yfIMwA5crL5/2LBSyF9mKog2nANT17TPdSzKQwjubj4/b4WnaHzEYV2pWLW12AnmUUvRypF5BkKYfPAs78Ni0rZrJQa1YqfvHNsHT1yg8oo+kdUEh/NmAFKwLS0wPthqtSyIaaGByEOw== 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=aDWhRDfNPUDZVKrNYQUaEyFhxZP/XTp14XemkdqxhRA=; b=QtC4/qWLBqfS351w/D+o48a6dMJ4DhmxCDP4wxdzxXhLDpNq6wcSk00cjYvwqlj5GuzBCGqGqj9LYChOyB8w/MFVe3eq8tZTy69e6TCac1G0JqrML/9NXwk3bzIUBD3eeHA5Yi83UcUtITqh6wtT/rHJ4uOEgQ8DgmfceM2e8p4/hYs1ssK7k8CGZhPUmRDVCWtmr9bMz4VF/XpEJSAhY7FhbEn+c/Vh6iDsLu0ZsedWRYY2v+9v1uYdKFMP1aWjr9xJNRctEMXnF/TWRcsU0DKfy7Q1I0MtCUhzMpujZekm+os+utxpAhqz11ZBfcAFfVgCRMPMPqBnkdx4RY14gg== 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=aDWhRDfNPUDZVKrNYQUaEyFhxZP/XTp14XemkdqxhRA=; b=m1Qq/uMzWRTfiD1ZGkhNWJ7WkRgBMjPf4fgY1VEK+bhiTIMfLRCdh4LpAVJV3FtrLuK8eBsVXFn5RcYo/sUroAomYA3Mgz+h+5gNXkVJPwKcWXKmnHjOiIF3X7c9MIFgJ2Sqn22nCwTJAOUYfZF3Am6f8D7DJrR1rMXRmadruXGn2r+BK/fKtxEyZSa0un0nRRKL9MMl47l3eylEWxCaHskEqFYQP1Y7d4ndlUs2zpdGntyDyy4O+biS0IwuwyiajAR7cGm9X6pCn0bIBBa7jfk8LCNOa245ThKs3Q+r2K/4WfT+yJRtkwgqFPOUgMWGYFG6go7It8q3xlj/q9dpsA== Received: from DS7PR03CA0216.namprd03.prod.outlook.com (2603:10b6:5:3ba::11) by CY5PR12MB6479.namprd12.prod.outlook.com (2603:10b6:930:34::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Wed, 17 Aug 2022 06:56:27 +0000 Received: from DM6NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ba:cafe::d1) by DS7PR03CA0216.outlook.office365.com (2603:10b6:5:3ba::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11 via Frontend Transport; Wed, 17 Aug 2022 06:56:27 +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 DM6NAM11FT029.mail.protection.outlook.com (10.13.173.23) 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 06:56:26 +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 06:56:26 +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; Tue, 16 Aug 2022 23:56:23 -0700 From: Viacheslav Ovsiienko To: CC: , , , Subject: [PATCH] net/mlx5: fix single not inline packet elts storing Date: Wed, 17 Aug 2022 09:56:08 +0300 Message-ID: <20220817065608.26474-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: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5aa6d885-16fb-411b-475c-08da801d9ad4 X-MS-TrafficTypeDiagnostic: CY5PR12MB6479:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yIrw3s/UOWe6DQq+sgCCi7qdt/seO8Czdn7S6a91R6C12n+rmAGPdNnnYNUmPFnYvnDjj//K7IpcSo4ZeZoMXLze1PYGDTLu19O1G8yO0nSZMI9XzrOcVbU2HajbmC9kro8NTMNnJxmtdfv2xJxQs6mF2pIbdjj7hU+j/lfcVceut1jbp9W+9rJch4oKuV25Sp2KrcfBmiSeqWvDszTxW2tPRS+1xYgNfZYgkg1OHXjLybUIRSySOH/CnwhRzzOc900CmBIjbsrw5T8uvw/w2Yjpr7sZxSB+cttqyx36YYYlGjS7f2l5qRUHnZN3gHG1a6HKCCfVvykv54AZmBoM8vggtSX+xfnB28sNxcBNiEckTGEMLj+YC7RhAWwUIwjvF7krFMW+inzQmgpwG9OxQUx+w/aBOsMHcL4pCeavtqumEKvZQd2T0liYwgvZj3oKcWbsLGaOyFK3af7GNSl6XvMlfPI4XdGbk7dxulNhRInjIpwUoJ2rGpf97lS4noN2DYVY9GQ4lZX5StAJJqtxwvLIJLuVrEOliIgOBUNKkoOqnCwbac2GVGhGuwMjBUmPtxvuiTx6knoBO35ae6shOTPjEBUbj6l735BP6jrUEFtCFdJwk5zvXGyuZHqSXNODXzTQz18LAzqLMePOPvzlmE0tcoOD+78/FvSwUEOReKw7Eem9nmmn/6cANC0v0fDEh/FhwthNBQjBT4ijV6TAu3tw5lHnFAcVrqknA2E3b4XrTMlZy5ca0I0ewJy74LI9RITR52kleANRZDVPPhznVQnDpXncAaQGBM5rexaE6+Epqce7CXitIgZPE/Fj7uUmV0hdt8q2sscHL3rJYZVcgQ== 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)(346002)(396003)(39860400002)(376002)(136003)(36840700001)(40470700004)(46966006)(40460700003)(7696005)(1076003)(2906002)(8936002)(5660300002)(82310400005)(40480700001)(86362001)(55016003)(26005)(356005)(81166007)(41300700001)(186003)(36860700001)(426003)(6666004)(2616005)(16526019)(6286002)(336012)(6916009)(478600001)(83380400001)(316002)(82740400003)(8676002)(4326008)(54906003)(70206006)(47076005)(70586007)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2022 06:56:26.5262 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5aa6d885-16fb-411b-475c-08da801d9ad4 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: DM6NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6479 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 --- 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