From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10046.outbound.protection.outlook.com [40.107.1.46]) by dpdk.org (Postfix) with ESMTP id CD0A7592B; Mon, 11 Sep 2017 14:51:07 +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=PbdHIkuerxRyCYQEQq4lhCaTZMe43Y3EIuHzuU4Qq+WOXOezkl2qjYqU8deov+/hJeU2x4G0m+wmfVuezmE5y51ihr+cAnOrMSYgyEjzpdIswOdXrRc5Jj/USz+rJA4uDu0jelp+CWq5ocxuGUmoO+Tm0yWcjKjGFNi82FopNWM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by DB6PR05MB3143.eurprd05.prod.outlook.com (2603:10a6:6:1a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Mon, 11 Sep 2017 12:51:04 +0000 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, stable@dpdk.org, yskoh@mellanox.com Date: Mon, 11 Sep 2017 15:50:56 +0300 Message-Id: <7b6d42c0c5e1a04f8483b6546ea0b1db8fb7ceee.1505133966.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <1e7320c4ee4162c9e509b7560be215077f43ca87.1504076528.git.shahafs@mellanox.com> References: <1e7320c4ee4162c9e509b7560be215077f43ca87.1504076528.git.shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0602CA0015.eurprd06.prod.outlook.com (2603:10a6:203:a3::25) To DB6PR05MB3143.eurprd05.prod.outlook.com (2603:10a6:6:1a::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cf9831c7-194d-4275-6dcd-08d4f913c417 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:DB6PR05MB3143; X-Microsoft-Exchange-Diagnostics: 1; DB6PR05MB3143; 3:MIBvH8V4SFO3GmmdYJDG62p3IYlqmDujA5ewsqBzG6qEJNJc48xrCEf+6fV5oa3ew+lT3PcKr1vuCl9ir7X6Zu8xsbiqjIhE+iwC/LFD9UbsB/70uu8EBZaJWpQPD8DltNMWF36M9GZK/ji0AMAqnsp6dTKD3K84VZO9/WPzUKzuMUTyDBs0iSjAP28apqXXI89R+UXBKO2BidRG6sm2x+sAk4YKm6Le8WyrEbyBJ3cyF0hX9o3MXkCe2MpWsF7q; 25:pkPmQGhuOyoYZsOrMCeFal3K8Exru5eRDNZsYAaMQ6dc360wxrzDfHFMP5WaFzFOGl85D1UPPCC9UKafGGEXViN4b888XnO+lSaTL7kxAopC7LPyfzZRbks7rLuf7P/yytrpXRfZGuprOZBpK3hlrkrtzJlfvSq6rO5GK7uu/6bPQkx2NCh2tM5dBSpFdVIWkWCyjbaiReTHMb4Zym+w+NGbMpRKWfmKrZaq0LiHclPIlSoJyidwwoJYKDS28ZaA7ntn1PcG/DZ/4l1KGApg6SicOado9KDNeD0xFImooHf1M4CVHymhe9V1P+Q6VjWU+NmCqGXoD1pF9i9WTvhb5Q==; 31:EvSuedj0HP0b5zA8LIY8zSkZ3cOQF7bQPcXitnDvX/TwGc4oeIft4xqxuuE0x/0lODh7e1/sk+HI3Aclfj9EZWJuU9fkJZ4LnuCodt4n7E65vR38TvnbuBahihME8uM07BzkVJxMrXii3n/CbgY3qo8Sgx/SxIga3yykbgolx1pbnI2LwUXZPXAy75MAhXldIdiXvH31divWar8wPH21GNXhwESwHDzrnjtGEXhgJ3Q= X-MS-TrafficTypeDiagnostic: DB6PR05MB3143: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR05MB3143; 20:HSnwtbSvhtFBrH+Iga1ZMe4rpa+ThT7jrlWPDanWKUsptz+UeZxgBus8cIPjdh9nlN866uzUhDgShgTuhf9UsXC/4TMiU/5RW7kcZwL0qCnSNDmiws77hr6fPmusl0JBW/wXIqS0F9PWKwFZClXyVAYJa6JBxfilJ0GLPGxeykZRh4QmUGcXjRwbcnRXxusLcU7DvgMMJznFCMrHNq+D+/Ffo/pGJ40r/lgy/tK1Tkc4zyIAa6FfyZD2k1p1LCKEPSWWCn+q+YQlvkL/+9wB6wQ8sB9EaLzEDymxWvBULHrr3bKslLrvsOS99zzxaeiPGLHG/7828+PKfVWkt5vTUj7140yGL7tYD+vfmJl3UBQckHPwuC6Yvii4QrI4k+VXAIB4Rd1G8NmZ67kl8mBaKzcJFnGBsiTqMGfiE234mVsybQ+ig2SuH95ynKPUgDDySMSoiRUcCpFGJRyr2A2DG6fEl0Q1p2gA39dQ9FXVEwIt7UGHd30cFW+yH/HF85IM; 4:jJFSiJviupfaNTkN2g6wDV1zXXjcggu7hFr82b1dlsdEPvwtlwhuuf0cejGy92ntFEP4LKHeXwN1mulj+qyU3cf5jlfQFsIEp0JXd8vl0t5+RjVdYCAgaD5PDEOCdZsT2KukXS1QGvgn9RAEOgfTQRZuBYcWrrMzZ1zgA5Rnf4mVMM1iILoFttwhBUB9kuZ6k6OF5U1R3aqVsh3SqQqh62pNxS/iTw+3hMRCHYYZPFxw70FjdY0YmJsZBG0Qxvyo 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)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR05MB3143; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR05MB3143; X-Forefront-PRVS: 04270EF89C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39860400002)(189002)(199003)(101416001)(5660300001)(3846002)(6116002)(25786009)(8676002)(107886003)(110136004)(86362001)(4326008)(2906002)(33026002)(36756003)(50226002)(42186005)(81156014)(305945005)(7736002)(68736007)(118296001)(33646002)(69596002)(6916009)(2950100002)(66066001)(21086003)(7350300001)(6666003)(47776003)(2361001)(81166006)(105586002)(106356001)(478600001)(53936002)(2351001)(50466002)(5003940100001)(97736004)(48376002)(189998001)(50986999)(76176999)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR05MB3143; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DB6PR05MB3143; 23:AgmgrhvmdTd5VmrtTatoyeTb4awlcfmWiaIrT2ag9?= =?us-ascii?Q?AgM3fD0POA3q73ulJ2TIx4lja2W0w7cNczO0qIll5HsHhcM+WS8p93FGbIkD?= =?us-ascii?Q?vjOc/gVqMqlrbgdAwrELjw0Bb8EugBYPlK+HyyLVqjw8i8xGRfS3ATWc7t1g?= =?us-ascii?Q?bP1+6oP3JE0DeOiSxiaMJoDDGZDxAxvp/yO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ZYTfGZ+NGRNTpB18Akx4uEWwAMdke8YJNds= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 12:51:04.5334 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR05MB3143 Subject: [dpdk-dev] [PATCH v3 1/3] net/mlx5: fix num seg assumption on vPMD 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: Mon, 11 Sep 2017 12:51:08 -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