From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30065.outbound.protection.outlook.com [40.107.3.65]) by dpdk.org (Postfix) with ESMTP id E3EC6199B4; Wed, 13 Sep 2017 12:50:46 +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=U2BHMXFtdqljlZGjf2zqLGTbEH/OBeFTNl1xC1/8LxY=; b=SeawpoIPEQRj765I1HsTSy6ZnNT8dAxveujvRrmVjmQfmJek62Kzto6hTPAuI3nPTu5BFoAWhGmEOsdFzHnNdmGyEeOgxT6/4oWo5n7ccDwEC0k3LZZJKSTRvoUkm4UN4mX6Plt2TUjBrX+wy2OgNugXZmNfgvgFcqcpPbi+Occ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Wed, 13 Sep 2017 10:50:44 +0000 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, stable@dpdk.org Date: Wed, 13 Sep 2017 13:50:36 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: <7b6d42c0c5e1a04f8483b6546ea0b1db8fb7ceee.1505133966.git.shahafs@mellanox.com> References: <7b6d42c0c5e1a04f8483b6546ea0b1db8fb7ceee.1505133966.git.shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: HE1PR0401CA0079.eurprd04.prod.outlook.com (2603:10a6:3:19::47) To VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d9025ff-00ce-474f-b5b0-08d4fa95498c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB3151; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 3:e2U5sW1AKoqQQu7lYYzR6mLHKRJj9YR/Vi3aYwOasSdC0CXuVW4n1Z3d6suWigRWH/0urPyLlNUf7cxd1L1nXlByOJkaQ4n8dC90lqnea4A7wFk2suYh/6NZL9vvSpEr4ajMPHVN7ExYuhboFtjjypKr0fMIoozTjr/6mIREfzsuCio0FQgcE2cs/WNRh8OrFKLpjnsHBJ/+CgkHTMZOEK/Ce7chDSqNEpGYnLiYCEtTZgO3hztVfjtWRf8Tk+cm; 25:87bsr8WAnDVNeAXBKqJMp6RNcjl+huaoYCqaHMGrl2fBtDDar5aVjK11jLvfQ6LQgYsCDqIdTPzjYBJtyJFy44Lrmn88whNoQlx3/ThFYRtRPAskQBF+iuPRsQlpTpsn/jRBOJE5ChIg7e/8es6uIshVNeDPvj5Wsau80XYnrUCu/EJ07OkwNPRqAmBXzlaA/pXWA7eCVmgqoDkRshIMkjxT8n9JchOSJtYKNW1p4xMfqZCl5Pa+KpwWzIvolt+mgYYsCPmKX7zTmzcP0a9dDUjZE0Typhr/EfabQoI3HK6P2HxLbbPSvSVyjGt3VG7Rs3DGkXZ6DSKeZ+pPu991RQ==; 31:AkP14btnhF8Pgex+KrvZD1NYTSAgyG7ymuPQpi3MI+vWo2A55S0lzTtZY2vgobSrUMmXwJxsNXh1xB9fdzZTQP8wedAKXGrWhXW8PVK3TWzzkAx3/Z1yXiWvrEQ1EajstOEwWLVc3eKl+acSk/lafZ1TjnLfDS2wDUSHwsYxnUA6edQUyxLhe3SvvQ8bBOiGF6eIAapZUcj+o2173PULczXNvaEx0xhPl2c7kehI088= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:2gYZ5OFB271lUx5McY9oeMAEP0KG/tRu6Qt0NLuIkZ4qssx9Q6hW39/Da5NaViIxDpH6VBBf/DGAfF/DpA/rWxcuys9OeWkqfOMVONqCotuIdK4CTgaaEwpLQj2MOSHmiGBDSkRTKvoalEvx0vNRjTHJMAPeL7n3XdWWnwLj3ZxV6u4dOvOFIIS2uc63+2PCudLE10ldhFVbUmMDgezZ8jPyrrb55r9olhaJJdTFkThd9W2dgz0XbPkzviWeQijo5kxH0TC/MCH7hBUVhBSfcsjN5IOH1nQoKa4LtBodhFyA7ILLRkI47QhuPcqr4Ky6iBqVKkPPduZWikxvzkFmLtgWJVpDfP3p42uv2oXVkySb3cPCHiOsCM6ZX90J/ZeoSYcTxbBfoWLRyz+cD8H2m+sQlgU8vS8E34lrubYalytq3Q6GKCX2u5IDBeMCtivvX39OKPQ5ZnA/iJXX0mSq6NGVGPEwwtdjBGgkD9iUT4X7YMGcKzLsQXjaVZbK7ato; 4:H0dY4T5qfSDNEF+hiXifSWWgGbmMXNi4OE9Qk7qdxUYvh3hlaR+gbYY0wBVVqB/+z/c+0NOOm6tH2LvkgwRU1I3Kifv34gtJ1xiXQYCH5P9QgLrBn1Eq7MfW6S6pqMEmUqg4jIjg1A/rsFLhEkhwMzldeJODUGfnQ7IY7UCmm1btssdhDh5E6Pspk+uBDHtEeUR+LOYoMA0nR+sQHZ/Occ1pl7o4Cu3BqV54NKkt20dx3wluzgZTb0G50w0QYDsx X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3151; X-Forefront-PRVS: 042957ACD7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(346002)(39860400002)(376002)(366002)(199003)(189002)(21086003)(105586002)(86362001)(48376002)(50466002)(3846002)(6116002)(7736002)(69596002)(76176999)(50986999)(118296001)(25786009)(66066001)(47776003)(478600001)(106356001)(101416001)(33026002)(55016002)(305945005)(53936002)(2950100002)(4326008)(6666003)(110136004)(5003940100001)(33646002)(50226002)(2906002)(68736007)(5660300001)(81166006)(81156014)(8676002)(189998001)(36756003)(7350300001)(316002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3151; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3151; 23:z+/jg214us/kAHX0lpyzvpQIq6mp6UmWMYrb98CJf?= =?us-ascii?Q?TYxJI506/VFJfqKtN6H6cEN6mPrmBK2We77OeC/rQwQDO/ZSP9Tgf2YIcvGZ?= =?us-ascii?Q?rKkcBSNiO9obiei7Q9yanY2DkQs2fOVuAYvQE+dRhxzjxaztdzMcGARQMHze?= =?us-ascii?Q?386zbKIZ3i0IK3GYXudT6hpixNBq1gwWJbXKFq1FCfUb8q9IVAX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X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2017 10:50:44.7424 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-stable] [PATCH v4 1/4] net/mlx5: fix num seg assumption on vPMD X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 10:50:47 -0000 vPMD Tx function assumes that after the scatter of the multi-segment packets the next packet will be a single segment packet. This is not current as the function can return due to lack of resources without sending all of the multi-segment mbufs sequence. Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") Cc: stable@dpdk.org Cc: yskoh@mellanox.com Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c index 37854a73b..f89762ff8 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c @@ -112,8 +112,7 @@ txq_wr_dseg_v(struct txq *txq, __m128i *dseg, } /** - * Count the number of continuous single segment packets. The first packet must - * be a single segment packet. + * Count the number of continuous single segment packets. * * @param pkts * Pointer to array of packets. @@ -130,9 +129,8 @@ txq_check_multiseg(struct rte_mbuf **pkts, uint16_t pkts_n) if (!pkts_n) return 0; - assert(NB_SEGS(pkts[0]) == 1); /* Count the number of continuous single segment packets. */ - for (pos = 1; pos < pkts_n; ++pos) + for (pos = 0; pos < pkts_n; ++pos) if (NB_SEGS(pkts[pos]) > 1) break; return pos; -- 2.12.0