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 ACAB3A0548; Sun, 20 Jun 2021 08:30:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26E2040141; Sun, 20 Jun 2021 08:30:52 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2040.outbound.protection.outlook.com [40.107.93.40]) by mails.dpdk.org (Postfix) with ESMTP id EB3B84003F; Sun, 20 Jun 2021 08:30:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T8UyU8Hkb1zb22BgoMpN9k43b495x8Wv+efHatzvDcOQlRRfEGMLOC7PnkogVbmZRq3rZUwKCDgm6AAFz71jrVklOTWOw0CeaY6fXdC9nOL9rf8NaeAUHxS9y/kmEuPYv66ITAMVMa9CqAimDFvNOuCRLByZ5ZwepvOtq4KW5AAFFZ96GUYiRNTzQrpaT6xez9Gv7QimUJ3X6iOaPWFuqRdTk+UtDZu0eKVekZ3WoisJ297F0Wnj/1CGAPR9LXTO6ml7EA9GnMEZ4+p45tLn2ZkE849nL5T0ky+bt9VTttnsxcIaEu0ygglpd2wstzG0C8i/NcVgEmF9yuE4wOi6Dg== 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-SenderADCheck; bh=k6NVdFUDLOkQHBSfinz6pjN0bLn1w5RC6XHHO4noE+Y=; b=i4NO6QPeLoBpN1L1UWZthW5KXyb5o3jwUSke1i6IEldEXXnowFUXNxxDCom5kMXNinMzGpwh2B2CJA1OKzHY4XTmZFWmNqy6t7A71MpcZYTfcSCRhJuhyXyH//pcFEX3BBqn1B5u9kr/S7Y3ZXIbHgn3FtW3uJt67m6QhGpTinCUBFuHL+On50GMehXXloDqjyUp5fQBXXrttaGNUY8iCzfXPKBsVjd0bAvC/StNA4fx/auiSGzSmfS3lJ5NCJDrK9yyq22+wxIwCmxovqKWkn3uan5M+lzkkYDb1XMxOXWTQsvhUEYqmLKnQ2DauZRTLEdQaj2jr+uOH73Ls1lDMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=k6NVdFUDLOkQHBSfinz6pjN0bLn1w5RC6XHHO4noE+Y=; b=hfev4eMJsl3McU8Jz52cMMk/74zKnf95dRPxwu0DchcDw9j9UnHn4toRxI/NgoeS/76LOxs4Wx5zWIl8OfN7tzg0y+Jg7XoU5KLmiuthCmubT+cDfRGgdQKwaT99AWZIQCsdUeDPJLea8MjWb+dLZzkFoI+bCQVWCBm0wKYsCbjgi13h9yTBlH7Q70qa/z1a2aMRMVedIYKPsUJ99TvxHdYrARu8+iLNJ6SZ7b4Ty7WQJV6o2B7s+3RzHQBdOlYsgmnwdAnYIQJMm3XPQsU+amHZNcyw9PBdRfI5n/WBEMb47MM20sRA3VVP6gsgr/js16wFtGG/7LyOnHFyVx1BpQ== Received: from BN9PR03CA0572.namprd03.prod.outlook.com (2603:10b6:408:10d::7) by CH2PR12MB3767.namprd12.prod.outlook.com (2603:10b6:610:26::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Sun, 20 Jun 2021 06:30:48 +0000 Received: from BN8NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10d:cafe::7b) by BN9PR03CA0572.outlook.office365.com (2603:10b6:408:10d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18 via Frontend Transport; Sun, 20 Jun 2021 06:30:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT006.mail.protection.outlook.com (10.13.177.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4242.16 via Frontend Transport; Sun, 20 Jun 2021 06:30:47 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 20 Jun 2021 06:30:45 +0000 From: Viacheslav Ovsiienko To: CC: , , Date: Sun, 20 Jun 2021 09:30:28 +0300 Message-ID: <20210620063028.24433-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d15d7f30-4e42-4935-32af-08d933b4f0f8 X-MS-TrafficTypeDiagnostic: CH2PR12MB3767: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +8YQSD9giCIXqb7tqTJJrAjb/X4/Sf7t65mGd/dvSdvwJtLwiIdDYerzFEXOLwLGZFHGa3pQE8SNvXwRJig41Yxi8jBw47P6C0OLMg17wzO2sWvEMJNvUbixd+TWOzQQSyTWUlBVf9z4Eh6pkERvf7QTmWrDULqt+CLoMniUWkuJdMj9UQ4NkJC3sPsY/GCaOIIbT5EuFxEoxOlfGymUStSIyCjuoYBNpeXIJESHGoieY+1DGn4HlX6VzH6iA9wpwHC962mIsizNKJUAwuYgRjQdVcneZFLLWi1ewuhCW79jqbGvU9KmYwyG97DseXbXABJzKsT37qDXkquC2s72syTR6dkjT6pxxRV9CYkBBJ9Y9zKx5CUfBdwPzz0K7emO4TlmsubO25qSm57FD5UCdTbWKqr9RtDj11MAbE43kH69TOS5L97mAYyLB+VDOAmTF9+Qcb8LHIvjW2/9J7WKny17qvDscMybSd33bcdWuClkMbUZs8M9LL+QuJU8/zaf1rqFxdV5oW65wLF3n70gCKDF7H1aEwfyj16dH6kMzEw/oWvChYFoyBFKOxcEESkdvB2zd5vyxYrHTuTMQDcFRYHYBWQXzvywSQVGrh5uj9meRXftfB280ZyTDf/RlVO88zJq5EFAre9isn1sAQVWfDByZkIeNoDaxbVDW+gUNHI= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(136003)(39860400002)(346002)(396003)(46966006)(36840700001)(36756003)(82740400003)(426003)(6286002)(316002)(5660300002)(356005)(450100002)(8676002)(36860700001)(36906005)(55016002)(336012)(7636003)(8936002)(6916009)(1076003)(70586007)(186003)(54906003)(2616005)(2906002)(6666004)(82310400003)(4326008)(7696005)(83380400001)(478600001)(70206006)(47076005)(86362001)(16526019)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2021 06:30:47.6065 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d15d7f30-4e42-4935-32af-08d933b4f0f8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3767 Subject: [dpdk-dev] [PATCH] net/mlx5: fix TSO multi-segment inline length 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 Sender: "dev" The inline data length for TSO ethernet segment should be calculated from the TSO header instead of the inline size configured by txq_inline_min devarg or reported by the NIC. It is imposed by the nature of TSO offload - inline header is being duplicated to every output TCP packet. Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_tx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index 7d3ff8407c..e8b1c0f108 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -1338,7 +1338,8 @@ mlx5_tx_eseg_mdat(struct mlx5_txq_data *__rte_restrict txq, * Copying may be interrupted inside the routine * if run into no inline hint flag. */ - copy = tlen >= txq->inlen_mode ? 0 : (txq->inlen_mode - tlen); + copy = tso ? inlen : txq->inlen_mode; + copy = tlen >= copy ? 0 : (copy - tlen); copy = mlx5_tx_mseg_memcpy(pdst, loc, part, copy, olx); tlen += copy; if (likely(inlen <= tlen) || copy < part) { -- 2.18.1