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-23

This series contains updates to ixgbe, ixgbevf, fm10k, i40e and i40evf.

Jacob fixes an issue where VF could attempt to read queues it does not own,
so prevent this we check queue 0 before we continue.

Matthew fixes the MTU for jumbo frames for fm10k.

Julia Lawall cleans up a unneeded NULL test in ixgbe.

Mark cleans up a redundant header inclusion.  Adds KR mode support for
CS4227 chip.  Cleaned up diagnostic code, which is no longer needed, for
the CS4227 chip.

Jean Sacren fixes kernel documentation for ixgbe.

Alex Duyck fixes an fm10k and ixgbe issue in which the polling routine would
increase the budget for receive to at least 1 per queue if multiple queues were
present.  This would result in receive packets being processed when the budget
was 0 which is meant to indicate that no receive can be handled.  Also fixes
an ixgbevf performance issue where netperf test will starve for memory in the
time form one transmit interrupt to the next, so limit lowest interrupt rate
for adaptive interrupt moderation to 12K.  Fixed up ixgbe and ixgbevf to
use napi_schedule_irqoff() where the drivers were run from hard interrupt
context or with interrupts already disabled in netpoll.

Jesse fixes a compiler warning about an unused variable for i40evf.

John Greene fixes an issue with ixgbevf, where if the VF driver is loaded
while the corresponding PH interface is down, the driver assigns a random
MAC address, can be overwritten with the value of hw->mac.perm_addr which
is 0 at that point.  So avoid this case by initializing hw->mac.perm_addr
to the randomly generated address and do not set it unless we receive an
ACK from ixgbe.

Rasmus Villemoes cleans up some confusing code in i40e debugfs code.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Nov 24, 2015
2 parents 3b22dae + 0286c67 commit 57ef552
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 153 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/fm10k/fm10k.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "fm10k_pf.h"
#include "fm10k_vf.h"

#define FM10K_MAX_JUMBO_FRAME_SIZE 15358 /* Maximum supported size 15K */
#define FM10K_MAX_JUMBO_FRAME_SIZE 15342 /* Maximum supported size 15K */

#define MAX_QUEUES FM10K_MAX_QUEUES_PF

Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/fm10k/fm10k_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,10 @@ static int fm10k_poll(struct napi_struct *napi, int budget)
fm10k_for_each_ring(ring, q_vector->tx)
clean_complete &= fm10k_clean_tx_irq(q_vector, ring);

/* Handle case where we are called by netpoll with a budget of 0 */
if (budget <= 0)
return budget;

/* attempt to distribute budget to each queue fairly, but don't
* allow the budget to go below 1 because we'll exit polling
*/
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/fm10k/fm10k_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct fm10k_hw;
#define FM10K_PCIE_SRIOV_CTRL_VFARI 0x10

#define FM10K_ERR_PARAM -2
#define FM10K_ERR_NO_RESOURCES -3
#define FM10K_ERR_REQUESTS_PENDING -4
#define FM10K_ERR_RESET_REQUESTED -5
#define FM10K_ERR_DMA_PENDING -6
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/ethernet/intel/fm10k/fm10k_vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ static s32 fm10k_init_hw_vf(struct fm10k_hw *hw)
s32 err;
u16 i;

/* assume we always have at least 1 queue */
/* verify we have at least 1 queue */
if (!~fm10k_read_reg(hw, FM10K_TXQCTL(0)) ||
!~fm10k_read_reg(hw, FM10K_RXQCTL(0)))
return FM10K_ERR_NO_RESOURCES;

/* determine how many queues we have */
for (i = 1; tqdloc0 && (i < FM10K_MAX_QUEUES_POOL); i++) {
/* verify the Descriptor cache offsets are increasing */
tqdloc = ~fm10k_read_reg(hw, FM10K_TQDLOC(i));
Expand Down
24 changes: 10 additions & 14 deletions drivers/net/ethernet/intel/i40e/i40e_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ static ssize_t i40e_dbg_dump_read(struct file *filp, char __user *buffer,
len = min_t(int, count, (i40e_dbg_dump_data_len - *ppos));

bytes_not_copied = copy_to_user(buffer, &i40e_dbg_dump_buf[*ppos], len);
if (bytes_not_copied < 0)
return bytes_not_copied;
if (bytes_not_copied)
return -EFAULT;

*ppos += len;
return len;
Expand Down Expand Up @@ -353,8 +353,8 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
bytes_not_copied = copy_to_user(buffer, buf, len);
kfree(buf);

if (bytes_not_copied < 0)
return bytes_not_copied;
if (bytes_not_copied)
return -EFAULT;

*ppos = len;
return len;
Expand Down Expand Up @@ -981,12 +981,10 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
if (!cmd_buf)
return count;
bytes_not_copied = copy_from_user(cmd_buf, buffer, count);
if (bytes_not_copied < 0) {
if (bytes_not_copied) {
kfree(cmd_buf);
return bytes_not_copied;
return -EFAULT;
}
if (bytes_not_copied > 0)
count -= bytes_not_copied;
cmd_buf[count] = '\0';

cmd_buf_tmp = strchr(cmd_buf, '\n');
Expand Down Expand Up @@ -2034,8 +2032,8 @@ static ssize_t i40e_dbg_netdev_ops_read(struct file *filp, char __user *buffer,
bytes_not_copied = copy_to_user(buffer, buf, len);
kfree(buf);

if (bytes_not_copied < 0)
return bytes_not_copied;
if (bytes_not_copied)
return -EFAULT;

*ppos = len;
return len;
Expand Down Expand Up @@ -2068,10 +2066,8 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
memset(i40e_dbg_netdev_ops_buf, 0, sizeof(i40e_dbg_netdev_ops_buf));
bytes_not_copied = copy_from_user(i40e_dbg_netdev_ops_buf,
buffer, count);
if (bytes_not_copied < 0)
return bytes_not_copied;
else if (bytes_not_copied > 0)
count -= bytes_not_copied;
if (bytes_not_copied)
return -EFAULT;
i40e_dbg_netdev_ops_buf[count] = '\0';

buf_tmp = strchr(i40e_dbg_netdev_ops_buf, '\n');
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/ethernet/intel/i40evf/i40evf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,9 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data)
struct i40e_hw *hw = &adapter->hw;
u32 val;

/* handle non-queue interrupts */
rd32(hw, I40E_VFINT_ICR01);
rd32(hw, I40E_VFINT_ICR0_ENA1);

/* handle non-queue interrupts, these reads clear the registers */
val = rd32(hw, I40E_VFINT_ICR01);
val = rd32(hw, I40E_VFINT_ICR0_ENA1);

val = rd32(hw, I40E_VFINT_DYN_CTL01) |
I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,7 @@ static void ixgbe_fcoe_dma_pool_free(struct ixgbe_fcoe *fcoe, unsigned int cpu)
struct ixgbe_fcoe_ddp_pool *ddp_pool;

ddp_pool = per_cpu_ptr(fcoe->ddp_pool, cpu);
if (ddp_pool->pool)
dma_pool_destroy(ddp_pool->pool);
dma_pool_destroy(ddp_pool->pool);
ddp_pool->pool = NULL;
}

Expand Down
19 changes: 7 additions & 12 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
#include "ixgbe_common.h"
#include "ixgbe_dcb_82599.h"
#include "ixgbe_sriov.h"
#ifdef CONFIG_IXGBE_VXLAN
#include <net/vxlan.h>
#endif

char ixgbe_driver_name[] = "ixgbe";
static const char ixgbe_driver_string[] =
Expand Down Expand Up @@ -2757,7 +2754,7 @@ static irqreturn_t ixgbe_msix_clean_rings(int irq, void *data)
/* EIAM disabled interrupts (on this vector) for us */

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

return IRQ_HANDLED;
}
Expand Down Expand Up @@ -2786,7 +2783,8 @@ int ixgbe_poll(struct napi_struct *napi, int budget)
ixgbe_for_each_ring(ring, q_vector->tx)
clean_complete &= !!ixgbe_clean_tx_irq(q_vector, ring);

if (!ixgbe_qv_lock_napi(q_vector))
/* Exit if we are called by netpoll or busy polling is active */
if ((budget <= 0) || !ixgbe_qv_lock_napi(q_vector))
return budget;

/* attempt to distribute budget to each queue fairly, but don't allow
Expand Down Expand Up @@ -2950,7 +2948,7 @@ static irqreturn_t ixgbe_intr(int irq, void *data)
ixgbe_ptp_check_pps_event(adapter, eicr);

/* would disable interrupts here but EIAM disabled it */
napi_schedule(&q_vector->napi);
napi_schedule_irqoff(&q_vector->napi);

/*
* re-enable link(maybe) and non-queue interrupts, no flush.
Expand Down Expand Up @@ -3315,8 +3313,7 @@ static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter,
}

/**
* Return a number of entries in the RSS indirection table
*
* ixgbe_rss_indir_tbl_entries - Return RSS indirection table entries
* @adapter: device handle
*
* - 82598/82599/X540: 128
Expand All @@ -3334,8 +3331,7 @@ u32 ixgbe_rss_indir_tbl_entries(struct ixgbe_adapter *adapter)
}

/**
* Write the RETA table to HW
*
* ixgbe_store_reta - Write the RETA table to HW
* @adapter: device handle
*
* Write the RSS redirection table stored in adapter.rss_indir_tbl[] to HW.
Expand Down Expand Up @@ -3374,8 +3370,7 @@ void ixgbe_store_reta(struct ixgbe_adapter *adapter)
}

/**
* Write the RETA table to HW (for x550 devices in SRIOV mode)
*
* ixgbe_store_vfreta - Write the RETA table to HW (x550 devices in SRIOV mode)
* @adapter: device handle
*
* Write the RSS redirection table stored in adapter.rss_indir_tbl[] to HW.
Expand Down
Loading

0 comments on commit 57ef552

Please sign in to comment.