aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40evf/i40e_common.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-08-28 14:19:38 -0700
committerDavid S. Miller <davem@davemloft.net>2014-08-28 14:19:38 -0700
commit3a5fc218151892eae35957737d75c0f41a2c9c8a (patch)
tree70ebf69c1e3bf46bba2db6b32a78b553462ab465 /drivers/net/ethernet/intel/i40evf/i40e_common.c
parentvirtio_net: flush when in xmit_more mode and under descriptor pressure (diff)
parenti40e/i40evf: Bump i40e & i40evf version (diff)
downloadlinux-dev-3a5fc218151892eae35957737d75c0f41a2c9c8a.tar.xz
linux-dev-3a5fc218151892eae35957737d75c0f41a2c9c8a.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-08-27 This series contains updates to i40e and i40evf. Carolyn provides two patches, first changes the wording of the flow director add/remove and asynchronous failure messages to include the fd_id to try and add some way to track the operations on a given fd_id. Second adds a check during handle_link_event for unqualified modules when link is down and there is a module plugged in. Anjali provides four patches to i40e/i40evf. First update flow director messages so that a user can tell if a filter was added or deleted. Then updates the ATR policy to not auto-disable ATR when we have errors in programming. The disabling of ATR when we got programming errors was buggy and was still adding new rules and causing continuous errors. With this policy change, we flush instead when we see too many errors. In addition she adds a flow director flush counter to ethtool to help know how many times the interface had to flush and replay the flow director filter table. Updates the driver to ignores a driver perceived transmit hang if the number of descriptors pending is less than 4, and instead log a stat when this situation happens. This is because the queue progresses forward and the stack never experiences a real hang in these situations. Shannon provides three patches for i40e/i40evf, first enables the l2tsel bit on receive queue contexts that are assigned to VFs so that the VF can get the stripped VLAN tag. Then adds a max buffer size parameter to the print helper to be sure the code knows when to stop. Lastly, remove the complaint when removing the default MAC VLAN filter. This was because old firmware had an incorrect MAC VLAN filter that needed to be replaced at startup, and now newer firmware does not have this problem. So now we only add the new filter if the removal succeeded and no need to complain if the removal fails. Ashish provides a change to vsi->num_queue_pairs to equal the number that is configured by the VF. This limits the number of queues that are enabled/disabled and fixes the mismatch case for when a VF configures fewer queues than is allocated to it by the PF. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40e_common.c')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index 4ea90bf239bb..952560551964 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -75,13 +75,15 @@ i40e_status i40e_set_mac_type(struct i40e_hw *hw)
* @mask: debug mask
* @desc: pointer to admin queue descriptor
* @buffer: pointer to command buffer
+ * @buf_len: max length of buffer
*
* Dumps debug log about adminq command with descriptor contents.
**/
void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
- void *buffer)
+ void *buffer, u16 buf_len)
{
struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
+ u16 len = le16_to_cpu(aq_desc->datalen);
u8 *aq_buffer = (u8 *)buffer;
u32 data[4];
u32 i = 0;
@@ -105,7 +107,9 @@ void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
if ((buffer != NULL) && (aq_desc->datalen != 0)) {
memset(data, 0, sizeof(data));
i40e_debug(hw, mask, "AQ CMD Buffer:\n");
- for (i = 0; i < le16_to_cpu(aq_desc->datalen); i++) {
+ if (buf_len < len)
+ len = buf_len;
+ for (i = 0; i < len; i++) {
data[((i % 16) / 4)] |=
((u32)aq_buffer[i]) << (8 * (i % 4));
if ((i % 16) == 15) {