From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5EA4F9A92 for ; Fri, 1 Apr 2016 04:09:00 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 31 Mar 2016 19:08:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,425,1455004800"; d="scan'208";a="935933203" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 31 Mar 2016 19:08:58 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u3128vma031868; Fri, 1 Apr 2016 10:08:57 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u3128sPC007658; Fri, 1 Apr 2016 10:08:56 +0800 Received: (from wenzhuol@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u3128sKI007654; Fri, 1 Apr 2016 10:08:54 +0800 From: Wenzhuo Lu To: dev@dpdk.org Cc: konstantin.ananyev@intel.com Date: Fri, 1 Apr 2016 10:08:54 +0800 Message-Id: <1459476534-7624-1-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] igb: fix i350 VF RX issue 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: Fri, 01 Apr 2016 02:09:00 -0000 A problem is found on i350 VF. We found TX will happen once per 4 packets. If only 1~3 packets are received, they will not be forwarded. But the real problem is on RX side. The reason is the default RX write-back threshold is changed to 4, so every first 3 packets may be hung there. This patch checks the RX wthresh when setting up the RX queue, and forces it to be 1, so every packet can be handled immediately. Fixes: 4a41c17dba18 (igb: set default thresholds based on MAC type) --- drivers/net/e1000/igb_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index 529dba4..4a987e3 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -1466,7 +1466,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *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) + if (rxq->wthresh > 0 && + (hw->mac.type == e1000_82576 || hw->mac.type == e1000_vfadapt_i350)) rxq->wthresh = 1; rxq->drop_en = rx_conf->rx_drop_en; rxq->rx_free_thresh = rx_conf->rx_free_thresh; -- 1.9.3