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 7F4E8A00C2 for ; Tue, 8 Nov 2022 14:45:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 739EC42D34; Tue, 8 Nov 2022 14:45:35 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id EB86C4003C; Tue, 8 Nov 2022 14:45:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gsuAs/1G73YWvMuev9InjFRMSKKVqzP0Ax/mAh1yvFk4iq8HWfQOL/pUle7hBW6DFw6nVURqV4oGSg5ZXvUHXyDemiSHsJhbF0tbBGGFSlurZEx07aNsOX2PBIrrFTzea1Ekwtc3AHeVcIT1RN1at7/I0fMJQmkILjzE9YJEgiViW/sc2BcPngcnyfGkwxR9V65vpEbxX6k2R7IcM308vUL6arOeEjkxoPG4GHr+exndRu3wgLt7RghGh69bH/vlOURsrAhvA0cHqrJlZCHi6YV5On8ny2akbi0JH3wAmb1OR58d/eO3kPza/gfAgjJOAzM0poU+riX332wrnTnJMA== 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=9wrNnSRJsV9kBNhkMsRNs7UDKIuRpHoQT93kdkw9uc8=; b=W++ZssbOm26nU90D7YRYOJDbvO7Ozd5sVbOW9kHmoC2QX9krcLRjUyNU36HEsoYi/2NlLF1NB6QZDteFLIOFUAsFEH0zP7ArbhsKLoMzyLGBTjRui0Au/CSZ4h1/Yjk/Hud3s9VmvF+4MpTpbZYxza27oPU6nF+/Og+vYurbfeZy1BW1OZQ1yfIP8Pm/GGc8IOlWZXCtn28wzuqxNOGjhrSkmY0RjDb9zIzXmeOc8bLNiiwliPH4iu05FDL6jQkS7PTcGh7ZaPOVnZj3BpWlSp5iKx6A1hr6Yy9XFH2REBJ4sp1t/KQPS1TnS7+1qev6z7lUVPEFT1OuUy5kJLQFIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=9wrNnSRJsV9kBNhkMsRNs7UDKIuRpHoQT93kdkw9uc8=; b=JqggU8m+PAhpnWzMqvw9WLUdEFwh0/NiUkG62JEY+bZU59a+kdqN6lLKui/aOHAPgKD7ezQOdtmutvw79n88Q7NUz6W/NJu9RotKR/9dk/fzOhC9E4gTS83n/4m2BsbLbFGTd86sTHPNi7cdXnp09y1VvsyHmyVLmtDDNzEy52aAQQYLGjFUxE4vkvSwmkQ2+3BMc5/jbhphZ141dTDOPaWS2XiroIvd/KReKw3oD8TU1xC45M6QZqhf3eUpWLfMCvX0nStfAEKrE1Xk0Sm+rl3oQ3/ZKllH/8fydoNsf6EwMVTekNdGRQhs43Z5iPLZdjb20Mm0vK45vv/Z/sNTCw== Received: from MW4PR03CA0201.namprd03.prod.outlook.com (2603:10b6:303:b8::26) by DS7PR12MB5743.namprd12.prod.outlook.com (2603:10b6:8:72::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.25; Tue, 8 Nov 2022 13:45:30 +0000 Received: from CO1NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b8:cafe::2c) by MW4PR03CA0201.outlook.office365.com (2603:10b6:303:b8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.26 via Frontend Transport; Tue, 8 Nov 2022 13:45:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT064.mail.protection.outlook.com (10.13.175.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20 via Frontend Transport; Tue, 8 Nov 2022 13:45:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 8 Nov 2022 05:45:16 -0800 Received: from pegasus01.mtr.labs.mlnx (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, 8 Nov 2022 05:45:14 -0800 From: Alexander Kozyrev To: CC: , , , , Subject: [PATCH] net/mlx5: fix the first segment inline length Date: Tue, 8 Nov 2022 15:45:00 +0200 Message-ID: <20221108134500.2751828-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT064:EE_|DS7PR12MB5743:EE_ X-MS-Office365-Filtering-Correlation-Id: 9bb8c0b8-c80d-4a8c-f8b5-08dac18f806e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zKplbFjp3SkSCZ2/zFvtqAvG6fVnB/t5Usnow3Q7R/bMy4XfgMPzdWxPlWgx07SrWHEkZ89UA4M7pK0qy+I0UCVtyJhTKgoo6NhhgNn5n6URlkY6m9JDJ4pB5tx50Z4I39Z3PKhbNemNFPhEmIMbH7XxbF/gi4Bv7wZ9C3+FuWe0oHJoZplc0NPzqhtZ2YZqiCtwTwJDH3FEGuPcc2bYoWqpM/WViyeWmZJ4RDVn6Q1u1aZ1x3xd11Ff8pf3Sc+3JR+ts9iu1NHsAuOv/5sVOFXFUEzZ7oVdBDynPMb09QWzzNCBHiScvE3rWFos72brEPQQ9vGTcJkh/af8KwQTGlUGhbiOPCjEKS7G3yGHVy1D6RL2hQY9pFtIy4bn2ImW8Q6yVt2mWvdp4aMtPGz+e155IhoVcYBG+w/bPUIxCHeSqSkBLBE52iLDZyU1lVNC9erDcoAD3fSwmi5P6q1uclGDbgRs7CbBM6k+Qw+dEQBpHtUuDDFxMXpBsSaYlOo+aeA6X4CBf7KfzBfYWGBoBtdB6EQG6vGKpF+GwdurPeZeX82j0P8pv0eDqf1d4UOHolD+6c3LYKAZ7NXlLteEOW12WnDfeDFGCUlhZOl42bJkzk2VGbbM1XfDki8DRsgKA9muBUwnFUsO/xqLC/HuGVu+snxPgZPCvdbKEMaD7xtMf/svYZgVPLsSf/7xZhHMYppL7jgNT7XxVTkLNeRFEwcU2X8mTCBthMOdIwe6q4G/sgOfHS063PzDnKBIg0Y1G6dhN+h7yyTImHxBhu071Q== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(396003)(39860400002)(346002)(451199015)(36840700001)(40470700004)(46966006)(36756003)(7636003)(82740400003)(86362001)(356005)(40460700003)(40480700001)(6666004)(54906003)(316002)(6916009)(107886003)(478600001)(426003)(8936002)(5660300002)(41300700001)(82310400005)(70206006)(450100002)(70586007)(4326008)(8676002)(26005)(83380400001)(36860700001)(2906002)(336012)(47076005)(16526019)(1076003)(186003)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2022 13:45:30.4024 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bb8c0b8-c80d-4a8c-f8b5-08dac18f806e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5743 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Packets can be split into several mbufs with various data sizes. There is no limitation on how small these segments can be. But there is a limitation on Tx side for inline configuration: send WQEs with inline headers less than the required are dropped. The very first segment must be more than minimal inline eth segment. Enforce this requirement by merging a few segments in this case. Fixes: ec837ad0fc7 ("net/mlx5: fix multi-segment inline for the first segments") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev --- drivers/net/mlx5/mlx5_tx.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index 6471ebf59f..a44050a1ce 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -1994,6 +1994,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, } else if (mbuf->ol_flags & RTE_MBUF_F_TX_DYNF_NOINLINE || nxlen > txq->inlen_send) { return mlx5_tx_packet_multi_send(txq, loc, olx); + } else if (nxlen <= MLX5_ESEG_MIN_INLINE_SIZE) { + inlen = MLX5_ESEG_MIN_INLINE_SIZE; } else { goto do_first; } -- 2.18.2