From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by dpdk.org (Postfix) with ESMTP id DE2E01C906 for ; Thu, 5 Apr 2018 01:55:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1619; q=dns/txt; s=iport; t=1522886106; x=1524095706; h=from:to:cc:subject:date:message-id; bh=ntRil8iT13d+lGGLI6I9vDuNGeVpV152pnU37R1GrRw=; b=SbVekjNW9FV6YhaAWHF11KbR52veKzCMw9yUwzXNxZhNCwJHQYAgaHPg 6bsLUugxDh0rlXFQVIjR5xZoc23FLuZ2JGbIkpchBcQvYBZAuiE9WtVDx Qjb9hF0t0aBAdHIKH06yCJuWDf3lWDmznOSofLXt4OpXHz9GfEKvmY6WP A=; X-IronPort-AV: E=Sophos;i="5.48,409,1517875200"; d="scan'208";a="376614251" Received: from alln-core-11.cisco.com ([173.36.13.133]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2018 23:55:05 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id w34Nt52T031848; Wed, 4 Apr 2018 23:55:05 GMT Received: by cisco.com (Postfix, from userid 392789) id AA66E20F2001; Wed, 4 Apr 2018 16:55:05 -0700 (PDT) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Hyong Youb Kim Date: Wed, 4 Apr 2018 16:54:50 -0700 Message-Id: <20180404235455.17241-1-johndale@cisco.com> X-Mailer: git-send-email 2.16.2 Subject: [dpdk-dev] [PATCH] net/enic: do not flush descriptor cache when opening vNIC 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: , X-List-Received-Date: Wed, 04 Apr 2018 23:55:07 -0000 From: Hyong Youb Kim The firmware on new hardware models flushes the global descriptor cache by default. Use CMD_OPENF_IG_DESCCACHE to avoid cache flushing. This flag has no effect on older models. Signed-off-by: Hyong Youb Kim Suggested-by: Govindarajulu Varadarajan Reviewed-by: John Daley --- drivers/net/enic/base/vnic_devcmd.h | 1 + drivers/net/enic/enic_main.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/enic/base/vnic_devcmd.h b/drivers/net/enic/base/vnic_devcmd.h index 6b95bc488..a63624559 100644 --- a/drivers/net/enic/base/vnic_devcmd.h +++ b/drivers/net/enic/base/vnic_devcmd.h @@ -600,6 +600,7 @@ enum filter_cap_mode { /* flags for CMD_OPEN */ #define CMD_OPENF_OPROM 0x1 /* open coming from option rom */ +#define CMD_OPENF_IG_DESCCACHE 0x2 /* Do not flush IG DESC cache */ /* flags for CMD_INIT */ #define CMD_INITF_DEFAULT_MAC 0x1 /* init with default mac addr */ diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 69ad42555..e908e20f2 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -983,9 +983,10 @@ static int enic_dev_wait(struct vnic_dev *vdev, static int enic_dev_open(struct enic *enic) { int err; + int flags = CMD_OPENF_IG_DESCCACHE; err = enic_dev_wait(enic->vdev, vnic_dev_open, - vnic_dev_open_done, 0); + vnic_dev_open_done, flags); if (err) dev_err(enic_get_dev(enic), "vNIC device open failed, err %d\n", err); -- 2.16.2