From patchwork Thu Mar 31 13:38:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Kulasek X-Patchwork-Id: 11856 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9B7168D4D; Thu, 31 Mar 2016 15:38:19 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 35E378D3D for ; Thu, 31 Mar 2016 15:38:18 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 31 Mar 2016 06:38:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,422,1455004800"; d="scan'208";a="945259655" Received: from unknown (HELO Sent) ([10.217.248.31]) by orsmga002.jf.intel.com with SMTP; 31 Mar 2016 06:38:13 -0700 Received: by Sent (sSMTP sendmail emulation); Thu, 31 Mar 2016 15:38:12 +0200 From: Tomasz Kulasek To: dev@dpdk.org Date: Thu, 31 Mar 2016 15:38:08 +0200 Message-Id: <1459431488-5408-1-git-send-email-tomaszx.kulasek@intel.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Not all tx ports was included in tx_port_id array, used to periodically drain only available ports. This caused that some packets remain in buffer when application stops to receiving packets. Fixes: 52c97adc1f0f ("examples/l3fwd: fix exact match performance") Signed-off-by: Tomasz Kulasek Acked-by: Konstantin Ananyev --- examples/l3fwd/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index e10dab9..92fda3b 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -836,7 +836,6 @@ main(int argc, char **argv) unsigned lcore_id; uint32_t n_tx_queue, nb_lcores; uint8_t portid, nb_rx_queue, queue, socketid; - uint8_t nb_tx_port; /* init EAL */ ret = rte_eal_init(argc, argv); @@ -876,7 +875,6 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "check_port_config failed\n"); nb_lcores = rte_lcore_count(); - nb_tx_port = 0; /* Setup function pointers for lookup method. */ setup_l3fwd_lookup_tables(); @@ -954,12 +952,10 @@ main(int argc, char **argv) qconf->tx_queue_id[portid] = queueid; queueid++; - qconf->n_tx_port = nb_tx_port; qconf->tx_port_id[qconf->n_tx_port] = portid; + qconf->n_tx_port++; } printf("\n"); - - nb_tx_port++; } for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {