From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30074.outbound.protection.outlook.com [40.107.3.74]) by dpdk.org (Postfix) with ESMTP id 62DB81B661 for ; Thu, 2 Nov 2017 17:43:21 +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=QynqUDGfryGsnQRvGlpJMUfRWO0TlCb3KktcBt4tqOg=; b=yLZ3kWBweff78/1IA2jRm+2KjifZsjIvNolOA/bbw1EL6K2MC0ZcuPxrqk7jU3RtuHLH6Yj3vHkVVdZT2FG6CCGuecLtMm7sOqwfu86qXLxRwUBCcbswV1fljk+4trMatGCFVgn4qTX4fnFoR17pbCPPwdweHI26WBUAbO02xK0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR0502MB3659.eurprd05.prod.outlook.com (2603:10a6:7:85::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Thu, 2 Nov 2017 16:43:19 +0000 From: Matan Azrad To: Adrien Mazarguil Cc: dev@dpdk.org, Ophir Munk Date: Thu, 2 Nov 2017 16:42:48 +0000 Message-Id: <1509640971-8637-6-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1509640971-8637-1-git-send-email-matan@mellanox.com> References: <1509358049-18854-1-git-send-email-matan@mellanox.com> <1509640971-8637-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0801CA0068.eurprd08.prod.outlook.com (2603:10a6:800:7d::12) To HE1PR0502MB3659.eurprd05.prod.outlook.com (2603:10a6:7:85::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46cf092e-b94b-4cb8-305e-08d52210d314 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199); SRVR:HE1PR0502MB3659; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3659; 3:8FvLkLBI6I/ISk0G/1e0kZRQjbN55iCXQBz7hgc2Svxo6xolQw8MISDowTyojA6xm/hihMahaTAAtXKD7biNAmyhQ+3HI9Z3rfspz3pkR3bpIdGo9tHXYbE/1ocYz0eA8gGvFUttMJ2+kEUrE7Dspd5/7F2wdnVvkOAWmMGzmgCNK6kWqDstG2PI3AGyZxO0EGoPdxJeioWjuEBoBOz7XEtd8l1rer2rK9P6k3ItP5i/hRoFQV2oBn6s8F/8PwWJ; 25:B8U6g9H9KJ2by76BmZlq+x3kkqARPhGkagH0xyetqlzmY1uw8cIGmpPWYyEW8Eia7xuVv4KYg6GN45e0PVSdRJl5UG0hKcwXvMGcI6V+gIiohnEG6ljosUoRjpAfgWe6e1B13hhGfBDQc+pb21MLHGTkyuPKKc/rfSOPMv+ZoLIRDcHHejxxQ5pi8LiEk+l8mU1n5OQrR73CrW2uupSoj9Z/7ODLmvcEHEFkzTFZc+wijbIerKY9PDCVtU0zCcHotHXoI98882Q4SHpLV2kyvcSDJXbcQvM3RL79xZ7i5n7eqxMTuDDyIoW0RiRYfYP1jor5WFqIHnuHftZZqVpodw==; 31:4jDQYbHNd/bpqN9a827SV2XxDey2N/hBmcoRVUeCoVNTtVQJlbteONAVhnDjFQAWn1YOk5NaDspMV4CPYKSx6GPx2KDAiy7tWbwFxfmPbjxrfSHzp5/5ivtCS8RpnO8DMS9AQNzTMh8kdbLGum8sCnes1vwfSfs30DzzA5WRlJ6S5V2/l+LcYGHa6OZyAUjBeTehyqPS6imCUzcsuyUWLhN2AQM9Bhkk3ymi/hf9/fY= X-MS-TrafficTypeDiagnostic: HE1PR0502MB3659: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3659; 20:Z7e/NCi04IX3IhMU4oofwi3u9Op3EUYnsCpvyaL/bYTL/dM470ct75ROLGNiPgXNEY5gZeb8xrqXVYUBG9VvhOgX7sGNOL+PfHRUVpVJolLWXDN71+dxp7Ju3w8M6ElXUAQKkW7mjLT7Oh+yqVxAyM62iDkxeyFno77UlutVtNI1z29W3x6DAMRcRQtlWn3FFJNnqfpDDEWBAgJPZnnZl85qi6rW7jueO0lA3+HE0tx5RaQV3/sNXElukkNlh2nNDT1Zec8j2OICMM9FBfb/enQKIKEnNQZFsSNTN+rjRvurgh5qkqjkZNmT8iOusHohNHWzx64pfhZa1fxSc5VOyV4n3qD1odcODl1nHyuEy7yOcX8IBXLs2xa+QLsbKvU4EjJBE3382PZh9ewEUcXbPWp5319F/WTDm/68KArSOGl34Gw7eR/nrrQB5plvNqpi1EFeoYaytydVi0o4TmEG2iFvwcUgJx8suD3q92WMzhidJ8VEjitL3BiU67CRov5H; 4:axaDOducBGmlAmMgGgFthwRO0Dz4qR/lZBfHVi7Ip12b71YGDwS4ypeSvoykdsGaGaFLN/n+RtKKiNfpomPaXp78Oyqs5JO1BANH46TRfFzhRrrLHhQWAqKXjevLoQJ5OMaXBne5RLv8fhzIV+GuNmzQKX8egXM7AlOzZocrThkHfmA0dam8V82gONB3eENuQ/7lZl6SmK27myutIhkGwx+GY7irQbbQNjW5ppXV/gHGexYpVa6P91lQj0cZIdUVS/WU8+RJHuY42PrNHZMaGy9H9LkjF0Zvkgy+XZS/VUDA5Bp2r8wwkQet1yo7DJ6y X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); 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)(3231020)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0502MB3659; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0502MB3659; X-Forefront-PRVS: 047999FF16 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(189002)(199003)(16586007)(50226002)(316002)(106356001)(105586002)(101416001)(21086003)(25786009)(8936002)(478600001)(4720700003)(8676002)(81156014)(189998001)(36756003)(33026002)(81166006)(97736004)(4326008)(5003940100001)(2906002)(55016002)(68736007)(33646002)(5660300001)(305945005)(107886003)(7736002)(50466002)(53936002)(48376002)(66066001)(16526018)(2950100002)(6916009)(6666003)(50986999)(47776003)(76176999)(3846002)(86362001)(69596002)(575784001)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0502MB3659; 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; HE1PR0502MB3659; 23:0cu0Cwmqzjrut5snNLhGpRQrxtER2IJ07EFiUMI?= =?us-ascii?Q?GEznBXcjGPTryCiu8O7V4U1zYyeIS5awCE0bbfQrmPjXT0BUuACRRPy/uvh0?= =?us-ascii?Q?ujzvz14gnrwazTXl+CQ7769nU31Sk1vrc/7hB5jCcm/YyFEeQLSeXgSvOVH6?= =?us-ascii?Q?Ngtn0+RkSrGV+qco+nDDoB4zVqJL921k3h/g3BjzGUf2yW1WBJ1BFCbjW+ZU?= =?us-ascii?Q?63f+OFkGI4W41pMLj1o+pwqk+7/7jpXFMowUnaKLm5W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nYpfZInZQl1YAvWrBSzXPTDFn/pqz/uJ+mtwBjQw5h4K6Qvji?= =?us-ascii?Q?xbWmycNooEXHw2tE=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3659; 6:JUEv7EsGi+kJOcdgrMsZH2spoD6uGtSX7otB/Bw7wcpDHlryhnnXmemE9iA8t/E0DDlq5Ee0p7CIlj/sq00KUac9EPVrdVCbrwU16sB72Rj8YTTzUXpYh/kZFZYoyXh/MYd1C5DZcns4Vftju3m87/ldctii/3qk89E7dUeBL2kJoS7kxnvRwLjHjvOjNXazj3xx3YkisrVzADojKlkne06y73/1pHoqVYTeomE+3+ErRvzN+5NdU/H2rUl/W0UNTErdB3bVlT9+A/aRI0ivDPkgjq3AsgEYJgJOJRb36rVsj5wAlXyqgtDSMzLnUmKlI0jhBGQT99ABcenn4ELHXc1hBYt9T+JrM6DxUluG9r8=; 5:/O/H5x+R+/sO3TnfeK3K0h77pe1q4xvKONJE0OdHg9fdyaP39q4YcWC+FCo06eL0EnMMoObhfeDvSpIIwK0K/cl62IFv9fpST9pEgkO2soX8L7i8E48fSwJHBEiD+jG3zJp5FO7F1jAvdLLiV040VblonTHIAKcV6vWJiCRtamM=; 24:C7GH0RjTQ25uxjin8qAfOBohFpHT1sxYGFDPvnH7Z/8PnCzpRKNiw2Uut64b1EJ6PoJsivxQnACsykiw+W13rUFUe8cDqBnBxWAX1GqZ80I=; 7:UuSo9MiZQLFEp+qsU1oUV6GpNN64TXlw2jCDHnTLOZpfN4sHtJI/nko0OHNNSuvA3OaToehS0RotqpCS+xgE98WP0cjxonyFV9fqEaRRvfoHS5wKFqYDqNTAWWZpWE+Qcwh8L94MFp+ZZZOzkSRbPODuy1plPPEGj+J3bOP5+liusg323ob+P6bj1ZnQVZu3Su/jxh/F39GLz24vwBV8OpAYlhcezCWF2mweUtl31I38qoViTKOLhl5JeHbA6TPe SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2017 16:43:19.1273 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46cf092e-b94b-4cb8-305e-08d52210d314 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0502MB3659 Subject: [dpdk-dev] [PATCH v5 5/8] net/mlx4: remove duplicate handling in Tx burst 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, 02 Nov 2017 16:43:21 -0000 Remove usage of variable which count the packets for completion and doesn't add more information than packets counter. Remove no space in elements ring check which is already covered by regular Tx flow. Signed-off-by: Matan Azrad Acked-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4_rxtx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c index e0afbea..abd125f 100644 --- a/drivers/net/mlx4/mlx4_rxtx.c +++ b/drivers/net/mlx4/mlx4_rxtx.c @@ -256,7 +256,6 @@ struct pv { struct txq *txq = (struct txq *)dpdk_txq; unsigned int elts_head = txq->elts_head; const unsigned int elts_n = txq->elts_n; - unsigned int elts_comp = 0; unsigned int bytes_sent = 0; unsigned int i; unsigned int max; @@ -272,8 +271,6 @@ struct pv { assert(max <= elts_n); /* Always leave one free entry in the ring. */ --max; - if (max == 0) - return 0; if (max > pkts_n) max = pkts_n; for (i = 0; (i != max); ++i) { @@ -472,7 +469,6 @@ struct pv { sq->head += nr_txbbs; elt->buf = buf; bytes_sent += buf->pkt_len; - ++elts_comp; elts_head = elts_head_next; } /* Take a shortcut if nothing must be sent. */ @@ -486,7 +482,7 @@ struct pv { /* Ring QP doorbell. */ rte_write32(txq->msq.doorbell_qpn, txq->msq.db); txq->elts_head = elts_head; - txq->elts_comp += elts_comp; + txq->elts_comp += i; return i; } -- 1.8.3.1