From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NEDGE.raisecom.com (mail.raisecom.com [123.127.254.69]) by dpdk.org (Postfix) with ESMTP id F24D1F968; Wed, 21 Dec 2016 15:42:31 +0100 (CET) Received: from CAS2.raisecom.com (192.168.0.54) by NEDGE.raisecom.com (192.168.101.139) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 21 Dec 2016 22:41:20 +0800 Received: from lenovo-PC (113.140.251.117) by CAS2.raisecom.com (192.168.0.54) with Microsoft SMTP Server id 8.3.83.0; Wed, 21 Dec 2016 22:39:11 +0800 Date: Wed, 21 Dec 2016 22:39:42 +0800 From: Maple To: dev CC: maintainers , =?UTF-8?B?5p2O6Z2e?= , =?UTF-8?B?5pa95bGV?= References: <2016122121181642100644@raisecom.com>, <2016122121292174988745@raisecom.com> X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7, 2, 7, 174[cn] MIME-Version: 1.0 Message-ID: <2016122122394164225248@raisecom.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Example(Load_balancer) Tx Flush Bug(This bug DPDK each version) 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: Wed, 21 Dec 2016 14:43:25 -0000 RnJvbSA5NGYyZWFlZDUxZTZlNTQwMmU4YzAzYjgwZTA5OTlhNGZkNDIwMzkwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogcm9vdCA8cm9vdEBsaXVqaWFuQHJhaXNlY29tLmNvbT4NClRv OiA8ZGV2QGRwZGsub3JnPg0KQ2M6IDx0aG9tYXMubW9uamFsb25ANndpbmQuY29tPiwgPGxpZmVp QHJhaXNlY29tLmNvbT4sPHNoaXpoYW5AcmFpc2Vjb20uY29tPg0KRGF0ZTogV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