From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10067.outbound.protection.outlook.com [40.107.1.67]) by dpdk.org (Postfix) with ESMTP id 002BF1B31B for ; Mon, 30 Oct 2017 11:08:05 +0100 (CET) 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=zAAsCz1QcDu3PbCoVRU0C80oMR6sxDKz0OikAypQjww=; b=WElbZmqbtGZ6Sby3eM+ZCrza6KNK43AclpmWXYdSX0KM6z3de8lyPI5cLAWnxI+hMoScJsq/f6dJgGK4TaihP0PA05SUXoPtCTiyHfXrQRa5QkMuiCRolmUlUczFtOaTqz7LdyKSqUiMm9Ok4B5blZG0R2vKfghK0fsdSVnMgGA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR0502MB3662.eurprd05.prod.outlook.com (2603:10a6:803:f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Mon, 30 Oct 2017 10:08:03 +0000 From: Matan Azrad To: Adrien Mazarguil Cc: dev@dpdk.org, Ophir Munk Date: Mon, 30 Oct 2017 10:07:29 +0000 Message-Id: <1509358049-18854-8-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1509358049-18854-1-git-send-email-matan@mellanox.com> References: <1508768520-4810-1-git-send-email-ophirmu@mellanox.com> <1509358049-18854-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR08CA0217.eurprd08.prod.outlook.com (2603:10a6:802:15::26) To VI1PR0502MB3662.eurprd05.prod.outlook.com (2603:10a6:803:f::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99aa841e-a63d-4659-753b-08d51f7e1c54 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(2017052603199); SRVR:VI1PR0502MB3662; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3662; 3:auDjVxUmy0WIIk11IWsDaLpJxFvZGN4LRNNIGkEulMSrX9Y2wtavOwsY1YJZzdOy85tsYeUo6exqUU6AJHSB85IhRgfB9V7fesdUN2rNpBxvQyzznJOWsIMpBhInjgWipoyUX8/jWgRIiw6NMXtrcGnfibaQrP7OeZpgw/3NhgjNwksWzrVWBMN+qffYh6dTwdRAh+3w4xaS8ZrmHyRsD3DSFpkqNd6SMWtcjj29jRL528F/AwJWQspNZr/WfNR9; 25:SmYqvVabRVGvesoYT3JytsJM6rUQ5V6ir5J6aV1eqd9tCLaHBylmW2YQ+5JHnqMC7LUDd4lPFqIIod1yEHGVUR16r7iuKjs85zV06y5DHlX66ZGtnacD1zVRksB5yBoymaHe0/kwPv7KOQVf6iCv5a3lP2kC8wVhgoFISxhaI2fBnYE06v+rprTam7e5cHvdLSMxfktd7SjVNV7+OpyHaIDNhntx9QRNGDJXVBLdMQ6F7ZJuKTTL4svW6i8q0EERVOYAAvXWeD2GfjUXjusZM/DCfjSOtyC6ImYm81ODhEsavjNvqNKqK408+ChcKPRwsEEa119YwWdyFIUL6+at8Q==; 31:pPfzN7Clb6wYC3d3Bmr8BJuHfrYfADij6H2O63rTIsbkpsfYwhpi+J4MzytRmiyQs1OnCkLZVM56Nxs5M/TAolSX1VvHTtNa3W6yhrT4un0suLAWvwXUsGieXDWuNe6PZjrvkHPUWs0q7iCd9RFYZQPyLqAV/ZeUVcEQBAGBC9XOcbv6PLLiigoEF2Jups0OaS1JRyKdYAwUeAN5XmrJJHU+pByezYB84o5DWullVbk= X-MS-TrafficTypeDiagnostic: VI1PR0502MB3662: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3662; 20:poSkq8WgzFti6FaQNsCsNe+6YvpCLbMechzXJ595CaHYIp0nHfkK7F6GFNu8VN6BiIQHqPmKc0mi9RfF5d0xIlUI2pU3Pjp7S/xXmtuKBZ0Vc3HNaHoakozGP49eFgq/ueg+JSXeVDMw7dQG7ukVQfwXAAqtuILOQJeO2vHq5Ic28bsE0JP0rm2Fb4ho/GSjJFGLvZfsjKtaBiCbs57EwaZZFEVTl4ijYLJwtPFjzQM1aSU/XALUTbJRBs/kCnwhjPOSWOrFiVe65NOncNjo9rd4DuYN3fSneTcPBwhe/L2b19DKvDb1GTEMz6OG3xWJXkMUgKQ1r0N42cWh68jYLyOHsC3iwyBxEH4FLAXibk/M/1ktby3GGgroZTvSvf/thTA3g7/ZpgkmSnCmiw1CEcWMgtKwk5IP8L4pSu0vmZhsyef3H+UB1cdKNDIgUelrVOcw8bs6QIvakfv7ohYR/+Jerox+fkMaAtQsuBgal6uHJZFnozugNQeaR3sJ7MZa; 4:Omfsf1kheQuMNlYLJK0T3MvZ9I6xQSeRA501HzFpfFEgtH00CtxBRdMzH2ArpzSUWjNtCzwZ/e8TuSvU+8C5gioDkK03Xs8Lk51erOCgy84xcWypVRX8Sa+qiS3baSJwDFKtkgo38buNsCBwLOo19Uk9dFY7GTH6Xr6GUpBsWQ8aPVGZrzTf6IOdNPaIQkL+uAStCu45ogFogJWam5WqQzYwTN9o2xgsjraEkcBQ/pCVocjb1rHayGWaQ39mEu2fOEYqaNIGxtDEgQBbCEz5iA== 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)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231020)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0502MB3662; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0502MB3662; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(376002)(346002)(199003)(189002)(16526018)(97736004)(66066001)(47776003)(21086003)(5660300001)(4326008)(50226002)(316002)(53936002)(55016002)(4720700003)(6666003)(16586007)(6916009)(48376002)(36756003)(50466002)(2906002)(7736002)(305945005)(2950100002)(106356001)(101416001)(6116002)(3846002)(69596002)(68736007)(33026002)(81156014)(81166006)(8676002)(105586002)(189998001)(33646002)(107886003)(478600001)(8936002)(5003940100001)(25786009)(86362001)(76176999)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3662; 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; VI1PR0502MB3662; 23:mh7cf2jtzTxVM3xkF+vQS6XLuAFpBjSxA6Z4thi?= =?us-ascii?Q?0RBNMsR10A6gvgLDYsp/v5D0S5Bib6v2NyZYhPGWsq2IxRspW8/Fv6XrKyKh?= =?us-ascii?Q?bl7LAWK65H2ynRkqVOIlA7oVEyJMmTw6Z0eX3WXItzd1fZMFb9fBcvqQ4EMb?= =?us-ascii?Q?fol135gqwIBEQzt5xT2KCz2vCFkX0TRtYjuEoUfvGRAFc+4gA1cW0OD6UDTb?= =?us-ascii?Q?fg1nFdqk99rYwltieKlppO/5P7wdWqSXivvvyZGPvFDkvYtvFlCz4O+3FVif?= =?us-ascii?Q?5Zf679WtTTHPbVAM1Efzan/gH3D6T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Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3662; 6:ZeFFUj3ZG5eDquUHFEa9CNP5ptHRtte1OAFxwKKvVsBbMjOtEOSMa3LkEnPO2w/yKtVoBNE42Dgtg6nYkCGVsNT6N4bTKnMUbN6UViA8OdJSUq70eNRAR0pW1vgbQWD2/8QWT+N+K3kuWdllnqlQTXRYAIRVJn/KD5Ujf/sCFXHbPAbAQ0ShfOPUauduWMVXUQCxuJjoUcF59ufmLf4/XxhPZTpzX286wM/86vqkDQf+cSqvIL4hrY13mkVOwbNbDGGapjEzJpBFEHZQzS3gBHipQR40bQQcKno53P0Tdmw0462JtszjaZdbUb1uv5UiNUNGCb9KJzycFkjPkviJJv1MzJL2Svdp+QEXU1YpiYk=; 5:qfbZFwJj3tYzeGWVnvzzQJtlz6fe5WkuLiyP6cgcJTAlWnbvtZ/C7qICabHH9mvtl0zY5fJeb7UD3CitteUa1NR4QqGUyJHyiNXU7Wn6ofRdDqA0m8SJjwUsXE8noQUEasaLiYKIcXsZLXo0hhmZ/5C03pA8UjTgjyUkV/P5vAE=; 24:vKDI8I23Bcz2ZMZ3n8fqXdy24nQb36tABWA3p5VfAgPE4FEDgrcWb+cr0OPF5krrQexfPbxFARCQgCyttm52AfDkUaTpE8ano6tCcH6YMpY=; 7:NPvXNFP9AVdJFDPLMtxr5e7pWV8wRP+5FS+vCX2dkdq5p76GqTBfuXCaJ/IF2oqO9CbN+vuFqaIjnVREBS/ESenba4wM1J+BucYujisdZwC4TDpnCVJwio1qNbB0p9Dntes1KiYvI+CaHUDd+A51NTqRIZ2Cb9zyBMlmCHKz4ohwFmv/4bhmY9ZZ5vNxSx+vaXAD4RNbpQi82gSo7988Yl2rDO0ud77hasgteQ+ih/ejY+4gqzI2qojnFxxK/mta SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2017 10:08:03.8649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99aa841e-a63d-4659-753b-08d51f7e1c54 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3662 Subject: [dpdk-dev] [PATCH v3 7/7] net/mlx4: remove empty Tx segment support 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, 30 Oct 2017 10:08:06 -0000 Move empty segment case processing to debug mode. Signed-off-by: Matan Azrad --- drivers/net/mlx4/mlx4_rxtx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c index 482c399..c005a41 100644 --- a/drivers/net/mlx4/mlx4_rxtx.c +++ b/drivers/net/mlx4/mlx4_rxtx.c @@ -305,15 +305,18 @@ static int handle_multi_segs(struct rte_mbuf *buf, return -1; } #endif /* NDEBUG */ - if (likely(sbuf->data_len)) { - byte_count = rte_cpu_to_be_32(sbuf->data_len); - } else { + byte_count = rte_cpu_to_be_32(sbuf->data_len); +#ifndef NDEBUG + if (unlikely(!sbuf->data_len)) { + DEBUG("%p: Empty segment is not allowed", + (void *)txq); /* * Zero length segment is treated as inline segment * with zero data. */ byte_count = RTE_BE32(0x80000000); } +#endif /* NDEBUG */ /* * If the data segment is not at the beginning of a * Tx basic block (TXBB) then write the byte count, -- 1.8.3.1