aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorCarolyn Wyborny <carolyn.wyborny@intel.com>2015-02-06 03:52:09 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-02-24 23:44:40 -0500
commit88eee9bc540683b425033ec494afe1219e5df054 (patch)
tree607fcc60e6c0247ddcf92c3ae1df58963690d5f7 /drivers/net/ethernet/intel
parente827845c7deefbd9b6530ec1c91c0215b0ed4a7a (diff)
i40e: Add method to keep track of current rxnfc settings
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>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h5
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 5912fdf506a7..3ee730dab82d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -1,7 +1,7 @@
1/******************************************************************************* 1/*******************************************************************************
2 * 2 *
3 * Intel Ethernet Controller XL710 Family Linux Driver 3 * Intel Ethernet Controller XL710 Family Linux Driver
4 * Copyright(c) 2013 - 2014 Intel Corporation. 4 * Copyright(c) 2013 - 2015 Intel Corporation.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -505,6 +505,9 @@ struct i40e_vsi {
505 505
506 /* VSI specific handlers */ 506 /* VSI specific handlers */
507 irqreturn_t (*irq_handler)(int irq, void *data); 507 irqreturn_t (*irq_handler)(int irq, void *data);
508
509 /* current rxnfc data */
510 struct ethtool_rxnfc rxnfc; /* current rss hash opts */
508} ____cacheline_internodealigned_in_smp; 511} ____cacheline_internodealigned_in_smp;
509 512
510struct i40e_netdev_priv { 513struct i40e_netdev_priv {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 5854460a34ff..5ef77dd3763e 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)
1741{ 1741{
1742 cmd->data = 0; 1742 cmd->data = 0;
1743 1743
1744 if (pf->vsi[pf->lan_vsi]->rxnfc.data != 0) {
1745 cmd->data = pf->vsi[pf->lan_vsi]->rxnfc.data;
1746 cmd->flow_type = pf->vsi[pf->lan_vsi]->rxnfc.flow_type;
1747 return 0;
1748 }
1744 /* Report default options for RSS on i40e */ 1749 /* Report default options for RSS on i40e */
1745 switch (cmd->flow_type) { 1750 switch (cmd->flow_type) {
1746 case TCP_V4_FLOW: 1751 case TCP_V4_FLOW:
@@ -2012,6 +2017,9 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
2012 wr32(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32)); 2017 wr32(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32));
2013 i40e_flush(hw); 2018 i40e_flush(hw);
2014 2019
2020 /* Save setting for future output/update */
2021 pf->vsi[pf->lan_vsi]->rxnfc = *nfc;
2022
2015 return 0; 2023 return 0;
2016} 2024}
2017 2025