From patchwork Thu Nov 12 05:51:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leyi Rong X-Patchwork-Id: 84042 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C0C3A09D3; Thu, 12 Nov 2020 07:09:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 117B4592C; Thu, 12 Nov 2020 07:09:00 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 211765928 for ; Thu, 12 Nov 2020 07:08:57 +0100 (CET) IronPort-SDR: +5CtEzKpaUtDH8005qdhVp/jvy3nIRdPrxz4bRVDTSE525XiPDRP7lmu98/SGXcja0mQmZxQY9 1cTPoSqQYSnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="150114906" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="150114906" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2020 22:08:55 -0800 IronPort-SDR: A76eVEOJGUSIv/6/2UCwxNgjyAZaOhv9++eK9laRaHefNW3KHUVzMT79dza5VjToPiHT9eG45S wToZ4p0gh/bA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="542121996" Received: from dpdk-lrong-srv-04.sh.intel.com ([10.67.119.221]) by orsmga005.jf.intel.com with ESMTP; 11 Nov 2020 22:08:51 -0800 From: Leyi Rong To: qi.z.zhang@intel.com, wenzhuo.lu@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Leyi Rong Date: Thu, 12 Nov 2020 13:51:54 +0800 Message-Id: <20201112055154.40369-1-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/iavf: fix performance drop after port reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Needs to reset rxq->rxrearm_start to 0 when reset_rx_queue(), otherwise, the random value of rxrearm_start will cause performance drop due to L3 contested accesses. Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Signed-off-by: Leyi Rong --- drivers/net/iavf/iavf_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 8f43208c80..21d508b3f4 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -195,6 +195,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq) rxq->pkt_first_seg = NULL; rxq->pkt_last_seg = NULL; rxq->rxrearm_nb = 0; + rxq->rxrearm_start = 0; } static inline void