From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fiji.vyatta.com (fiji.vyatta.com [76.74.103.50]) by dpdk.org (Postfix) with ESMTP id 5E5C26A6F for ; Thu, 30 May 2013 19:21:30 +0200 (CEST) Received: by fiji.vyatta.com (Postfix, from userid 1051) id B470DB24005; Thu, 30 May 2013 08:08:24 -0700 (PDT) Message-Id: <20130530171626.764056062@vyatta.com> User-Agent: quilt/0.60-1 Date: Thu, 30 May 2013 10:12:35 -0700 From: Stephen Hemminger To: dev@dpdk.org References: <20130530171234.301927271@vyatta.com> Content-Disposition: inline; filename=igb-workaround-wthresh-82576.patch X-Mailman-Approved-At: Thu, 30 May 2013 23:34:18 +0200 Subject: [dpdk-dev] [PATCH 1/7] [PATCH 4/8] igb: workaround errata with wthresh on 82576 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, 30 May 2013 17:21:30 -0000 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 If not then single packets will hang in transmit ring until more arrive. Simple tests like ping will fail. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_e1000/em_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/lib/librte_pmd_igb/e1000_rxtx.c 2013-03-28 08:50:50.238413818 -0700 +++ b/lib/librte_pmd_igb/e1000_rxtx.c 2013-05-29 08:49:02.369979711 -0700 @@ -1240,6 +1240,8 @@ eth_igb_tx_queue_setup(struct rte_eth_de 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; @@ -1384,6 +1386,9 @@ eth_igb_rx_queue_setup(struct rte_eth_de 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;