From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0DC3637B1 for ; Fri, 7 Apr 2017 10:14:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491552897; x=1523088897; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=pbR4z6adNzjUYf2e+454JfW2uH4vNL0mh6J7ObQ4AoQ=; b=M9A/Eal3XQ/f8tOIIuhkD54gTgPYh25k1eiI5gs/bEV398GHH0ciR8Y0 v24FNmk34YkAf2z9GeiUlPd1XuquLg==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 01:14:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,164,1488873600"; d="scan'208";a="953273319" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2017 01:14:54 -0700 From: Yuanhan Liu To: Chas Williams Cc: Yuanhan Liu , Harish Patil , dpdk stable Date: Fri, 7 Apr 2017 16:11:29 +0800 Message-Id: <1491552724-3034-12-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/bnx2x: fix transmit queue free threshold' has been queued to LTS release 16.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 08:14:57 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/17. So please shout if anyone has objections. Thanks. --yliu --- >>From a4bd54f9f45ded0453717725d8a3eaebd943a17f Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Fri, 10 Feb 2017 15:12:06 -0500 Subject: [PATCH] net/bnx2x: fix transmit queue free threshold [ upstream commit f078565129809a4737de8eea1b3c4c24f5472c3b ] The default tx_free_thresh is potentially larger than the allocated queue which will result in TX queue cleanup never happening. To fix this, lower the default free threshold and ensure that the free threshold is never greater than the maximum outstanding transmit buffers. Fixes: 827ed2a118cc ("net/bnx2x: restructure Tx routine") Signed-off-by: Chas Williams Acked-by: Harish Patil --- drivers/net/bnx2x/bnx2x_rxtx.c | 2 ++ drivers/net/bnx2x/bnx2x_rxtx.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c index 170e48f..adf0309 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.c +++ b/drivers/net/bnx2x/bnx2x_rxtx.c @@ -273,6 +273,8 @@ bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_free_thresh = tx_conf->tx_free_thresh ? tx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH; + txq->tx_free_thresh = min(txq->tx_free_thresh, + txq->nb_tx_desc - BDS_PER_TX_PKT); PMD_INIT_LOG(DEBUG, "fp[%02d] req_bd=%u, thresh=%u, usable_bd=%lu, " "total_bd=%lu, tx_pages=%u", diff --git a/drivers/net/bnx2x/bnx2x_rxtx.h b/drivers/net/bnx2x/bnx2x_rxtx.h index dd251aa..2e38ec2 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.h +++ b/drivers/net/bnx2x/bnx2x_rxtx.h @@ -11,7 +11,7 @@ #ifndef _BNX2X_RXTX_H_ #define _BNX2X_RXTX_H_ -#define DEFAULT_TX_FREE_THRESH 512 +#define DEFAULT_TX_FREE_THRESH 64 #define RTE_PMD_BNX2X_TX_MAX_BURST 1 /** -- 1.9.0