diff mbox

[dpdk-dev] net/enic: do not flush descriptor cache when opening vNIC

Message ID 20180404235455.17241-1-johndale@cisco.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

John Daley April 4, 2018, 11:54 p.m. UTC
From: Hyong Youb Kim <hyonkim@cisco.com>

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 <hyonkim@cisco.com>
Suggested-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/base/vnic_devcmd.h | 1 +
 drivers/net/enic/enic_main.c        | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Ferruh Yigit April 6, 2018, 4:40 p.m. UTC | #1
On 4/5/2018 12:54 AM, John Daley wrote:
> From: Hyong Youb Kim <hyonkim@cisco.com>
> 
> 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 <hyonkim@cisco.com>
> Suggested-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>

Applied to dpdk-next-net/master, thanks.
diff mbox

Patch

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);