From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0066.outbound.protection.outlook.com [104.47.0.66]) by dpdk.org (Postfix) with ESMTP id 990721B27E for ; Tue, 31 Oct 2017 19:21:59 +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=APMgqsPnij9++X3nYlgqBlTEYsRe6gNfRMbnHeGRi2I=; b=QtGRpI47JlPnACnSsjGSBVBujhSTqKsk0UmIcSqak8Z256uSoEyvltM2vTtvR5Ig+wOiCRGF8ChuNUfp9ifyT4UVskTHl2jwsqI3fUJGOhq6FxHDd1AT5M4O70bU9YHgPgeHDINX0827w7JN7/VlYx6XwlMaDhOClY6GkPBtPwo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR0502MB3664.eurprd05.prod.outlook.com (2603:10a6:803:f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Tue, 31 Oct 2017 18:21:57 +0000 From: Matan Azrad To: Adrien Mazarguil Cc: dev@dpdk.org, Ophir Munk Date: Tue, 31 Oct 2017 18:21:30 +0000 Message-Id: <1509474093-31388-6-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1509474093-31388-1-git-send-email-matan@mellanox.com> References: <1509358049-18854-1-git-send-email-matan@mellanox.com> <1509474093-31388-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0801CA0074.eurprd08.prod.outlook.com (2603:10a6:800:7d::18) To VI1PR0502MB3664.eurprd05.prod.outlook.com (2603:10a6:803:f::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18bf9e96-0801-4cd0-81fd-08d5208c45f6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(2017052603199); SRVR:VI1PR0502MB3664; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3664; 3:8HD8cJ5w9NCDOLjylSSeBLH7lkpqafnH6V1RqeHAlVBBxDFZoq6TIFIGD/KHQ9KYhqEcSDuM/VhXqPX4KjG63MWv4VnJz6kHC/OpnBgMm08GrmBn1i5L6h95cBTGJsI2O4kQSWxiX/iO4MF4OHSPzs5fNx5n1MmYOd4xaa1mSpsdmDKAh5NxUzi4jIUInACmZoDXpKDhOtOAtzOND3t09N6n3jYof67XC6fB5xvXRmSoj1MU0xhVTSsM+Hf6SgSF; 25:p7A02GeVIAKa4hx6sSPxMGIIkAqs65rBtnV8MaUvHdcReZgQcVzSvaumL3CCUSOV9e/RcKxCBXwad9WEYVmHuvdVsDnVL1dhNoEbl2LHOnVNVEmbljiyfBNlGFiJBPq0+sskGSxFlSyUj4YQMN2ArqOW9Ula89iVLuUn9nB1panA5RsskBJinLkAUiTI/x6cCcuz4VE3qmxzpvFRxfjWgL59FtNbkbbzOg8i9A66IfnstWVkaBKCw4au1+TkE1xgQv8ccF6eadUu2jTam5PeiwHE2GC0s58shGWxov8NXDYuq3HG/h5VB5w/4QsSgbl34k5Inx48nvH8f9G5uLf9AQ==; 31:FKCBAfg4ZdbE30xODjlfbDBqzXUsDCJoHLxEsBMjpSQGYtWEh0d65vBdpC2pCLjsjySd35i2Jr9FRL4g3mK7MpT+cRdFwhfumyGJldl1HPGv/mhO2JLZ5Hu9F6QZOerLOS5UcYJj9kXiIJfFZejPszBJ+JkId7U6CiRmhkaPQ7+GuxF8MJSUk8Qwl3Bl+0Lp5yIIGvVbwjmQ/brRO6OhKpCYfuJ12r6Am3fGcbyFOZM= X-MS-TrafficTypeDiagnostic: VI1PR0502MB3664: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3664; 20:bQK2qXU8HDc4N2srju7OWYW3kMUGo6KXIEVwjCA8SXJQHzciTte+Lii8R7fdD8Z4xDoXYVv1DaM+wFgw+HfMZF4SgTlkG50BY5+fL2NVNR+DIJeuxnBvf9mwUmYYeImlic1JhxVHO/AXjGVKHHL1MBu6ReyMP9N8+NdlcAuXb7K83oZBuqB4+3mhVcP+Fkk+SKTZ5zbGsckiQLGueAE5Hfh8gXyZJ8RlH6Af/yeKFSkCFqf1HLpX9HHSXU3Mr+EEq2mQ4fKB9rpjqn330S1/hvxhQ/P5grMhPzXCxK0+/4Iqlv6B1ED5qdzjmYT7qvBinM06Nu9lt4wXNR3NWxDpO722xw+N6mK8ohQS04iEnS0vSMlNE+rfgGBmJ2xTTAp+0+QBsr3UzIrYmbtGCVLbbuVlSiGfIOljCTxJzT+lCoi/Ybk10AxBdoGH5z1Hl1ontZfaxWKq56GWy0mKW8tzRJ1Pt1vSU4GyaQg04IrNEDplgGZaG2C/MhmS8qszV0GT; 4:ZAkqYFkwSeONHMjLWMgqPRuQi06LrgkltWs0wrHt4A++k4gbtigGHm9oW//rc3NYdiH57lSVJm0FLGNClxHNkRKEjTRUkybZrUnPyb/QDMyDHCm4W+Uuvaa2ZJGevdPPayqObz3karrcbY/Mk1hQslQHWAhm5DWAHiz7PkUDGWJRtjst2CS6c2FacDXZ3HmgXQ3awBlibkSaaSIR8u+gkUeVGBZYUpZt2At25y60Mr/Kh5M/Qavk5emIWZ/LYqVM6pmZIUXbiF2lN6mLCeTdgIHiuSVPeUPd2X3CZL4eHiHB6AZ9vBeRWvDRH0+MPFvz 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)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231020)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0502MB3664; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0502MB3664; X-Forefront-PRVS: 04772EA191 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(189002)(199003)(50466002)(97736004)(66066001)(478600001)(189998001)(36756003)(33026002)(25786009)(7736002)(316002)(107886003)(16586007)(4326008)(86362001)(50226002)(53936002)(16526018)(101416001)(106356001)(5660300001)(2906002)(5003940100001)(69596002)(47776003)(6116002)(3846002)(68736007)(105586002)(81156014)(8936002)(81166006)(21086003)(305945005)(55016002)(4720700003)(2950100002)(76176999)(50986999)(6916009)(6666003)(48376002)(8676002)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3664; 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; VI1PR0502MB3664; 23:yJEv8ykRD9yPqpqWAc2qPPIkH7kgsotQjWaAyuS?= =?us-ascii?Q?cgPEhALgLhgV/kGKlFcO1hsMviwMa2OrEW1Ip+DOo7Tv8f7y+VycwFfmL5vL?= =?us-ascii?Q?Y46AI+doP/hDYuyj6Jaq9z8htpXrAK+vtD7nKIYTgQ3hGgoiBEMlnp+MZx/H?= =?us-ascii?Q?wX1ot3cLONDA/ZD/f5bgkKZQJq0xd0qTaScGFwXxQHWUHi29xjqK1FHUAE5z?= =?us-ascii?Q?VvU2jh88jq9jUN6mL9zlcac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: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 18:21:57.8148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18bf9e96-0801-4cd0-81fd-08d5208c45f6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3664 Subject: [dpdk-dev] [PATCH v4 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: Tue, 31 Oct 2017 18:22:00 -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 --- 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 0759e51..0a6cbf1 100644 --- a/drivers/net/mlx4/mlx4_rxtx.c +++ b/drivers/net/mlx4/mlx4_rxtx.c @@ -257,7 +257,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; @@ -273,8 +272,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) { @@ -473,7 +470,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. */ @@ -487,7 +483,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