From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0046.outbound.protection.outlook.com [104.47.42.46]) by dpdk.org (Postfix) with ESMTP id BD9989E3 for ; Thu, 27 Apr 2017 11:28:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=a/qOtbN/CmWAcTKbgx2ZadMzyZqizN5rrQ8OBV0v9m4=; b=I1Qv93ueclEIQerfzHLE7r67QmJjOky5umaV73OBBTtL9QSoaEW1IkyuBnK2cJpq+NsaCt313K0VUVowHcbbnXeB09wIuHNGqdw6btJgcgdKQK5pyrZScNP3fDdhQn4IS2th+IF8oSX2CT8efKpoGwepqNWu9RoJ5pFmKocEGJ0= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from b.semihalf.local (31.172.191.173) by CY4PR07MB3510.namprd07.prod.outlook.com (10.171.252.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Thu, 27 Apr 2017 09:28:49 +0000 From: Andriy Berestovskyy To: dev@dpdk.org Date: Thu, 27 Apr 2017 11:27:54 +0200 Message-Id: X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: AM3PR05CA0130.eurprd05.prod.outlook.com (10.161.123.32) To CY4PR07MB3510.namprd07.prod.outlook.com (10.171.252.155) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 193fd433-a08f-4703-9d3d-08d48d4fd061 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR07MB3510; X-Microsoft-Exchange-Diag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axaeOh+ZHRhI6AzazInDm3YmjIBQS75SZjittfBBvJ1C7+tcFGX2MraWwgBh9DPq5FFPltuVXu2UsMxJw6B69tSJb153YPZCcwgvRZQTIHK3KA=; 20:wxrpE/i3gEzDU4xoblNFJ/mgcQts5EeiYYOcffqAS51+NQ1a7GggvQ7LR6WM4mnkRcfi+ggeBNAyBRMUhD2fMOvgBUSgTOYy3k6JyYdWEpidMeKy4YCME+x0x22DDLXuLc7MkBVgrlYknDSt/G6jT6S1iXHNz97e7xEw8UDawr5yvoSNapzV5ELdhY8VhK2olvf9EtbmGobcsUlyyFVWVk0Ev+nLwdlX0auEj2fYYa8YrRr5IeDtMRIiGNtf/6M7zV3QyCL85FS23pWJCRGLnl0/sm4EW1TlcVhgtNciVKjk7G4AygZKKV4kaZNlqBGpZ8jbD9xRydE1Nwfpdiw7tuUnobsZkKGVVLuNXgJH2DdAJieLUFZC8CcPGEV9gsDXVY3/VbNNI92EOLFLejXm9ELd9ToL+oY1hv3SJSpvJkUL5A7mtAUumdH+NVkyClwIRjZNmK8tuDZ+PdRqiV9lUCKGXancSH/ZnzF9/tO0dAU4MGC0JkI3w1N29c3GFmsZM6CtS64u/DUB9OBlSiYmSTdbC9iI7hC3dW9QiD6OtA5LWVS/lUbKgi2aKujbUzE9WsdpzYoOUTpOYeHgALh5dOGllTVvKrZGTMWiiSad8Fg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:CY4PR07MB3510; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB3510; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3510; 4:2SZbk11BRgP4V9qq9V1cbMAVgOJi2qisYe6HK6ulM3WbnYoxiLa2KtQGz2TTugRQrElrZuie7HsOB5x8Fx13WAzCA3WGRVB+Bywp0BzzkEHKRJCNTZKMGvE/Y/uT53JG2pYIt5oG4pjNrwdyzdMOEhCyy7sbPL6sdvmOyHRhy3EeGf7pc/m1y8JeJzDZ/Dljxa2eG0A7Pn9tau9gO9Zps1Z86XSwdy+yAffMtD0BsVyANr19B1H/MAOdyz0IzXGIqbwFmEI7q66xLwa/cSe3a+erEw5OH+tMPXFJnvV1d4doO6XeNEHYm/Q4W55vLrCBC2Y89xSHNQvHFXuhMymY4LmyQHMkwq7leZF7oNsvXW857EOz2Psha5VRBW6rngiY7upfk5bXC0rcJ+DnO62XXpONahGtYwdMODjER36jnRJ2sfAQQ/sTsrc51j5Ith8q63EmQAZQAZenSHly/8GQFmOb4gWIXRObBwq/jjvULudykmg8E8DS1VVgAHohzHwsFk5/DONbYzrjn1mHwI26XVJnFHpa2sys4Ak/QldXXYyctJQuWOtw/B29SaneTeGOgaczgXAq61C4/BTzPgWmGequwalYVQaq1CqhrqRK8AML8kcx/gYzadyESu2UFLo8eR1mNk+qlu27dJmCgUK0tjXnSn7ipYUHTmGVnsUVcVUWs1J+puVYw0EX+MJ6wnE2 X-Forefront-PRVS: 029097202E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(50226002)(5660300001)(118296001)(6506006)(2361001)(8676002)(6486002)(81166006)(50986999)(5003940100001)(25786009)(36756003)(53936002)(2906002)(305945005)(6512007)(6116002)(189998001)(3846002)(47776003)(42186005)(38730400002)(110136004)(48376002)(2351001)(50466002)(42882006)(6916009)(7736002)(66066001)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3510; H:b.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3510; 23:TnTQpBxH0QbBSmdOiFK41mYPLTMErLb6Df0SJSndN?= =?us-ascii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NgqSrkmO1Ck6tCthLYhC97MnG+9HpOqniuGpqFL5huKa6xzQ2FKSjUD2Io2jU7P8+Z3JF4YWGRdM2zAkZXxiJDezb4WGdcEmuZLIVSxmdcdGyWX/zLQlLgf3TIz+oQ6pV00RgjEUOtyB68cBzJm4tJk+Sg17O6hcwCRYmZzLl2iOBAnwmV5E1OrXW/8U5ILaM53WTe82HTqOQQBYunDDRQdT6iLEfAJlpbNtRMkeK2UtKJ8Kc3ryVC+Loux12/yz7RgwCQeayfQv87ZDn7NhbT6+drNQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2017 09:28:49.9380 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3510 Subject: [dpdk-dev] [PATCH] examples/load_balancer: fix Tx flush 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, 27 Apr 2017 09:28:52 -0000 Port ID is not an index from 0 to n_nic_ports, but rather a value of nic_ports array. Signed-off-by: Andriy Berestovskyy --- examples/load_balancer/runtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/load_balancer/runtime.c b/examples/load_balancer/runtime.c index 8192c08..7f918aa 100644 --- a/examples/load_balancer/runtime.c +++ b/examples/load_balancer/runtime.c @@ -420,10 +420,12 @@ static inline void app_lcore_io_tx_flush(struct app_lcore_params_io *lp) { uint8_t port; + uint32_t i; - for (port = 0; port < lp->tx.n_nic_ports; port ++) { + for (i = 0; i < lp->tx.n_nic_ports; i++) { uint32_t n_pkts; + port = lp->tx.nic_ports[i]; if (likely((lp->tx.mbuf_out_flush[port] == 0) || (lp->tx.mbuf_out[port].n_mbufs == 0))) { lp->tx.mbuf_out_flush[port] = 1; -- 2.7.4