From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0054.outbound.protection.outlook.com [104.47.0.54]) by dpdk.org (Postfix) with ESMTP id 6912B2C58; Thu, 14 Sep 2017 12:50:47 +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=pssfadaZQ2xzWc1FizPiKd95LPjSQ8FMKeA1/LqGqcjglbRckS/yDvcMfljMk5gaHBODEqNhbnAQ5dt3p+al/+/AGMIiYQCZy7THR3ifu4c5xYcfsO7hV5xmzfchROTqP+fR8eLdw6sqok8hRREZEHRHxV7/5I9ULew7QPTH2w4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Thu, 14 Sep 2017 10:50:45 +0000 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, stable@dpdk.org Date: Thu, 14 Sep 2017 13:50:36 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: VI1PR0101CA0057.eurprd01.prod.exchangelabs.com (2603:10a6:800:1f::25) To AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa241fad-5ab1-462b-68b7-08d4fb5e742c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:AM4PR05MB3137; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 3:Csy0/s74oqw5mBnWsCsCPWW4kTk6Ric2rtMvrah0Qi4En975JwVh5Ch9o7VxINeL+13ENzG5xAZI3SZOR689CU7gLnld4hcHETxnu/yyWAxuziA2JukDoSIZusywNriOKbvaO1LEDeXZ70HJYZDnO+xgCWUeHqbGt4Ajxvsfnkutu7A5Vdw9Jma2u8jmOPZUAiBLS3NO84QUT65k4ibx0D9OQXDT373l+z4cdEmU1pDiZ2qiA8mtl/aAHlpy08vX; 25:UtvjPVZ1EkW+0zUNvhN4zuEot/+KDPixMYqdKLWky6Yn/qC/W0qucaSd3Rj2OJklZXaHn6FI/bZWO5y7AWv1q8CwXhi50+MvaCOyxyUD2mtZVW5saI7c32S7GOMuzKv9BPLO+UFdD860FQBX+H0f/qlVdvTBc4a7+ZKoPZbiecvfYyz9/CegBFB+65TZE2xb5PjHi+yec+ix9jVJ6+uPYbhr4efUeklf8HrK3JpAJBsTOXZ+WvDXZGfFlR96t/LewbnPFos1uPAO3QTuMkApbjcyi9xkOeEgXsUnT8thbFh5Nei0uU6MMhNuIbLWsLEG6XCRNdUU1fTQLfY6twg2cg==; 31:vMPIOJkZ9K3IfeT383rn5OBgvvgkYOn4w4MlMiHO9HeiiSmHoux0bAukiYdO5bKfSdIVV/ch0EKWQeq37+aNLuOkmXR7109JOI3CXO4CfwSoBCziIP4SvjTrqeCVMADnBye+OGu9EfN/946WetFeVs3r1MvfIXOOm+oo7+J+E93X4tBe1qOzGH790pVBkgAr8VFRnNYNZqk954knMg1zKBK2gcV3QDdlRyY175go+7c= X-MS-TrafficTypeDiagnostic: AM4PR05MB3137: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 20:P2Ngy6UHkfH5RLhcg3Wl40IAo1Zu5zh1h4ZSX+KvQ7aBKQcPx7ZbdkLWp9agWDWl//LjWFXVA/vAeMdQP0IltVdl2D5lnzV0FQa7dUKTZabDqI1Vwc8/qfYCGymZ+sjB8DI6Uo+YPJ9Pt1mPO8j1+ThJtrfLrn0fCEURdxTkrQgupfkE8zzVlTC/vQBMxfQl+UQMqIL+3a0Q/B+fkygQfdUVJOheHqWrZwcj1d5BXohn0Wm5nkx9Xax+ZJ0RJv1izpA80OoKiCYMbFDI4XDNgYxg2yscwdklYywo7Ncn6bGX+CmzE6jtFVsbkEPeYmN02aDjFA9exmxfB9TxIdZTGF5G/2Aepq2iXxVI2XR9VsJXJJg2jsLzNOfjxrEWsHmCzlG4t2pdxqjuyqC7vNmv1B9N1GLNgi/cNAvFfNLldDUURzecb7EMD/nz+r4Jrl2oPaLmPN1eB0wyvp2prY+6mcUZlkfqhT2cV6JmTbbDuwmrQwbwX0rHPzRREkAv1Qu2; 4:5DOt64FVbvnYpdCgfFI/LtuEZCkWR2TjYweEBYSmshQrEmNxxt4QPJSxd/UrTuMsWdXtVYVT3+GrOtiRnKNMLPkhWn8FS+TXzQBQtRTl3qJ6qyCMdr9H5iti5BnKVBcWbGJijCOtl5BVC6YCl8N9Lqupv4v7H7UdvX1KPHNITQHaPbE9nRCBhZY7ARV3DJ7cvVr777YxMY1Q1gk9Hu0ign06wM9A15OE9p3V156e7gdPAaqfoJhmC/4VpJsdfvaB 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)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM4PR05MB3137; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM4PR05MB3137; X-Forefront-PRVS: 0430FA5CB7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(346002)(376002)(189002)(199003)(50986999)(50226002)(105586002)(478600001)(50466002)(8676002)(48376002)(86362001)(110136004)(2906002)(4326008)(106356001)(53936002)(7350300001)(6666003)(81156014)(101416001)(97736004)(69596002)(16586007)(76176999)(81166006)(36756003)(33026002)(7736002)(5003940100001)(68736007)(189998001)(47776003)(6116002)(55016002)(5660300001)(66066001)(25786009)(33646002)(118296001)(316002)(3846002)(21086003)(2950100002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3137; 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; AM4PR05MB3137; 23:u0aIST/sdMCzcIo2Qo+CPSpEPUsO2lGjgk+NJP5Ri?= =?us-ascii?Q?WXzwHc5UE6xovu8UcBj0x21fzM0oH18f1EKbrXnEmFAMa0RVF1nYHjl9gWe+?= =?us-ascii?Q?XcsLxdoAHQ1dVMpggLRzziRhH0YMLOMnsv6l4cQ656/M9V6+W7dLe51//yZu?= =?us-ascii?Q?REfHu2rx+5jDAMxRRmf72DxV3JhWY9pafX2/6R9rqmEe48p7/u5b1qYQp527?= =?us-ascii?Q?EHvEJ9WAQdX3hglYTs5sGh9sswFtTDIvdwiGQFaLzVGDpvceNJI3REbOveSJ?= =?us-ascii?Q?PQP4M7wscuQ0EMj5vk1jOSbB5Ng0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Diagnostics: 1; AM4PR05MB3137; 6:SkBwBFnLkD6LEXfKkGQZcXwyG9yyMXVEhG9+5FCTK4mx6zckViPHxpGci0Rk9GQIoFwNNYrPRki2EF6jomiqkqqbP6DLVCJ5E+C4CNgOoO12KqacSk1W7WA5w0T2vu4PWGDmFz9lKFB9iJToCZCtGMcZHZtnRAQ7gJxHXeL4Yz2122UitR3Ycb7PMqgPtrcxop6JIyq6244h0WjUFY0Pj7G5VA3J2cESuf/EHa/ErPCYigrVrjA8Xfyl2t2xa2f/Vi/absOeeSO+scvs4Q3lDaeXvM7MWMUJDOqS9vQWZK/aY46TiGpw2yExDnPK4eA2usTQ7UI08kNvvHHG2VA6vg==; 5:H2Tyf+L8qaeSdwKs4aPfqripzNYWTHUEiWYPt/hj0SxE+IS76R0aB2qURRJridrR28Ssrg0+zS2IJictEiINoxxzBoPOmwfIMYcZqVUr5o0ep02h5S2Fk8PZPojbdzDTkhDUbozbCnHxErnTIUKgKg==; 24:12oVvKv7cWYUf2S3BkNl2Dxhz03hVzIhtZQmrjv8kqMUe11xvvLmOxm/DA2/ZsRaqiWu5aLc9jU3Curxdj3QST8Ii8HVfG7S9cmkrmx82Xs=; 7:OnPXDpGuFPD2IW5xDNpNhkv4SO6tHc2202TMfH9hiihuNA4FmgGVrsFRe4RbfH9S2focOSiNEN5mxKL1Qmh2K/a2hi4MOYuoSNXzCbKBwqAcXUm4h3KW5WL8ayZCIUxxsFU4U395MVgryBIGRXOAnuk7uoo82ED55Or5pdoixemnRIMeVYMROyW0V/zIKRb9exF7d3+VjYR96yyw+UNrCbYMPTQhbIuniPLLWdcbCEs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 10:50:45.2522 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3137 Subject: [dpdk-dev] [PATCH v5 1/4] 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: Thu, 14 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