From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20063.outbound.protection.outlook.com [40.107.2.63]) by dpdk.org (Postfix) with ESMTP id 00F2411D4; Wed, 30 Aug 2017 09:07:20 +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=ghGn6cKJfvJ6pMUHKBh9fJX89MrRdh5OAX4hL34aITE=; b=FAFEKjn0gDDsrxSLpcFwPw0TPQsNaSYZf4K0l1+YPvHE4ukhbk4B+26f5y1nMRNNZTUwZOzGiTLL4PZDOwyortGm+kaqttnT7Lyu484jAB44V9AqD7hbvPjXhdkp+hXsvq3rOqNHTjc3SYjfZWaGBDgaB/l73NDQo4SeTcFmeoY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by AM4PR05MB3138.eurprd05.prod.outlook.com (2603:10a6:205:3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Wed, 30 Aug 2017 07:07:17 +0000 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, stable@dpdk.org Date: Wed, 30 Aug 2017 10:07:07 +0300 Message-Id: <1e7320c4ee4162c9e509b7560be215077f43ca87.1504076528.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170823073358.116786-1-shahafs@mellanox.com> References: <20170823073358.116786-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: HE1PR09CA0090.eurprd09.prod.outlook.com (2603:10a6:7:3d::34) To AM4PR05MB3138.eurprd05.prod.outlook.com (2603:10a6:205:3::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e3b9c80-3128-4f1f-5909-08d4ef75c041 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:AM4PR05MB3138; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3138; 3:wIlh0QkYrgtqjXkJF4e9v/HCLmgqOq3OQlHX6sUqBv8J6U45VdDsYaGUhPq7rHgyLfG5v5eldi+IRPQs9Wj8v1RMmWAFuGgHOQUManIxO0x5sURgcvAMHEUgFMVRc4zeNaywO6DrrtF/sQSKGhWUirIkwFbK8x5rzb/+9OZgiZBURcdxq28HWSMYLnugEqjAYoxEP+UJYLN1QfWam1J6mizAdcqyxmnwqv/6MxYzfXc7xA/84BH8WNNTUbtD8ph3; 25:nSXM4kp61z1guLZoyQsDwKf76tACXV7VccuWYp8QmfgJneeFk3XZ7shWV9YMjmyX5lPXW+t5MrZQBwIF0bBYX4XaMLNubPF2fK1uNWKkGiAa/CuIdgie0CM2+jrjF9MAIwsjqoNAVJvWYOzXC/FlUPFjUdr5EX82JetYdzIfmkXmAMkyEMhKnwkq4ofqoALOYBmMh+dsvdf3T07H2g7PlF64cCKfx+se3fkESjoxdT8RU7F7469EcxgAkxKZmH6JorQ/5lg3gfkuPeWBuCe4a0eRCrWcOxrvTFtIaNBfYkMmA9N2SeekawWSZdLKjsVqB0eQmUd3rWK4knT6dZzLrA==; 31:LW9VU2WL6NSYt/lf14uFPyPISUXGA6YJvc1FWiQlCCHQBUssk/VXcv02PJy9ehrHO4YTkr0OmpbeSfcr3bC5UkqcTS1zT00lnCmH4326FO+Egl63SQ6i+9e1GRneUWi/k8Mgj1KwJlhn0/G12sKtOReXw16PEqofXtDVkWo3BVUf30JhwfIFoqQFUc2NTPJpyofpAAr57aYxF4+wc0ATan9uWQCsR4mPSft6ae+V4ak= X-MS-TrafficTypeDiagnostic: AM4PR05MB3138: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3138; 20:nC4qbtDi7GtjBCVBdUVRTH9BQMB5yzAuoITrOvbQks7wCIOzFyljhPufdHwRApG/1JNqz8UdCNU3kYoBBUO/1zRrCl7W1BbzJzWri1vBeYhdmg7SrArgMiS5mi7U/lfAWChk7Aogo4lyiHvaejl3TX9StFRBlX8nGQfXJXghMZFRS1htYBP8WJMuXRmk3utHVTr5++hYBpP/ImP/7ERyCaq47MCVZhGfEjDGKWLzTlEChzQDBe0peCBdLSe6qshFafYbD5KnQyHXlx9Hn7hKrOXMmN5s+lehfeMA0U30RDJ/48tm28uXVgq23i4Mgjc54WL6Bh7tRoajHX7qyvkFojQLGrMzLXotJOTNOpHQx1cFRWtth/UZVTOsvfZWJkw1zebBKGxzi29BcCq1rPsd5MJjWEtRHIC3p2ItOhTDghegNgmUR5Pu7EGk8VMDSRu1AfkeMZGVc+I9lf8qL+UU+W5x2QWzhUotBjVNd+VKIDWoPzY08ZNBnzkHWwoiMLmM; 4:5Cjhe9ZnatMW/YWsr4uQnxELluqTaj+eE2DV+giOqUjeyOH2d3vT6heqm5+0E/TklW2W2WMrGa28hhik2TECp7VP6KS4bf+dhfgfVcLyDyUJPAhNnHnzU3RHyfBtYH1E0xKExjsJLIGMpgEPyGM5B8caICXnUh9cic/Tmwu2NoYIxAdkkPPYjHLhXosPLqz8SgoV1X2qN1fFBon9fFDRw/hI4A86BxbOnw2KpS5BkpVPwcoqd5YGg6kwnRvAdR4f 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)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM4PR05MB3138; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM4PR05MB3138; X-Forefront-PRVS: 041517DFAB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(199003)(189002)(8676002)(6666003)(110136004)(6306002)(2906002)(53376002)(25786009)(966005)(97736004)(4326008)(66066001)(69596002)(305945005)(55016002)(68736007)(53936002)(6116002)(3846002)(7350300001)(86362001)(478600001)(7736002)(50986999)(76176999)(101416001)(33026002)(21086003)(50226002)(81166006)(81156014)(106356001)(42186005)(36756003)(105586002)(189998001)(33646002)(50466002)(5003940100001)(118296001)(2950100002)(5660300001)(48376002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3138; 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; AM4PR05MB3138; 23:M+wb0l6aKEtLZP8e2ejL5LYWqN404S/l5/BliwGRe?= =?us-ascii?Q?vh/hZmucWrNCzAZ35FNNVFrdmw1x+LAHTXH6SMv0n4N2cLhWLs4DkMFThbTV?= =?us-ascii?Q?TLIyt7ACbM4bmB0FMizyNI0KjLAIZV9alisQtwH7JwbntNasPsHoiFchPv2c?= =?us-ascii?Q?UcQsYnXegRR94Xa9z3e8gb8Tl9C2o4G1uzBfvV6vu7wYKh6mrIuQ9GcGXcx4?= =?us-ascii?Q?Mx/3S/RiWZw1ky7T8IGGuTHbbxSldXW8wVP+VWJ5A7u9kGBAP405EGTTqnH1?= =?us-ascii?Q?ycPD38opyjkqE/gIzqZ2Bt964YnrhFcZGBLaVt2hIxPY8XyvG0HYi6LQx5Vv?= =?us-ascii?Q?7R7/oLMdriaTz+4DrrKJnmCuXgsyxb2k04eiZ04+acRZ7ZlxtfuHnuXQlU/O?= =?us-ascii?Q?KJ00dnsdOnCe2pvsMaIxvpQBAzePmlv0eeQh44f5ocPYjEusbSNSXfMbNrGY?= =?us-ascii?Q?0eb/Y7ehNqC/vMNeN33bnCwH67ZQQFoifTdOC7QOXmUYwsek2cEY1fR94FPM?= =?us-ascii?Q?vi7Pc88hxRwj3lX5ZitSG8eBS3UdOAkHnrbWassLSwUc+AzF69cgJN62R10Y?= =?us-ascii?Q?L9zdUZmKKP93nTKhKyiirtEOOyCPoqS0k0BuDdu5msS80vrY3wxjjnbjtBJX?= =?us-ascii?Q?36jajq+C3pxXXWg17CKKBajqchEzfen526qB98ApB68UDxACvJo7c9QeKTa3?= =?us-ascii?Q?LMcQ0JxwqCSVEsLwMkwrlqf6xkb6yc+DVj/lIn0YGH8/J34+YosrujwclC01?= =?us-ascii?Q?22i6knqeqkxRIRWwfDO7lCkgpIINkx3lqvi0cSAH02BDfUbLLq8L5CtABK1e?= =?us-ascii?Q?l/b8t13k4Ai9H2sCH3w5PUt0VuIky/1tkYr2TW1KZilDZLelTCWjs9+SBDAK?= =?us-ascii?Q?JW3xvUuWuFQZexZAXU/1lxF6rll89nIJjNRP+RDxz0GHezBsUQuxpceSkox9?= =?us-ascii?Q?sm25hmL+OHdDTBJnghGyzNShxcLJ0Y+ctGhwHiIRDijhLhT9a45chQlLzfZ8?= =?us-ascii?Q?0dUNEe9WeII2QqArG0DzMsXhhVqnmasRrgZfidEkP7bqKNQQmcSrTP/ruEG2?= =?us-ascii?Q?ChAzB+4htHDUUzbJq/kt03sO+JS1YMy3i7TwB0n76M2TelF0sB938OZSFJOh?= =?us-ascii?Q?iz7SA01pCAYHIyQU1XZD18NGVtCeS2ORQ1MED4SE6afeV3fjK72JA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3138; 6:yVtLgGUYgjqc5c5XoApytwRVhsZdvNXZbKIpUoQN6uQx5qwxiIjuU4Cfs2A0oRqvQXVnXmYuwhr6q4lcKJah068WgWHX0YHdzFm9+T6xvs0dRZ2wivUTR/GXMj8v67b1q5QVRRNkq6BtTf55PbnQHoyX0hPUeKwoOTFXb56YlCmjdIw+68psDMVPdbVJHTqu8+Zd45+/DC7CdOzWeOpg/c+Vgw4IuifEhJfsXq1bwt30gW7CrvU4DR2U1Ci5SaXgMrejsP9+f+LWmp3idtYyH4wakmrpi0NppuEPxxJVaXUopRolFZSr6/h5tMH3naBnLcX/sUAptHGb/S2kKXatmQ==; 5:ATAU+JzQnAquqaoxdJPEjcN81G95l3lNlbFxsfyGGnau2peMQvXfVWa5a9pjat6BcPehgyqSyqHYPPWj6EL7nRfx1wD/uBAfauRLPryLVQjysQCRngEWvjlob4fHadNdZSoP1uSNs3n+mxt9V/stwQ==; 24:V8WxHkAConlA0Z6V7erLZOrtR1rwb3VMHT8voTVATjAetVLOy5Stt+N+xMEuqtWVuS405qDRQZvOufAAx/w7/kMLwjNB4+NWzWJvrAd8w50=; 7:rWo3BwOcE4u9M052tH28cWpXuWPL86ZwwQI5dcP56e9I2lFdBaYkuvl1Or0jt0xZsAV6+sMtddVY2XbmHJXeLUVtkxVYTHNwqG5XJhlOjbCCAYBcDzMGAIv8KZuh7wbkN+czmF3EqYADrQ511H2fJwOAWubIqIIEWFPUq+1B+ecXA5hlJojoo3jVhXNTFxxcl3SldIvbvusg08dv4BqKLHVXp6aE+CzhPNDpaO8wSNw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2017 07:07:17.3677 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3138 Subject: [dpdk-stable] [PATCH v2 1/2] 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, 30 Aug 2017 07:07:21 -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 Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh --- This patch should be applied only after the series: http://dpdk.org/dev/patchwork/patch/27367/ on v2: - different approach to fix the issue. --- 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