Commit 88eee9bc authored by Carolyn Wyborny's avatar Carolyn Wyborny Committed by Jeff Kirsher

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: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: default avatarJim Young <james.m.young@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent e827845c
/******************************************************************************* /*******************************************************************************
* *
* Intel Ethernet Controller XL710 Family Linux Driver * 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 * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
...@@ -505,6 +505,9 @@ struct i40e_vsi { ...@@ -505,6 +505,9 @@ struct i40e_vsi {
/* VSI specific handlers */ /* VSI specific handlers */
irqreturn_t (*irq_handler)(int irq, void *data); irqreturn_t (*irq_handler)(int irq, void *data);
/* current rxnfc data */
struct ethtool_rxnfc rxnfc; /* current rss hash opts */
} ____cacheline_internodealigned_in_smp; } ____cacheline_internodealigned_in_smp;
struct i40e_netdev_priv { struct i40e_netdev_priv {
......
...@@ -1741,6 +1741,11 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd) ...@@ -1741,6 +1741,11 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
{ {
cmd->data = 0; 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 */ /* Report default options for RSS on i40e */
switch (cmd->flow_type) { switch (cmd->flow_type) {
case TCP_V4_FLOW: case TCP_V4_FLOW:
...@@ -2012,6 +2017,9 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc) ...@@ -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)); wr32(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32));
i40e_flush(hw); i40e_flush(hw);
/* Save setting for future output/update */
pf->vsi[pf->lan_vsi]->rxnfc = *nfc;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment