From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0059.outbound.protection.outlook.com [104.47.2.59]) by dpdk.org (Postfix) with ESMTP id 812EF1BC44; Fri, 11 May 2018 02:50:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DjcECF2okvwxdXgy4h16PGd4YrPV/heLrYQIM7vX5ks=; b=L1Zpag736jd8NsDANm28nmZx5y9XWMP0vYmQAPvGTs16PjZJB9Uje0v2WIStfi9xJbhjn0l5Q8wZOr1I+CgtUzi4AipA2Vndadee07h/JdWNxYz2FOGwOV87X82Wjkduu7ggUyYsMyFmoIQIKZYAo4n0yKPWE74qItySkkn8v84= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2033.eurprd05.prod.outlook.com (2603:10a6:203:1a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Fri, 11 May 2018 00:50:46 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, shahafs@mellanox.com, Yongseok Koh , stable@dpdk.org Date: Thu, 10 May 2018 17:50:32 -0700 Message-Id: <20180511005032.30646-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CO2PR18CA0049.namprd18.prod.outlook.com (2603:10b6:104:2::17) To AM5PR0501MB2033.eurprd05.prod.outlook.com (2603:10a6:203:1a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2033; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2033; 3:1hBnb6vId679yIk0kh/ppU5gwfS8eWpDaY6iWuBCtK59nYhOpl4arHfrC/6cwOiBk1aCMNwrooD28Jbmb55jOqMevqqhZiaZZ85Loi/ukJemWxfGmxPeT8gAacOq5nDTM7ImC+rLuuzt1VU2Czds6XjCIr9bBiodp1T5QYpXC9x6K0n0vgrGPWPhSUv2zdWyRfYrDWBfbkMPyF9dgrwgK8Au8zGhe+z+lLHS9uPr5BL32SdIwJWlU++x6n6PdOx1; 25:SqCcUvHDWUGt+VlaDiBIgs7ag0/HUYjLWCy75rry99jPmteNLdw4I5Q0VgA/t4tvueRFj4nSpdVwHzdZYBxMVigroYwQYWUDrvJgnrRJi3w1lXlq8iCMy7e7OqWwSzb+HrgBDwo061Zs7A3v/qYHmbOtDlE1KXRrlQ4Nyy7CtjjNN9pCKdt24Hrc1iYQaaDwNrY87FJTaTj3NH5lDqOMcYxJ7RjGlaAzTKirhoRGxB4QvFFt49rUvA0T7QN4G2k1GbOE+pS9pAMKQo4YVCPpRJEH6mKQ7XZr4yFHWQ8zqupnZuAaGBnkuyzipqmFBLo1+Wto6brHUW4cy0XZ+eH1Mg==; 31:VnzxcsW3liQhp9pEfion2dreKQkuyXuXC4b/Ui12QbslPL8QpPLmVv2x8d8JhcWu3mKK8vqQ/mZ2IUXtRlSI4ftNQ5Ky21EAKbn+rK3t88gJSfgCEFLGnKb7n1Da5Q067y10GOHaBOIe3oo5ars7JJvugWg0sRisONp3ru2XJcYmKcBgLfEvvM+MGrTjnoldAMCjc0Dfs1cUpBlImzw9A4Ip3yfEQcqhzWrsdlfpNP4= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2033: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2033; 20:nPSziACfmH05g82iQXz2V/rqkPngAcGop13JUSMFZ4O3oF/YqXNgmR1BHaO4C5vCTBYgPyjS2rYracjyt+aAznFgDbCGTaBumR22M5/AuArPWlS1owsGkLspn9Vs4sTiZHhA6JlTij1FEp5sKYeUvFX+25+WvJ41237AGxhEFw5Is9X2Oezz0WJZNPQ32XBEuSOYf30CmcfEfIFVGUnh+qfktFAMrMVKYIi/TH2qgg/eUbcDsJ4iuaL5r1YU7BmtNQ2EzYMJPGD4D1Q+2OPdmZDhXyf6/a/Yy3m7uYVvRLc9j0824q9Ar8redfpPybEf2uNMMsF/3KcyNoVHDyRC5JPo/U300fMjdLO0ha5UFJMPhLZpd6QcviQt9/7lXREtSWeuWZADnDtLAUNb5d4OeIz3EVE8Q/yFyDX6KqGLLWeGgLA9Nm2P6tWsbuEoPwyOkibbXmDazx7v8C0vy0HBWj5+ZXaUdkf1OJqGXXTXNcQw2OI97mVSofinwbTacQlS; 4:cKUxBKpgVSvKRzxOtXrnKhGw06ih7QS94luHratIO3g5kBgJW8Mjoqw2rpmhvXzFR780Ja8/7YtlKymgxcVQgdur59p/s61CGEpXY5SeYAVHZTy/fezcXkdB2hTvi3ZcZTMC1aTrawFFS5t1iW4GaiNH+qY139tjFEdZvR6s9nOPS2XgwhAEDgxCMjI/Y2Y+ZqwPdv7reSEskXYePNarb92o8ds1t7tCd8Oq8cZp3b8FVVH7jjJLOsHvgoM1J2McT5bVVi2XTfNDS92HixOrpw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM5PR0501MB2033; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2033; X-Forefront-PRVS: 06691A4183 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(5660300001)(8676002)(50466002)(25786009)(97736004)(2906002)(48376002)(36756003)(4326008)(69596002)(105586002)(106356001)(478600001)(81156014)(6666003)(66066001)(7736002)(47776003)(1076002)(51416003)(305945005)(55016002)(50226002)(52116002)(8936002)(68736007)(26005)(16586007)(2616005)(476003)(6116002)(3846002)(956004)(186003)(16526019)(21086003)(81166006)(53936002)(7696005)(386003)(1857600001)(316002)(86362001)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2033; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2033; 23:1bYrQ/EYp8cNJtsBBcXf65uMp0p/Y1cSPxOdXfC?= =?us-ascii?Q?UjrJgodhBSub0CK0Zd2fsSzXVcx+bUFwxs9gf8f35/k0jLnCSaHs02jHLqFK?= =?us-ascii?Q?s9HjZjTLOdMB/I4lLhHEXTgPtXiRc/MrCuDLezG/T4f5UgpwihClqzC+RI+6?= =?us-ascii?Q?+83Q+dxdQ9Bp3It0F2FzvbvGxU88UEC1uJCqRV6gxfSK+E4RFF0uy4Nfwmzr?= =?us-ascii?Q?eYoSI9ipOXdKsGPELwJtgp9Y0eipee/TElDKzlU/6YqEb/0/0v7v010so7w4?= =?us-ascii?Q?Gtzv/AfelVy4e7498evZqMTsvk/jSX4nyNt8zwE9g+CQchsIr/eVNW6au6pn?= =?us-ascii?Q?ffehymC0FGJwImekHTxSEuyRuFpW57QDhmTH/RnJyVmq9nPX/qhvUO0K7e94?= =?us-ascii?Q?WxPaUKqRBzN7ECwVhZNle8xJl6J6sUfb7tj7O3u4SjKHmalmosLBfyhQP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tSz2fVcUrQHgjIxEcnd/6BbDbJ5W0lym4UGQ7wlZZQouD8ERxpmfCDRWXA5czXjr5zSRyz49DrnT43Of5j4LeZdsZ1B4UvPzEQ6DYGeP2KwMbxLD X-MS-Office365-Filtering-Correlation-Id: 61581def-baf2-43d7-c206-08d5b6d93c50 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2018 00:50:46.4813 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61581def-baf2-43d7-c206-08d5b6d93c50 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2033 Subject: [dpdk-dev] [PATCH] net/mlx5: fix inlining segmented TSO packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2018 00:50:50 -0000 When a multi-segmented packet is inlined, data can be further inlined even after the first segment. In case of TSO packet, extra inline data after TSO header should be carried by an inline DSEG which has 4B inline header recording the length of the inline data. If more than one segment is inlined, the length doesn't count from the second segment. This will cause a fault in HW and CQE will have an error, which is ignored by PMD. Fixes: f895536be4fa ("net/mlx5: enable inlining data from multiple segments") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxtx.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index d960a73d5..2eed65642 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -680,8 +680,17 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) } else if (!segs_n) { goto next_pkt; } else { - raw += copy_b; - inline_room -= copy_b; + /* + * Further inline the next segment only for + * non-TSO packets. + */ + if (!tso) { + raw += copy_b; + inline_room -= copy_b; + } else { + inline_room = 0; + } + /* Move to the next segment. */ --segs_n; buf = buf->next; assert(buf); -- 2.11.0