Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/jkirsher/next-queue

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-11-25

This series contains updates to fm10k, i40e and i40evf.

Alex Duyck fixes up fm10k to use napi_schedule_irqoff() instead of
napi_schedule() since the function it is called from runs from hard interrupt
context or with interrupts already disabled in netpoll.

Shannon cleans up i40e and i40evf unused cd_tunneling parameter and any code
comments that refer to it.  Then clean up a few instances of BUG_ON, based
on a Linux diatribe, especially when WARN_ON can be used.

Helin fixed a issue where using ethtool RXNFC command could let receive
flow hash could be set on disabled queues, so resolve by returning the
number of enabled queues before setting RXNFC.

Anjali fixes a MSS issue where the hardware/NVM sets a limit of no less than
256 bytes for MSS, yet the stack can send as low as 76 byte MSS.  Fixed the
issue by lowering the hardware limit to 64 bytes to avoid MDDs from firing
and causing a reset when the MSS is lower than 256.  Added a statistic to
track how many times we forced to do a write back on transmit if the
number of descriptors pending are less than a cache line.

Catherine fixes link status changes, where polling would only change link
status changes in one direction depending on what the last old data saved
off was.  This was due to the watchdog only calling link_event and not
handle_link_event.

Mitch cleans up and enhances error messages related to VF MAC/VLAN filters.

v2: Dropped patch "i40e: Properly cast type for arithmetic" patch
    based on feedback from the community
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Nov 25, 2015
2 parents 9458cea + 1c2df9e commit 00cc367
Show file tree
Hide file tree
Showing 13 changed files with 311 additions and 140 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/fm10k/fm10k_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ static irqreturn_t fm10k_msix_clean_rings(int __always_unused irq, void *data)
struct fm10k_q_vector *q_vector = data;

if (q_vector->rx.count || q_vector->tx.count)
napi_schedule(&q_vector->napi);
napi_schedule_irqoff(&q_vector->napi);

return IRQ_HANDLED;
}
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ struct i40e_lump_tracking {
#define I40E_FDIR_BUFFER_HEAD_ROOM_FOR_ATR (I40E_FDIR_BUFFER_HEAD_ROOM * 4)

#define I40E_HKEY_ARRAY_SIZE ((I40E_PFQF_HKEY_MAX_INDEX + 1) * 4)
#define I40E_HLUT_ARRAY_SIZE ((I40E_PFQF_HLUT_MAX_INDEX + 1) * 4)

enum i40e_fd_stat_idx {
I40E_FD_STAT_ATR,
Expand Down Expand Up @@ -487,6 +488,7 @@ struct i40e_vsi {
u32 tx_restart;
u32 tx_busy;
u64 tx_linearize;
u64 tx_force_wb;
u32 rx_buf_failed;
u32 rx_page_failed;

Expand Down Expand Up @@ -668,6 +670,8 @@ extern const char i40e_driver_name[];
extern const char i40e_driver_version_str[];
void i40e_do_reset_safe(struct i40e_pf *pf, u32 reset_flags);
void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags);
int i40e_config_rss(struct i40e_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size);
int i40e_get_rss(struct i40e_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size);
struct i40e_vsi *i40e_find_vsi_from_id(struct i40e_pf *pf, u16 id);
void i40e_update_stats(struct i40e_vsi *vsi);
void i40e_update_eth_stats(struct i40e_vsi *vsi);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -2403,4 +2403,4 @@ struct i40e_aqc_debug_modify_internals {

I40E_CHECK_CMD_LENGTH(i40e_aqc_debug_modify_internals);

#endif
#endif /* _I40E_ADMINQ_CMD_H_ */
76 changes: 33 additions & 43 deletions drivers/net/ethernet/intel/i40e/i40e_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static const struct i40e_stats i40e_gstrings_misc_stats[] = {
I40E_VSI_STAT("tx_broadcast", eth_stats.tx_broadcast),
I40E_VSI_STAT("rx_unknown_protocol", eth_stats.rx_unknown_protocol),
I40E_VSI_STAT("tx_linearize", tx_linearize),
I40E_VSI_STAT("tx_force_wb", tx_force_wb),
};

/* These PF_STATs might look like duplicates of some NETDEV_STATs,
Expand Down Expand Up @@ -2110,7 +2111,7 @@ static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,

switch (cmd->cmd) {
case ETHTOOL_GRXRINGS:
cmd->data = vsi->alloc_queue_pairs;
cmd->data = vsi->num_queue_pairs;
ret = 0;
break;
case ETHTOOL_GRXFH:
Expand Down Expand Up @@ -2583,7 +2584,6 @@ static int i40e_set_channels(struct net_device *dev,
return -EINVAL;
}

#define I40E_HLUT_ARRAY_SIZE ((I40E_PFQF_HLUT_MAX_INDEX + 1) * 4)
/**
* i40e_get_rxfh_key_size - get the RSS hash key size
* @netdev: network interface device structure
Expand Down Expand Up @@ -2611,35 +2611,30 @@ static int i40e_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
{
struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back;
struct i40e_hw *hw = &pf->hw;
u32 reg_val;
int i, j;
u8 *lut, *seed = NULL;
int ret;
u16 i;

if (hfunc)
*hfunc = ETH_RSS_HASH_TOP;

if (!indir)
return 0;

for (i = 0, j = 0; i <= I40E_PFQF_HLUT_MAX_INDEX; i++) {
reg_val = rd32(hw, I40E_PFQF_HLUT(i));
indir[j++] = reg_val & 0xff;
indir[j++] = (reg_val >> 8) & 0xff;
indir[j++] = (reg_val >> 16) & 0xff;
indir[j++] = (reg_val >> 24) & 0xff;
}
seed = key;
lut = kzalloc(I40E_HLUT_ARRAY_SIZE, GFP_KERNEL);
if (!lut)
return -ENOMEM;
ret = i40e_get_rss(vsi, seed, lut, I40E_HLUT_ARRAY_SIZE);
if (ret)
goto out;
for (i = 0; i < I40E_HLUT_ARRAY_SIZE; i++)
indir[i] = (u32)(lut[i]);

if (key) {
for (i = 0, j = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) {
reg_val = rd32(hw, I40E_PFQF_HKEY(i));
key[j++] = (u8)(reg_val & 0xff);
key[j++] = (u8)((reg_val >> 8) & 0xff);
key[j++] = (u8)((reg_val >> 16) & 0xff);
key[j++] = (u8)((reg_val >> 24) & 0xff);
}
}
return 0;
out:
kfree(lut);

return ret;
}

/**
Expand All @@ -2656,35 +2651,30 @@ static int i40e_set_rxfh(struct net_device *netdev, const u32 *indir,
{
struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back;
struct i40e_hw *hw = &pf->hw;
u32 reg_val;
int i, j;
u8 seed_def[I40E_HKEY_ARRAY_SIZE];
u8 *lut, *seed = NULL;
u16 i;
int ret;

if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)
return -EOPNOTSUPP;

if (!indir)
return 0;

for (i = 0, j = 0; i <= I40E_PFQF_HLUT_MAX_INDEX; i++) {
reg_val = indir[j++];
reg_val |= indir[j++] << 8;
reg_val |= indir[j++] << 16;
reg_val |= indir[j++] << 24;
wr32(hw, I40E_PFQF_HLUT(i), reg_val);
}

if (key) {
for (i = 0, j = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) {
reg_val = key[j++];
reg_val |= key[j++] << 8;
reg_val |= key[j++] << 16;
reg_val |= key[j++] << 24;
wr32(hw, I40E_PFQF_HKEY(i), reg_val);
}
memcpy(seed_def, key, I40E_HKEY_ARRAY_SIZE);
seed = seed_def;
}
return 0;
lut = kzalloc(I40E_HLUT_ARRAY_SIZE, GFP_KERNEL);
if (!lut)
return -ENOMEM;
for (i = 0; i < I40E_HLUT_ARRAY_SIZE; i++)
lut[i] = (u8)(indir[i]);
ret = i40e_config_rss(vsi, seed, lut, I40E_HLUT_ARRAY_SIZE);
kfree(lut);

return ret;
}

/**
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/intel/i40e/i40e_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,8 +1544,6 @@ void i40e_fcoe_vsi_setup(struct i40e_pf *pf)
if (!(pf->flags & I40E_FLAG_FCOE_ENABLED))
return;

BUG_ON(!pf->vsi[pf->lan_vsi]);

for (i = 0; i < pf->num_alloc_vsi; i++) {
vsi = pf->vsi[i];
if (vsi && vsi->type == I40E_VSI_FCOE) {
Expand Down
Loading

0 comments on commit 00cc367

Please sign in to comment.