From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/15] i40e: Add method to keep track of current rxnfc settings
Date: Wed, 25 Feb 2015 00:58:28 -0800 [thread overview]
Message-ID: <1424854720-18825-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1424854720-18825-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Carolyn Wyborny <carolyn.wyborny@intel.com>
This patch adds a struct to the VSI struct to keep track of rxnfc
settings done via ethtool. Without this patch, the device can only
list the options available, not the current settings and this is not
clear to the user. Without current settings, the available settings
never changing looks like a bug.
Also update the copyright year.
Change-ID: I087bbfdb33b330496a671630a7586773e3b3e589
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e.h | 5 ++++-
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 ++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 5912fdf..3ee730d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Intel Ethernet Controller XL710 Family Linux Driver
- * Copyright(c) 2013 - 2014 Intel Corporation.
+ * Copyright(c) 2013 - 2015 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -505,6 +505,9 @@ struct i40e_vsi {
/* VSI specific handlers */
irqreturn_t (*irq_handler)(int irq, void *data);
+
+ /* current rxnfc data */
+ struct ethtool_rxnfc rxnfc; /* current rss hash opts */
} ____cacheline_internodealigned_in_smp;
struct i40e_netdev_priv {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 5854460..5ef77dd 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1741,6 +1741,11 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
{
cmd->data = 0;
+ if (pf->vsi[pf->lan_vsi]->rxnfc.data != 0) {
+ cmd->data = pf->vsi[pf->lan_vsi]->rxnfc.data;
+ cmd->flow_type = pf->vsi[pf->lan_vsi]->rxnfc.flow_type;
+ return 0;
+ }
/* Report default options for RSS on i40e */
switch (cmd->flow_type) {
case TCP_V4_FLOW:
@@ -2012,6 +2017,9 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
wr32(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32));
i40e_flush(hw);
+ /* Save setting for future output/update */
+ pf->vsi[pf->lan_vsi]->rxnfc = *nfc;
+
return 0;
}
--
1.9.3
next prev parent reply other threads:[~2015-02-25 8:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 8:58 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-24 Jeff Kirsher
2015-02-25 8:58 ` [net-next 01/15] i40e/i40evf: Fix output of i40e_debug_aq() for big endian machines Jeff Kirsher
2015-02-25 8:58 ` [net-next 02/15] i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settings Jeff Kirsher
2015-02-25 8:58 ` Jeff Kirsher [this message]
2015-02-25 8:58 ` [net-next 04/15] i40evf: allow enabling of debug prints via ethtool Jeff Kirsher
2015-02-25 8:58 ` [net-next 05/15] i40e: enable packet split only when IOMMU present Jeff Kirsher
2015-02-25 8:58 ` [net-next 06/15] i40e: Add NPAR BW get and set functions Jeff Kirsher
2015-02-25 8:58 ` [net-next 07/15] i40e: Implement configfs for NPAR BW configuration Jeff Kirsher
2015-02-25 8:58 ` [net-next 08/15] i40e: Add support for getlink, setlink ndo ops Jeff Kirsher
2015-02-25 8:58 ` [net-next 09/15] i40e: Set BUF flag for Set Version AQ command Jeff Kirsher
2015-02-25 8:58 ` [net-next 10/15] i40e: setup FCoE device type Jeff Kirsher
2015-02-25 8:58 ` [net-next 11/15] i40e: print Rx packet split status Jeff Kirsher
2015-02-25 8:58 ` [net-next 12/15] i40e: Set FLAG_RD when sending buffer FW must read Jeff Kirsher
2015-02-25 8:58 ` [net-next 13/15] i40e: Use ethtool private flags to display NPAR status Jeff Kirsher
2015-02-25 8:58 ` [net-next 14/15] i40evf: Add more info to interrupt vector names Jeff Kirsher
2015-02-25 8:58 ` [net-next 15/15] i40e/i40evf: Update driver versions Jeff Kirsher
2015-02-25 23:13 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-24 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424854720-18825-4-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=carolyn.wyborny@intel.com \
--cc=davem@davemloft.net \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).