From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id 3CBD3156 for ; Thu, 2 Jan 2014 17:42:30 +0100 (CET) Received: by mail-pd0-f172.google.com with SMTP id g10so14400907pdj.3 for ; Thu, 02 Jan 2014 08:43:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Cox53VzuhBaTWoWGFJQO23lMUz2bme/47Uoy72Nct2c=; b=m3LdEuSRBxrU2HO/cUGclVOn1svGu+BERountRppbsS3f5t6hMQZ13hgob/rI6bdD3 fHQfYWslEXGruVMZIn0PFkB2FkWP+NfMxDtN0mzjy6oc491k0LWWqtNHy7RrVlGbnGzk QN0irms4fVk6QrI67r4iHleUFevWCnpP/I+DPDhzQkSWN13xLYr0e4vf66ThWaJeLUQB 6xPke0pdu2lhf7ywQmM3+OJsPG/GuTmP2BUpNu8H7X0eE88hfBFI3nI1cUDaTHIdeK8c EXJHjVJ+Fbnrhp8JWDQ9Pq3Bwwo28VLf7AAI59hr3F+rLOsK0lQuPPVgqDfck30NFe0e F8sQ== X-Gm-Message-State: ALoCoQk5l4JQEcxKcehAtNKg2wzMuYHN+DXBDzwJloXXmiAXR6okqqaby3Bh827FN/o49c3J6ryg X-Received: by 10.68.172.196 with SMTP id be4mr89663579pbc.12.1388681020416; Thu, 02 Jan 2014 08:43:40 -0800 (PST) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id ic7sm103035093pbc.29.2014.01.02.08.43.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Jan 2014 08:43:40 -0800 (PST) Date: Thu, 2 Jan 2014 08:43:35 -0800 From: Stephen Hemminger To: Dmitry Vyal Message-ID: <20140102084335.1c8240fe@nehalam.linuxnetplumber.net> In-Reply-To: <52A1CF9D.30708@gmail.com> References: <52A1CF9D.30708@gmail.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] DPDK delaying individual packets infinitely 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: , X-List-Received-Date: Thu, 02 Jan 2014 16:42:30 -0000 On Fri, 06 Dec 2013 17:22:37 +0400 Dmitry Vyal wrote: > Hello list, > > For some time I've been writing a custom packet generator coupled with a > packet receiver using DPDK. > > It works greatly when used for generating millions of packets, but > unexpectedly It has troubles generating a several dozens of packets or so. > > The application consists of two threads, first one sends the packets > from one port and second receives them on another. These are 2 ports of > four-ports 1Gb NIC. It's detected as Intel Corporation 82576 Gigabit > Network Connection (rev 01). Ports are connected with a patch cord. I saw something similar with some NIC's and backported a fix from the Linux driver to make sure that threshold was not set incorrectly. Maybe something similar is needed with your hardware or is missing in the version of DPDK you ar using. Subject: [PATCH 4/8] igb: workaround errata with wthresh on 82576 The 82576 has known issues which require the write threshold to be set to 1. See: http://download.intel.com/design/network/specupdt/82576_SPECUPDATE.pdf --- lib/librte_pmd_e1000/em_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/lib/librte_pmd_e1000/em_rxtx.c 2013-04-10 13:59:55.166549303 -0700 +++ b/lib/librte_pmd_e1000/em_rxtx.c 2013-04-10 14:00:44.049915140 -0700 @@ -1270,6 +1270,8 @@ eth_em_tx_queue_setup(struct rte_eth_dev txq->pthresh = tx_conf->tx_thresh.pthresh; txq->hthresh = tx_conf->tx_thresh.hthresh; txq->wthresh = tx_conf->tx_thresh.wthresh; + if (txq->wthresh > 0 && hw->mac.type == e1000_82576) + txq->wthresh = 1; txq->queue_id = queue_idx; txq->port_id = dev->data->port_id; @@ -1391,6 +1393,9 @@ eth_em_rx_queue_setup(struct rte_eth_dev rxq->pthresh = rx_conf->rx_thresh.pthresh; rxq->hthresh = rx_conf->rx_thresh.hthresh; rxq->wthresh = rx_conf->rx_thresh.wthresh; + if (rxq->wthresh > 0 && hw->mac.type == e1000_82576) + rxq->wthresh = 1; + rxq->rx_free_thresh = rx_conf->rx_free_thresh; rxq->queue_id = queue_idx; rxq->port_id = dev->data->port_id;