* [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics
@ 2015-04-03 20:26 Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
` (24 more replies)
0 siblings, 25 replies; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
The function collecting Tx statistics was actually using values from the RX
ring. Thus, Tx and Rx statistics values reported by "ifconfig" will
return identical values. This change corrects this error and the Tx
statistics is now reading from the Tx ring.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index d5b303d..a7db5e2 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -1126,7 +1126,7 @@ static struct rtnl_link_stats64 *fm10k_get_stats64(struct net_device *netdev,
}
for (i = 0; i < interface->num_tx_queues; i++) {
- ring = ACCESS_ONCE(interface->rx_ring[i]);
+ ring = ACCESS_ONCE(interface->tx_ring[i]);
if (!ring)
continue;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:01 ` Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake Jeff Kirsher
` (23 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
Output of ethtool was reporting 2 rx_errors entries. This change
removes one of the redundant entries.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +--
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 3 +--
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 5 ++---
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
index 59edfd4..65e7001 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -266,7 +266,6 @@ struct fm10k_intfc {
u64 tx_csum_errors;
u64 alloc_failed;
u64 rx_csum_errors;
- u64 rx_errors;
u64 tx_bytes_nic;
u64 tx_packets_nic;
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 33b6106..7dd3c9d 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -63,7 +63,6 @@ static const struct fm10k_stats fm10k_gstrings_stats[] = {
FM10K_STAT("tx_csum_errors", tx_csum_errors),
FM10K_STAT("rx_alloc_failed", alloc_failed),
FM10K_STAT("rx_csum_errors", rx_csum_errors),
- FM10K_STAT("rx_errors", rx_errors),
FM10K_STAT("tx_packets_nic", tx_packets_nic),
FM10K_STAT("tx_bytes_nic", tx_bytes_nic),
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 8978d55..6fc9965 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -357,7 +357,6 @@ void fm10k_update_stats(struct fm10k_intfc *interface)
net_stats->rx_packets = pkts;
interface->alloc_failed = alloc_failed;
interface->rx_csum_errors = rx_csum_errors;
- interface->rx_errors = rx_errors;
hw->mac.ops.update_hw_stats(hw, &interface->stats);
@@ -378,7 +377,7 @@ void fm10k_update_stats(struct fm10k_intfc *interface)
interface->rx_drops_nic = rx_drops_nic;
/* Fill out the OS statistics structure */
- net_stats->rx_errors = interface->stats.xec.count;
+ net_stats->rx_errors = rx_errors;
net_stats->rx_dropped = interface->stats.nodesc_drop.count;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:01 ` Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init Jeff Kirsher
` (22 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
Corrected a spelling mistake that was found over time.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
index 14ee696..59faf32 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -818,7 +818,7 @@ static void fm10k_mbx_write(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx)
/* write new msg header to notify recipient of change */
fm10k_write_reg(hw, mbmem, mbx->mbx_hdr);
- /* write mailbox to sent interrupt */
+ /* write mailbox to send interrupt */
if (mbx->mbx_lock)
fm10k_write_reg(hw, mbx->mbx_reg, mbx->mbx_lock);
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:01 ` Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
` (21 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
Currently, the VFs do not read the default VLAN during initialization,
so they will not be able to indicate untagged frames properly.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
index 1721967..94f0f6a 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -124,6 +124,10 @@ static s32 fm10k_init_hw_vf(struct fm10k_hw *hw)
/* record maximum queue count */
hw->mac.max_queues = i;
+ /* fetch default VLAN */
+ hw->mac.default_vid = (fm10k_read_reg(hw, FM10K_TXQCTL(0)) &
+ FM10K_TXQCTL_VID_MASK) >> FM10K_TXQCTL_VID_SHIFT;
+
return 0;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (2 preceding siblings ...)
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-07 15:17 ` Alexander Duyck
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings Jeff Kirsher
` (20 subsequent siblings)
24 siblings, 2 replies; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
This change adds a function called "fm10k_netpoll" that's used to define
"ndo_poll_controller" in "fm10k_netdev_ops". This is required to enable
support for "netconsole" in fm10k.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k.h | 1 +
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 21 +++++++++++++++++++++
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
index 65e7001..715d0a0 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
@@ -457,6 +457,7 @@ void fm10k_down(struct fm10k_intfc *interface);
void fm10k_update_stats(struct fm10k_intfc *interface);
void fm10k_service_event_schedule(struct fm10k_intfc *interface);
void fm10k_update_rx_drop_en(struct fm10k_intfc *interface);
+irqreturn_t fm10k_msix_clean_rings(int irq, void *data);
/* Netdev */
struct net_device *fm10k_alloc_netdev(void);
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index a7db5e2..2a61b83 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -1350,6 +1350,26 @@ static void fm10k_dfwd_del_station(struct net_device *dev, void *priv)
}
}
+/**
+ * fm10k_netpoll - A Polling 'interrupt' handler
+ * @netdev: network interface device structure
+ *
+ * This is used by netconsole to send skbs without having to re-enable
+ * interrupts. It's not called while the normal interrupt routine is executing.
+ **/
+static void fm10k_netpoll(struct net_device *netdev)
+{
+ struct fm10k_intfc *interface = netdev_priv(netdev);
+ int i;
+
+ /* if interface is down do nothing */
+ if (test_bit(__FM10K_DOWN, &interface->state))
+ return;
+
+ for (i = 0; i < interface->num_q_vectors; i++)
+ fm10k_msix_clean_rings(0, interface->q_vector[i]);
+}
+
static netdev_features_t fm10k_features_check(struct sk_buff *skb,
struct net_device *dev,
netdev_features_t features)
@@ -1382,6 +1402,7 @@ static const struct net_device_ops fm10k_netdev_ops = {
.ndo_do_ioctl = fm10k_ioctl,
.ndo_dfwd_add_station = fm10k_dfwd_add_station,
.ndo_dfwd_del_station = fm10k_dfwd_del_station,
+ .ndo_poll_controller = fm10k_netpoll,
.ndo_features_check = fm10k_features_check,
};
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 6fc9965..c11e2c9 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -807,7 +807,7 @@ static void fm10k_napi_enable_all(struct fm10k_intfc *interface)
}
}
-static irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
+irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
{
struct fm10k_q_vector *q_vector = data;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (3 preceding siblings ...)
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
` (19 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
The were several functions which had parameters which were never or
sometimes used in functions. To resolve possible compiler warnings,
use __always_unused or __maybe_unused kernel macros to resolve.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c | 6 +++---
drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 8 +++++---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 12 ++++++------
drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 6 +++---
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 18 ++++++------------
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 17 +++++++++--------
drivers/net/ethernet/intel/fm10k/fm10k_ptp.c | 5 +++--
7 files changed, 35 insertions(+), 37 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c b/drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c
index 212a92d..5c7a4d7 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -128,7 +128,7 @@ static int fm10k_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc)
*
* Returns that we support only IEEE DCB for this interface
**/
-static u8 fm10k_dcbnl_getdcbx(struct net_device *dev)
+static u8 fm10k_dcbnl_getdcbx(struct net_device __always_unused *dev)
{
return DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE;
}
@@ -140,7 +140,7 @@ static u8 fm10k_dcbnl_getdcbx(struct net_device *dev)
*
* Returns error on attempt to enable anything but IEEE DCB for this interface
**/
-static u8 fm10k_dcbnl_setdcbx(struct net_device *dev, u8 mode)
+static u8 fm10k_dcbnl_setdcbx(struct net_device __always_unused *dev, u8 mode)
{
return (mode != (DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE)) ? 1 : 0;
}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c b/drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c
index 4327f86..f45b4d7 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -36,14 +36,16 @@ static void *fm10k_dbg_desc_seq_start(struct seq_file *s, loff_t *pos)
return (*pos < ring->count) ? pos : NULL;
}
-static void *fm10k_dbg_desc_seq_next(struct seq_file *s, void *v, loff_t *pos)
+static void *fm10k_dbg_desc_seq_next(struct seq_file *s,
+ void __always_unused *v, loff_t *pos)
{
struct fm10k_ring *ring = s->private;
return (++(*pos) < ring->count) ? pos : NULL;
}
-static void fm10k_dbg_desc_seq_stop(struct seq_file *s, void *v)
+static void fm10k_dbg_desc_seq_stop(struct seq_file __always_unused *s,
+ __always_unused void *v)
{
/* Do nothing. */
}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 7dd3c9d..697a269 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -116,8 +116,7 @@ enum fm10k_self_test_types {
FM10K_TEST_MAX = FM10K_TEST_LEN
};
-static void fm10k_get_strings(struct net_device *dev, u32 stringset,
- u8 *data)
+static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)
{
char *p = (char *)data;
int i;
@@ -166,7 +165,8 @@ static int fm10k_get_sset_count(struct net_device *dev, int sset)
}
static void fm10k_get_ethtool_stats(struct net_device *netdev,
- struct ethtool_stats *stats, u64 *data)
+ struct ethtool_stats __always_unused *stats,
+ u64 *data)
{
const int stat_count = sizeof(struct fm10k_queue_stats) / sizeof(u64);
struct fm10k_intfc *interface = netdev_priv(netdev);
@@ -644,7 +644,7 @@ static int fm10k_get_rss_hash_opts(struct fm10k_intfc *interface,
}
static int fm10k_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
- u32 *rule_locs)
+ u32 __always_unused *rule_locs)
{
struct fm10k_intfc *interface = netdev_priv(dev);
int ret = -EOPNOTSUPP;
@@ -850,7 +850,7 @@ static void fm10k_self_test(struct net_device *dev,
eth_test->flags |= ETH_TEST_FL_FAILED;
}
-static u32 fm10k_get_reta_size(struct net_device *netdev)
+static u32 fm10k_get_reta_size(struct net_device __always_unused *netdev)
{
return FM10K_RETA_SIZE * FM10K_RETA_ENTRIES_PER_REG;
}
@@ -910,7 +910,7 @@ static int fm10k_set_reta(struct net_device *netdev, const u32 *indir)
return 0;
}
-static u32 fm10k_get_rssrk_size(struct net_device *netdev)
+static u32 fm10k_get_rssrk_size(struct net_device __always_unused *netdev)
{
return FM10K_RSSRK_SIZE * FM10K_RSSRK_ENTRIES_PER_REG;
}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
index a02308f..69cbfde 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -488,8 +488,8 @@ int fm10k_ndo_set_vf_vlan(struct net_device *netdev, int vf_idx, u16 vid,
return 0;
}
-int fm10k_ndo_set_vf_bw(struct net_device *netdev, int vf_idx, int unused,
- int rate)
+int fm10k_ndo_set_vf_bw(struct net_device *netdev, int vf_idx,
+ int __always_unused unused, int rate)
{
struct fm10k_intfc *interface = netdev_priv(netdev);
struct fm10k_iov_data *iov_data = interface->iov_data;
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index c325bc0..e2c27ba 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -209,7 +209,7 @@ static inline bool fm10k_page_is_reserved(struct page *page)
static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer,
struct page *page,
- unsigned int truesize)
+ unsigned int __maybe_unused truesize)
{
/* avoid re-using remote pages */
if (unlikely(fm10k_page_is_reserved(page)))
@@ -240,7 +240,6 @@ static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer,
/**
* fm10k_add_rx_frag - Add contents of Rx buffer to sk_buff
- * @rx_ring: rx descriptor ring to transact packets on
* @rx_buffer: buffer containing page to add
* @rx_desc: descriptor containing length of buffer written by hardware
* @skb: sk_buff to place the data into
@@ -253,8 +252,7 @@ static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer,
* The function will then update the page offset if necessary and return
* true if the buffer can be reused by the interface.
**/
-static bool fm10k_add_rx_frag(struct fm10k_ring *rx_ring,
- struct fm10k_rx_buffer *rx_buffer,
+static bool fm10k_add_rx_frag(struct fm10k_rx_buffer *rx_buffer,
union fm10k_rx_desc *rx_desc,
struct sk_buff *skb)
{
@@ -330,7 +328,7 @@ static struct sk_buff *fm10k_fetch_rx_buffer(struct fm10k_ring *rx_ring,
DMA_FROM_DEVICE);
/* pull page into skb */
- if (fm10k_add_rx_frag(rx_ring, rx_buffer, rx_desc, skb)) {
+ if (fm10k_add_rx_frag(rx_buffer, rx_desc, skb)) {
/* hand second half of page back to the ring */
fm10k_reuse_rx_page(rx_ring, rx_buffer);
} else {
@@ -412,7 +410,7 @@ static void fm10k_rx_hwtstamp(struct fm10k_ring *rx_ring,
}
static void fm10k_type_trans(struct fm10k_ring *rx_ring,
- union fm10k_rx_desc *rx_desc,
+ union fm10k_rx_desc __maybe_unused *rx_desc,
struct sk_buff *skb)
{
struct net_device *dev = rx_ring->netdev;
@@ -509,8 +507,6 @@ static bool fm10k_is_non_eop(struct fm10k_ring *rx_ring,
/**
* fm10k_pull_tail - fm10k specific version of skb_pull_tail
- * @rx_ring: rx descriptor ring packet is being transacted on
- * @rx_desc: pointer to the EOP Rx descriptor
* @skb: pointer to current skb being adjusted
*
* This function is an fm10k specific version of __pskb_pull_tail. The
@@ -520,9 +516,7 @@ static bool fm10k_is_non_eop(struct fm10k_ring *rx_ring,
* As a result we can do things like drop a frag and maintain an accurate
* truesize for the skb.
*/
-static void fm10k_pull_tail(struct fm10k_ring *rx_ring,
- union fm10k_rx_desc *rx_desc,
- struct sk_buff *skb)
+static void fm10k_pull_tail(struct sk_buff *skb)
{
struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
unsigned char *va;
@@ -576,7 +570,7 @@ static bool fm10k_cleanup_headers(struct fm10k_ring *rx_ring,
/* place header in linear portion of buffer */
if (skb_is_nonlinear(skb))
- fm10k_pull_tail(rx_ring, rx_desc, skb);
+ fm10k_pull_tail(skb);
/* if eth_skb_pad returns an error the skb was freed */
if (eth_skb_pad(skb))
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index c11e2c9..12a3044 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -807,7 +807,7 @@ static void fm10k_napi_enable_all(struct fm10k_intfc *interface)
}
}
-irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
+irqreturn_t fm10k_msix_clean_rings(int __always_unused irq, void *data)
{
struct fm10k_q_vector *q_vector = data;
@@ -817,7 +817,7 @@ irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
return IRQ_HANDLED;
}
-static irqreturn_t fm10k_msix_mbx_vf(int irq, void *data)
+static irqreturn_t fm10k_msix_mbx_vf(int __always_unused irq, void *data)
{
struct fm10k_intfc *interface = data;
struct fm10k_hw *hw = &interface->hw;
@@ -963,7 +963,7 @@ static void fm10k_reset_drop_on_empty(struct fm10k_intfc *interface, u32 eicr)
}
}
-static irqreturn_t fm10k_msix_mbx_pf(int irq, void *data)
+static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
{
struct fm10k_intfc *interface = data;
struct fm10k_hw *hw = &interface->hw;
@@ -1068,7 +1068,7 @@ static s32 fm10k_mbx_mac_addr(struct fm10k_hw *hw, u32 **results,
}
static s32 fm10k_1588_msg_vf(struct fm10k_hw *hw, u32 **results,
- struct fm10k_mbx_info *mbx)
+ struct fm10k_mbx_info __always_unused *mbx)
{
struct fm10k_intfc *interface;
u64 timestamp;
@@ -1088,7 +1088,7 @@ static s32 fm10k_1588_msg_vf(struct fm10k_hw *hw, u32 **results,
/* generic error handler for mailbox issues */
static s32 fm10k_mbx_error(struct fm10k_hw *hw, u32 **results,
- struct fm10k_mbx_info *mbx)
+ struct fm10k_mbx_info __always_unused *mbx)
{
struct fm10k_intfc *interface;
struct pci_dev *pdev;
@@ -1164,7 +1164,7 @@ static s32 fm10k_lport_map(struct fm10k_hw *hw, u32 **results,
}
static s32 fm10k_update_pvid(struct fm10k_hw *hw, u32 **results,
- struct fm10k_mbx_info *mbx)
+ struct fm10k_mbx_info __always_unused *mbx)
{
struct fm10k_intfc *interface;
u16 glort, pvid;
@@ -1205,7 +1205,7 @@ static s32 fm10k_update_pvid(struct fm10k_hw *hw, u32 **results,
}
static s32 fm10k_1588_msg_pf(struct fm10k_hw *hw, u32 **results,
- struct fm10k_mbx_info *mbx)
+ struct fm10k_mbx_info __always_unused *mbx)
{
struct fm10k_swapi_1588_timestamp timestamp;
struct fm10k_iov_data *iov_data;
@@ -1983,7 +1983,8 @@ static int fm10k_resume(struct pci_dev *pdev)
* a sleep state. The fm10k hardware does not support wake on lan so the
* driver simply needs to shut down the device so it is in a low power state.
**/
-static int fm10k_suspend(struct pci_dev *pdev, pm_message_t state)
+static int fm10k_suspend(struct pci_dev *pdev,
+ pm_message_t __always_unused state)
{
struct fm10k_intfc *interface = pci_get_drvdata(pdev);
struct net_device *netdev = interface->netdev;
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c b/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
index d966044..f8b95be 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
@@ -1,5 +1,5 @@
/* Intel Ethernet Switch Host Interface 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
* under the terms and conditions of the GNU General Public License,
@@ -319,7 +319,8 @@ static int fm10k_ptp_settime(struct ptp_clock_info *ptp,
}
static int fm10k_ptp_enable(struct ptp_clock_info *ptp,
- struct ptp_clock_request *rq, int on)
+ struct ptp_clock_request *rq,
+ int __always_unused on)
{
struct ptp_clock_time *t = &rq->perout.period;
struct fm10k_intfc *interface;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (4 preceding siblings ...)
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-04 17:39 ` Alexander Duyck
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware Jeff Kirsher
` (18 subsequent siblings)
24 siblings, 2 replies; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
Previously, the user was not allowed to create a VLAN interface on top
of the switch default vid.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index 2a61b83..c9f87bb 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -770,10 +770,6 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
if (hw->mac.vlan_override)
return -EACCES;
- /* if default VLAN is already present do nothing */
- if (vid == hw->mac.default_vid)
- return -EBUSY;
-
/* update active_vlans bitmask */
set_bit(vid, interface->active_vlans);
if (!set)
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (5 preceding siblings ...)
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats Jeff Kirsher
` (17 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
Currently, we show statistics for all 128 queues, even though we don't
necessarily have that many queues available especially in the VF case.
Instead, use the hw->mac.max_queues value, which tells us how many
queues we actually have, rather than the space for the rings we
allocated. In this way, we prevent dumping statistics that are useless
on the VF.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 697a269..478e67b 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -118,6 +118,7 @@ enum fm10k_self_test_types {
static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)
{
+ struct fm10k_intfc *interface = netdev_priv(dev);
char *p = (char *)data;
int i;
@@ -138,7 +139,7 @@ static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)
p += ETH_GSTRING_LEN;
}
- for (i = 0; i < MAX_QUEUES; i++) {
+ for (i = 0; i < interface->hw.mac.max_queues; i++) {
sprintf(p, "tx_queue_%u_packets", i);
p += ETH_GSTRING_LEN;
sprintf(p, "tx_queue_%u_bytes", i);
@@ -188,7 +189,7 @@ static void fm10k_get_ethtool_stats(struct net_device *netdev,
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
}
- for (i = 0; i < MAX_QUEUES; i++) {
+ for (i = 0; i < interface->hw.mac.max_queues; i++) {
struct fm10k_ring *ring;
u64 *queue_stat;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (6 preceding siblings ...)
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware Jeff Kirsher
@ 2015-04-03 20:26 ` Jeff Kirsher
2015-04-03 21:03 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them Jeff Kirsher
` (16 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:26 UTC (permalink / raw)
To: intel-wired-lan
Even though it shouldn't strictly matter, don't count queue stats higher
than the max_queues value stored for this mac. This ensures that we
don't attempt to check queues which don't belong to use in VFs. This
shouldn't be a visible change, as the VFs should see zero for queues
which don't belong to them.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 18 +++++++++++-------
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 478e67b..cbfaf94 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -98,12 +98,11 @@ static const struct fm10k_stats fm10k_gstrings_stats[] = {
#define FM10K_GLOBAL_STATS_LEN ARRAY_SIZE(fm10k_gstrings_stats)
-#define FM10K_QUEUE_STATS_LEN \
- (MAX_QUEUES * 2 * (sizeof(struct fm10k_queue_stats) / sizeof(u64)))
+#define FM10K_QUEUE_STATS_LEN(_n) \
+ ( (_n) * 2 * (sizeof(struct fm10k_queue_stats) / sizeof(u64)))
-#define FM10K_STATS_LEN (FM10K_GLOBAL_STATS_LEN + \
- FM10K_NETDEV_STATS_LEN + \
- FM10K_QUEUE_STATS_LEN)
+#define FM10K_STATIC_STATS_LEN (FM10K_GLOBAL_STATS_LEN + \
+ FM10K_NETDEV_STATS_LEN)
static const char fm10k_gstrings_test[][ETH_GSTRING_LEN] = {
"Mailbox test (on/offline)"
@@ -155,11 +154,16 @@ static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)
static int fm10k_get_sset_count(struct net_device *dev, int sset)
{
+ struct fm10k_intfc *interface = netdev_priv(dev);
+ struct fm10k_hw *hw = &interface->hw;
+ int stats_len = FM10K_STATIC_STATS_LEN;
+
switch (sset) {
case ETH_SS_TEST:
return FM10K_TEST_LEN;
case ETH_SS_STATS:
- return FM10K_STATS_LEN;
+ stats_len += FM10K_QUEUE_STATS_LEN(hw->mac.max_queues);
+ return stats_len;
default:
return -EOPNOTSUPP;
}
@@ -369,7 +373,7 @@ static void fm10k_get_drvinfo(struct net_device *dev,
strncpy(info->bus_info, pci_name(interface->pdev),
sizeof(info->bus_info) - 1);
- info->n_stats = FM10K_STATS_LEN;
+ info->n_stats = fm10k_get_sset_count(dev, ETH_SS_STATS);
info->regdump_len = fm10k_get_regs_len(dev);
}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 12a3044..0ef1d71 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -360,7 +360,7 @@ void fm10k_update_stats(struct fm10k_intfc *interface)
hw->mac.ops.update_hw_stats(hw, &interface->stats);
- for (i = 0; i < FM10K_MAX_QUEUES_PF; i++) {
+ for (i = 0; i < hw->mac.max_queues; i++) {
struct fm10k_hw_stats_q *q = &interface->stats.q[i];
tx_bytes_nic += q->tx_bytes.count;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (7 preceding siblings ...)
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:03 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message Jeff Kirsher
` (15 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
This patch resolves an issue with ethtool stats displaying useless
values on the VF, because some stats simply have no meaning to the VF.
Resolve this by splitting these out into PF_STATS and only showing them
if we aren't the VF.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 51 +++++++++++++++++-------
1 file changed, 37 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index cbfaf94..4687f37 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -57,7 +57,7 @@ static const struct fm10k_stats fm10k_gstrings_net_stats[] = {
.stat_offset = offsetof(struct fm10k_intfc, _stat) \
}
-static const struct fm10k_stats fm10k_gstrings_stats[] = {
+static const struct fm10k_stats fm10k_gstrings_global_stats[] = {
FM10K_STAT("tx_restart_queue", restart_queue),
FM10K_STAT("tx_busy", tx_busy),
FM10K_STAT("tx_csum_errors", tx_csum_errors),
@@ -72,15 +72,6 @@ static const struct fm10k_stats fm10k_gstrings_stats[] = {
FM10K_STAT("rx_overrun_pf", rx_overrun_pf),
FM10K_STAT("rx_overrun_vf", rx_overrun_vf),
- FM10K_STAT("timeout", stats.timeout.count),
- FM10K_STAT("ur", stats.ur.count),
- FM10K_STAT("ca", stats.ca.count),
- FM10K_STAT("um", stats.um.count),
- FM10K_STAT("xec", stats.xec.count),
- FM10K_STAT("vlan_drop", stats.vlan_drop.count),
- FM10K_STAT("loopback_drop", stats.loopback_drop.count),
- FM10K_STAT("nodesc_drop", stats.nodesc_drop.count),
-
FM10K_STAT("swapi_status", hw.swapi.status),
FM10K_STAT("mac_rules_used", hw.swapi.mac.used),
FM10K_STAT("mac_rules_avail", hw.swapi.mac.avail),
@@ -96,7 +87,19 @@ static const struct fm10k_stats fm10k_gstrings_stats[] = {
FM10K_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
};
-#define FM10K_GLOBAL_STATS_LEN ARRAY_SIZE(fm10k_gstrings_stats)
+static const struct fm10k_stats fm10k_gstrings_pf_stats[] = {
+ FM10K_STAT("timeout", stats.timeout.count),
+ FM10K_STAT("ur", stats.ur.count),
+ FM10K_STAT("ca", stats.ca.count),
+ FM10K_STAT("um", stats.um.count),
+ FM10K_STAT("xec", stats.xec.count),
+ FM10K_STAT("vlan_drop", stats.vlan_drop.count),
+ FM10K_STAT("loopback_drop", stats.loopback_drop.count),
+ FM10K_STAT("nodesc_drop", stats.nodesc_drop.count),
+};
+
+#define FM10K_GLOBAL_STATS_LEN ARRAY_SIZE(fm10k_gstrings_global_stats)
+#define FM10K_PF_STATS_LEN ARRAY_SIZE(fm10k_gstrings_pf_stats)
#define FM10K_QUEUE_STATS_LEN(_n) \
( (_n) * 2 * (sizeof(struct fm10k_queue_stats) / sizeof(u64)))
@@ -133,11 +136,18 @@ static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)
p += ETH_GSTRING_LEN;
}
for (i = 0; i < FM10K_GLOBAL_STATS_LEN; i++) {
- memcpy(p, fm10k_gstrings_stats[i].stat_string,
+ memcpy(p, fm10k_gstrings_global_stats[i].stat_string,
ETH_GSTRING_LEN);
p += ETH_GSTRING_LEN;
}
+ if (interface->hw.mac.type != fm10k_mac_vf)
+ for (i = 0; i < FM10K_PF_STATS_LEN; i++) {
+ memcpy(p, fm10k_gstrings_pf_stats[i].stat_string,
+ ETH_GSTRING_LEN);
+ p += ETH_GSTRING_LEN;
+ }
+
for (i = 0; i < interface->hw.mac.max_queues; i++) {
sprintf(p, "tx_queue_%u_packets", i);
p += ETH_GSTRING_LEN;
@@ -163,6 +173,10 @@ static int fm10k_get_sset_count(struct net_device *dev, int sset)
return FM10K_TEST_LEN;
case ETH_SS_STATS:
stats_len += FM10K_QUEUE_STATS_LEN(hw->mac.max_queues);
+
+ if (hw->mac.type != fm10k_mac_vf)
+ stats_len += FM10K_PF_STATS_LEN;
+
return stats_len;
default:
return -EOPNOTSUPP;
@@ -188,11 +202,20 @@ static void fm10k_get_ethtool_stats(struct net_device *netdev,
}
for (i = 0; i < FM10K_GLOBAL_STATS_LEN; i++) {
- p = (char *)interface + fm10k_gstrings_stats[i].stat_offset;
- *(data++) = (fm10k_gstrings_stats[i].sizeof_stat ==
+ p = (char *)interface +
+ fm10k_gstrings_global_stats[i].stat_offset;
+ *(data++) = (fm10k_gstrings_global_stats[i].sizeof_stat ==
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
}
+ if (interface->hw.mac.type != fm10k_mac_vf)
+ for (i = 0; i < FM10K_PF_STATS_LEN; i++) {
+ p = (char *)interface +
+ fm10k_gstrings_pf_stats[i].stat_offset;
+ *(data++) = (fm10k_gstrings_pf_stats[i].sizeof_stat ==
+ sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
+ }
+
for (i = 0; i < interface->hw.mac.max_queues; i++) {
struct fm10k_ring *ring;
u64 *queue_stat;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (8 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:03 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path Jeff Kirsher
` (14 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Since we already print this message when a reset is requested via the
RESET_REQUESTED flag, we do not need to print it before setting the
flag.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index e2c27ba..5022a45 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -1191,7 +1191,6 @@ void fm10k_tx_timeout_reset(struct fm10k_intfc *interface)
{
/* Do the reset outside of interrupt context */
if (!test_bit(__FM10K_DOWN, &interface->state)) {
- netdev_err(interface->netdev, "Reset interface\n");
interface->tx_timeout_count++;
interface->flags |= FM10K_FLAG_RESET_REQUESTED;
fm10k_service_event_schedule(interface);
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (9 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat Jeff Kirsher
` (13 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
We were incrementing the tx_timeout_count for both the Tx hang
and then for all reset flows. Instead, we should only increment
tx_timeout_count in the Tx hang path, so that our Tx hang counter
does not increment when it was not caused by a Tx hang.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 0ef1d71..d7af466 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -191,7 +191,6 @@ static void fm10k_reset_subtask(struct fm10k_intfc *interface)
interface->flags &= ~FM10K_FLAG_RESET_REQUESTED;
netdev_err(interface->netdev, "Reset interface\n");
- interface->tx_timeout_count++;
fm10k_reinit(interface);
}
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (10 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization Jeff Kirsher
` (12 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Named it tx_hang_count to differentiate it from tx_hwtstamp_timeout.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 4687f37..45e504f 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -84,6 +84,8 @@ static const struct fm10k_stats fm10k_gstrings_global_stats[] = {
FM10K_STAT("mbx_rx_dwords", hw.mbx.rx_dwords),
FM10K_STAT("mbx_rx_parse_err", hw.mbx.rx_parse_err),
+ FM10K_STAT("tx_hang_count", tx_timeout_count),
+
FM10K_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
};
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (11 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver Jeff Kirsher
` (11 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
When returning virtualization queues from the VF back to the PF, do not
retain the VF rate limiter.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Todd Russell <todd.a.russell@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
index 159cd84..a92b58d 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
@@ -676,7 +676,8 @@ static s32 fm10k_iov_assign_resources_pf(struct fm10k_hw *hw, u16 num_vfs,
/* loop through unallocated rings assigning them back to PF */
for (i = FM10K_MAX_QUEUES_PF; i < vf_q_idx; i++) {
fm10k_write_reg(hw, FM10K_TXDCTL(i), 0);
- fm10k_write_reg(hw, FM10K_TXQCTL(i), FM10K_TXQCTL_PF | vid);
+ fm10k_write_reg(hw, FM10K_TXQCTL(i), FM10K_TXQCTL_PF |
+ FM10K_TXQCTL_UNLIMITED_BW | vid);
fm10k_write_reg(hw, FM10K_RXQCTL(i), FM10K_RXQCTL_PF);
}
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (12 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path Jeff Kirsher
` (10 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Since we run the watchdog periodically, which might take a while and
potentially monopolize the system default workqueue, create our own
separate work queue. This also helps reduce and stabilize latency
between scheduling the work in our interrupt and actually performing
the work. Still use a timer for the regular scheduled interval but
queue the work onto its own work queue.
It seemed overkill to create a single workqueue per interface, so we
just spawn a single work queue for all interfaces upon driver load. For
this reason, use a multi-threaded workqueue with one thread per
processor, rather than single threaded queue.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +++
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 12 ++++++++++++
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
index 715d0a0..cc7f442e 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
@@ -235,6 +235,9 @@ struct fm10k_vxlan_port {
__be16 port;
};
+/* one work queue for entire driver */
+extern struct workqueue_struct *fm10k_workqueue;
+
struct fm10k_intfc {
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
struct net_device *netdev;
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 5022a45..1e08832 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -41,6 +41,9 @@ MODULE_DESCRIPTION("Intel(R) Ethernet Switch Host Interface Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
+/* single workqueue for entire fm10k driver */
+struct workqueue_struct *fm10k_workqueue = NULL;
+
/**
* fm10k_init_module - Driver Registration Routine
*
@@ -52,6 +55,10 @@ static int __init fm10k_init_module(void)
pr_info("%s - version %s\n", fm10k_driver_string, fm10k_driver_version);
pr_info("%s\n", fm10k_copyright);
+ /* create driver workqueue */
+ if (!fm10k_workqueue)
+ fm10k_workqueue = create_workqueue("fm10k");
+
fm10k_dbg_init();
return fm10k_register_pci_driver();
@@ -69,6 +76,11 @@ static void __exit fm10k_exit_module(void)
fm10k_unregister_pci_driver();
fm10k_dbg_exit();
+
+ /* destroy driver workqueue */
+ flush_workqueue(fm10k_workqueue);
+ destroy_workqueue(fm10k_workqueue);
+ fm10k_workqueue = NULL;
}
module_exit(fm10k_exit_module);
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index d7af466..fcf0d5a 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -94,7 +94,7 @@ void fm10k_service_event_schedule(struct fm10k_intfc *interface)
{
if (!test_bit(__FM10K_SERVICE_DISABLE, &interface->state) &&
!test_and_set_bit(__FM10K_SERVICE_SCHED, &interface->state))
- schedule_work(&interface->service_task);
+ queue_work(fm10k_workqueue, &interface->service_task);
}
static void fm10k_service_event_complete(struct fm10k_intfc *interface)
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (13 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow Jeff Kirsher
` (9 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Since we already schedule the service task, we can just wait for this
task to handle the mailbox events from the VF. This reduces some complex
code flow, and makes it so we have a single path for handling the VF
messages. There is a possibility that we have a slight delay in handling
VF messages, but it should be minimal.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 30 ++--------------------------
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 3 +++
2 files changed, 5 insertions(+), 28 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
index 69cbfde..1071f38 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
@@ -47,7 +47,7 @@ s32 fm10k_iov_event(struct fm10k_intfc *interface)
{
struct fm10k_hw *hw = &interface->hw;
struct fm10k_iov_data *iov_data;
- s64 mbicr, vflre;
+ s64 vflre;
int i;
/* if there is no iov_data then there is no mailboxes to process */
@@ -63,7 +63,7 @@ s32 fm10k_iov_event(struct fm10k_intfc *interface)
goto read_unlock;
if (!(fm10k_read_reg(hw, FM10K_EICR) & FM10K_EICR_VFLR))
- goto process_mbx;
+ goto read_unlock;
/* read VFLRE to determine if any VFs have been reset */
do {
@@ -86,32 +86,6 @@ s32 fm10k_iov_event(struct fm10k_intfc *interface)
}
} while (i != iov_data->num_vfs);
-process_mbx:
- /* read MBICR to determine which VFs require attention */
- mbicr = fm10k_read_reg(hw, FM10K_MBICR(1));
- mbicr <<= 32;
- mbicr |= fm10k_read_reg(hw, FM10K_MBICR(0));
-
- i = iov_data->next_vf_mbx ? : iov_data->num_vfs;
-
- for (mbicr <<= 64 - i; i--; mbicr += mbicr) {
- struct fm10k_mbx_info *mbx = &iov_data->vf_info[i].mbx;
-
- if (mbicr >= 0)
- continue;
-
- if (!hw->mbx.ops.tx_ready(&hw->mbx, FM10K_VFMBX_MSG_MTU))
- break;
-
- mbx->ops.process(hw, mbx);
- }
-
- if (i >= 0) {
- iov_data->next_vf_mbx = i + 1;
- } else if (iov_data->next_vf_mbx) {
- iov_data->next_vf_mbx = 0;
- goto process_mbx;
- }
read_unlock:
rcu_read_unlock();
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index fcf0d5a..25458ca 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -984,6 +984,7 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
/* service mailboxes */
if (fm10k_mbx_trylock(interface)) {
mbx->ops.process(hw, mbx);
+ /* handle VFLRE events */
fm10k_iov_event(interface);
fm10k_mbx_unlock(interface);
}
@@ -1000,6 +1001,8 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
/* we should validate host state after interrupt event */
hw->mac.get_host_state = 1;
+
+ /* validate host state, and handle VF mailboxes in the service task */
fm10k_service_event_schedule(interface);
/* re-enable mailbox interrupt and indicate 20us delay */
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (14 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment Jeff Kirsher
` (8 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Add a header comment explaining why we have the somewhat crazy mailbox
flow. This flow is necessary as it prevents the PF<->SM mailbox from
being flooded by the VF messages, which normally trigger a message to
the PF. This helps prevent the case where we see a PF mailbox timeout.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
index 1071f38..ce361cf 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
@@ -113,6 +113,13 @@ s32 fm10k_iov_mbx(struct fm10k_intfc *interface)
/* lock the mailbox for transmit and receive */
fm10k_mbx_lock(interface);
+ /* Most VF messages sent to the PF cause the PF to respond by
+ * requesting from the SM mailbox. This means that too many VF
+ * messages processed at once could cause a mailbox timeout on the PF.
+ * To prevent this, store a pointer to the next VF mbx to process. Use
+ * that as the start of the loop so that we don't starve whichever VF
+ * got ignored on the previous run.
+ */
process_mbx:
for (i = iov_data->next_vf_mbx ? : iov_data->num_vfs; i--;) {
struct fm10k_vf_info *vf_info = &iov_data->vf_info[i];
@@ -141,6 +148,10 @@ process_mbx:
mbx->ops.process(hw, mbx);
}
+ /* if we stopped processing mailboxes early, update next_vf_mbx.
+ * Otherwise, reset next_vf_mbx, and restart loop so that we process
+ * the remaining mailboxes we skipped at the start.
+ */
if (i >= 0) {
iov_data->next_vf_mbx = i + 1;
} else if (iov_data->next_vf_mbx) {
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (15 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe Jeff Kirsher
` (7 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
The header comment included a miscopy of a C-code line, and also
mis-used Rx FIFO when it clearly meant Tx FIFO
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
index 59faf32..e9ecfb4 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
@@ -326,8 +326,7 @@ static u16 fm10k_mbx_validate_msg_size(struct fm10k_mbx_info *mbx, u16 len)
* fm10k_mbx_write_copy - pulls data off of Tx FIFO and places it in mbmem
* @mbx: pointer to mailbox
*
- * This function will take a section of the Rx FIFO and copy it into the
- mbx->tail--;
+ * This function will take a section of the Tx FIFO and copy it into the
* mailbox memory. The offset in mbmem is based on the lower bits of the
* tail and len determines the length to copy.
**/
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (16 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed Jeff Kirsher
` (6 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Since the service task handles varying work that doesn't all require the
interface to be up, launch the service timer immediately. This ensures
that we continually check the mailbox, as well as handle other tasks
while the device is down.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 25458ca..cc527dd 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1489,7 +1489,7 @@ void fm10k_up(struct fm10k_intfc *interface)
/* enable transmits */
netif_tx_start_all_queues(interface->netdev);
- /* kick off the service timer */
+ /* kick off the service timer now */
hw->mac.get_host_state = 1;
mod_timer(&interface->service_timer, jiffies);
}
@@ -1529,8 +1529,6 @@ void fm10k_down(struct fm10k_intfc *interface)
/* disable polling routines */
fm10k_napi_disable_all(interface);
- del_timer_sync(&interface->service_timer);
-
/* capture stats one last time before stopping interface */
fm10k_update_stats(interface);
@@ -1656,6 +1654,9 @@ static int fm10k_sw_init(struct fm10k_intfc *interface,
(unsigned long)interface);
INIT_WORK(&interface->service_task, fm10k_service_task);
+ /* kick off service timer now, even when interface is down */
+ mod_timer(&interface->service_timer, (HZ * 2) + jiffies);
+
/* Intitialize timestamp data */
fm10k_ts_init(interface);
@@ -1872,6 +1873,8 @@ static void fm10k_remove(struct pci_dev *pdev)
struct fm10k_intfc *interface = pci_get_drvdata(pdev);
struct net_device *netdev = interface->netdev;
+ del_timer_sync(&interface->service_timer);
+
set_bit(__FM10K_SERVICE_DISABLE, &interface->state);
cancel_work_sync(&interface->service_task);
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (17 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
2015-04-04 18:16 ` Alexander Duyck
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses Jeff Kirsher
` (5 subsequent siblings)
24 siblings, 2 replies; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
Fm10k's interrupt throttle timers are based on the PCIe link
speed. Because of this, the value being programmed into the ITR
registers must be scaled.
For the PF, this is as simple as reading the PCIe link speed and storing
the result. However, in the case of SR-IOV, the VF's interrupt throttle
timers are based on the link speed of the PF. However, the VF is unable
to get the link speed information from its configuration space, so the
PF must inform it of what scale to use.
Rather than pass this scale via mailbox message, take advantage of
unused bits in the TDLEN register to pass the scale. It is the
responsibility of the PF to program this for the VF while setting up the
VF queues and the responsibility of the VF to get the information
accordingly. This is preferable because it allows the VF to set up the
interrupts properly during initialization and matches how the MAC
address is passed in the TDBAL/TDBAH registers.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k.h | 4 ++++
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 17 +++++++++++++----
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 12 ++++++++++--
drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 16 +++++++++++++++-
drivers/net/ethernet/intel/fm10k/fm10k_type.h | 6 ++++++
drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 11 +++++++++--
6 files changed, 57 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
index cc7f442e..feb53c0 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
@@ -131,6 +131,7 @@ struct fm10k_ring {
* different for DCB and RSS modes
*/
u8 qos_pc; /* priority class of queue */
+ u8 itr_scale; /* throttle scaler based on PCI speed */
u16 vid; /* default vlan ID of queue */
u16 count; /* amount of descriptors */
@@ -164,6 +165,9 @@ struct fm10k_ring_container {
#define FM10K_ITR_10K 100 /* 100us */
#define FM10K_ITR_20K 50 /* 50us */
#define FM10K_ITR_ADAPTIVE 0x8000 /* adaptive interrupt moderation flag */
+#define FM10K_ITR_SCALE_SMALL 60 /* Constant factor for small frames */
+#define FM10K_ITR_SCALE_MEDIUM 50 /* Constant factor for medium frames */
+#define FM10K_ITR_SCALE_LARGE 40 /* Constant factor for large frames */
#define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 1e08832..cd2e86a 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -1395,11 +1395,20 @@ static void fm10k_update_itr(struct fm10k_ring_container *ring_container)
if (avg_wire_size > 3000)
avg_wire_size = 3000;
- /* Give a little boost to mid-size frames */
- if ((avg_wire_size > 300) && (avg_wire_size < 1200))
- avg_wire_size /= 3;
+ /* Simple throttle rate management based on average wire size,
+ * providing boosts to small and medium packet loads. Divide the
+ * average wire size by a constant factor to calculate the minimum time
+ * until the next interrupt in microseconds.
+ */
+ if (avg_wire_size < 300)
+ avg_wire_size /= FM10K_ITR_SCALE_SMALL;
+ else if ((avg_wire_size >= 300) && (avg_wire_size < 1200))
+ avg_wire_size /= FM10K_ITR_SCALE_MEDIUM;
else
- avg_wire_size /= 2;
+ avg_wire_size /= FM10K_ITR_SCALE_LARGE;
+
+ /* Scale for various PCIe link speeds */
+ avg_wire_size /= ring_container->ring->itr_scale;
/* write back value and retain adaptive flag */
ring_container->itr = avg_wire_size | FM10K_ITR_ADAPTIVE;
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index cc527dd..c7c9832 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -532,6 +532,9 @@ static void fm10k_configure_tx_ring(struct fm10k_intfc *interface,
/* store tail pointer */
ring->tail = &interface->uc_addr[FM10K_TDT(reg_idx)];
+ /* store ITR scale */
+ ring->itr_scale = hw->mac.itr_scale;
+
/* reset ntu and ntc to place SW in sync with hardwdare */
ring->next_to_clean = 0;
ring->next_to_use = 0;
@@ -638,6 +641,9 @@ static void fm10k_configure_rx_ring(struct fm10k_intfc *interface,
/* store tail pointer */
ring->tail = &interface->uc_addr[FM10K_RDT(reg_idx)];
+ /* store ITR scale */
+ ring->itr_scale = hw->mac.itr_scale;
+
/* reset ntu and ntc to place SW in sync with hardwdare */
ring->next_to_clean = 0;
ring->next_to_use = 0;
@@ -824,7 +830,8 @@ static irqreturn_t fm10k_msix_mbx_vf(int __always_unused irq, void *data)
/* re-enable mailbox interrupt and indicate 20us delay */
fm10k_write_reg(hw, FM10K_VFITR(FM10K_MBX_VECTOR),
- FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
+ FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
+ hw->mac.itr_scale));
/* service upstream mailbox */
if (fm10k_mbx_trylock(interface)) {
@@ -1007,7 +1014,8 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
/* re-enable mailbox interrupt and indicate 20us delay */
fm10k_write_reg(hw, FM10K_ITR(FM10K_MBX_VECTOR),
- FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
+ FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
+ hw->mac.itr_scale));
return IRQ_HANDLED;
}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
index a92b58d..be80024 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
@@ -144,16 +144,21 @@ static s32 fm10k_init_hw_pf(struct fm10k_hw *hw)
FM10K_TPH_RXCTRL_HDR_WROEN);
}
- /* set max hold interval to align with 1.024 usec in all modes */
+ /* set max hold interval to align with 1.024 usec in all modes and
+ * store ITR scale
+ */
switch (hw->bus.speed) {
case fm10k_bus_speed_2500:
dma_ctrl = FM10K_DMA_CTRL_MAX_HOLD_1US_GEN1;
+ hw->mac.itr_scale = FM10K_TDLEN_ITR_SCALE_GEN1;
break;
case fm10k_bus_speed_5000:
dma_ctrl = FM10K_DMA_CTRL_MAX_HOLD_1US_GEN2;
+ hw->mac.itr_scale = FM10K_TDLEN_ITR_SCALE_GEN2;
break;
case fm10k_bus_speed_8000:
dma_ctrl = FM10K_DMA_CTRL_MAX_HOLD_1US_GEN3;
+ hw->mac.itr_scale = FM10K_TDLEN_ITR_SCALE_GEN3;
break;
default:
dma_ctrl = 0;
@@ -907,6 +912,12 @@ static s32 fm10k_iov_assign_default_mac_vlan_pf(struct fm10k_hw *hw,
fm10k_write_reg(hw, FM10K_TDBAL(vf_q_idx), tdbal);
fm10k_write_reg(hw, FM10K_TDBAH(vf_q_idx), tdbah);
+ /* Provide the VF the ITR scale, using software-defined fields in TDLEN
+ * to pass the information during VF initialization
+ */
+ fm10k_write_reg(hw, FM10K_TDLEN(vf_q_idx), hw->mac.itr_scale <<
+ FM10K_TDLEN_ITR_SCALE_SHIFT);
+
err_out:
/* configure Queue control register */
txqctl = ((u32)vf_vid << FM10K_TXQCTL_VID_SHIFT) &
@@ -1039,6 +1050,9 @@ static s32 fm10k_iov_reset_resources_pf(struct fm10k_hw *hw,
for (i = queues_per_pool; i--;) {
fm10k_write_reg(hw, FM10K_TDBAL(vf_q_idx + i), tdbal);
fm10k_write_reg(hw, FM10K_TDBAH(vf_q_idx + i), tdbah);
+ fm10k_write_reg(hw, FM10K_TDLEN(vf_q_idx + i),
+ hw->mac.itr_scale <<
+ FM10K_TDLEN_ITR_SCALE_SHIFT);
fm10k_write_reg(hw, FM10K_TQMAP(qmap_idx + i), vf_q_idx + i);
fm10k_write_reg(hw, FM10K_RQMAP(qmap_idx + i), vf_q_idx + i);
}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_type.h b/drivers/net/ethernet/intel/fm10k/fm10k_type.h
index 4af9668..c9a646d 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_type.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_type.h
@@ -271,6 +271,11 @@ struct fm10k_hw;
#define FM10K_TDBAL(_n) ((0x40 * (_n)) + 0x8000)
#define FM10K_TDBAH(_n) ((0x40 * (_n)) + 0x8001)
#define FM10K_TDLEN(_n) ((0x40 * (_n)) + 0x8002)
+#define FM10K_TDLEN_ITR_SCALE_SHIFT 9
+#define FM10K_TDLEN_ITR_SCALE_MASK 0x00000E00
+#define FM10K_TDLEN_ITR_SCALE_GEN1 4
+#define FM10K_TDLEN_ITR_SCALE_GEN2 2
+#define FM10K_TDLEN_ITR_SCALE_GEN3 1
#define FM10K_TPH_TXCTRL(_n) ((0x40 * (_n)) + 0x8003)
#define FM10K_TPH_TXCTRL_DESC_TPHEN 0x00000020
#define FM10K_TPH_TXCTRL_DESC_RROEN 0x00000200
@@ -560,6 +565,7 @@ struct fm10k_mac_info {
bool get_host_state;
bool tx_ready;
u32 dglort_map;
+ u8 itr_scale;
};
struct fm10k_swapi_table_info {
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
index 94f0f6a..099f190 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
@@ -28,7 +28,7 @@
static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
{
u8 *perm_addr = hw->mac.perm_addr;
- u32 bal = 0, bah = 0;
+ u32 bal = 0, bah = 0, tdlen;
s32 err;
u16 i;
@@ -48,6 +48,9 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
((u32)perm_addr[2]);
}
+ /* restore default itr_scale for next VF initialization */
+ tdlen = hw->mac.itr_scale << FM10K_TDLEN_ITR_SCALE_SHIFT;
+
/* The queues have already been disabled so we just need to
* update their base address registers
*/
@@ -56,6 +59,7 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
fm10k_write_reg(hw, FM10K_TDBAH(i), bah);
fm10k_write_reg(hw, FM10K_RDBAL(i), bal);
fm10k_write_reg(hw, FM10K_RDBAH(i), bah);
+ fm10k_write_reg(hw, FM10K_TDLEN(i), tdlen);
}
return 0;
@@ -124,9 +128,12 @@ static s32 fm10k_init_hw_vf(struct fm10k_hw *hw)
/* record maximum queue count */
hw->mac.max_queues = i;
- /* fetch default VLAN */
+ /* fetch default VLAN and ITR scale */
hw->mac.default_vid = (fm10k_read_reg(hw, FM10K_TXQCTL(0)) &
FM10K_TXQCTL_VID_MASK) >> FM10K_TXQCTL_VID_SHIFT;
+ hw->mac.itr_scale = (fm10k_read_reg(hw, FM10K_TDLEN(0)) &
+ FM10K_TDLEN_ITR_SCALE_MASK) >>
+ FM10K_TDLEN_ITR_SCALE_SHIFT;
return 0;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (18 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized Jeff Kirsher
` (4 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
When the PF receives a request to update a multicast address for the VF,
it checks the enabled multicast mode first. Fix a bug where the VF tried
to set a multicast address before requesting the required xcast mode.
This ensures the multicast addresses are honored as long as the xcast
mode was allowed.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index c9f87bb..7f5c36a 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -966,14 +966,7 @@ static void fm10k_set_rx_mode(struct net_device *dev)
fm10k_mbx_lock(interface);
- /* synchronize all of the addresses */
- if (xcast_mode != FM10K_XCAST_MODE_PROMISC) {
- __dev_uc_sync(dev, fm10k_uc_sync, fm10k_uc_unsync);
- if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI)
- __dev_mc_sync(dev, fm10k_mc_sync, fm10k_mc_unsync);
- }
-
- /* if we aren't changing modes there is nothing to do */
+ /* update xcast mode first, but only if it changed */
if (interface->xcast_mode != xcast_mode) {
/* update VLAN table */
if (xcast_mode == FM10K_XCAST_MODE_PROMISC)
@@ -988,6 +981,13 @@ static void fm10k_set_rx_mode(struct net_device *dev)
interface->xcast_mode = xcast_mode;
}
+ /* synchronize all of the addresses */
+ if (xcast_mode != FM10K_XCAST_MODE_PROMISC) {
+ __dev_uc_sync(dev, fm10k_uc_sync, fm10k_uc_unsync);
+ if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI)
+ __dev_mc_sync(dev, fm10k_mc_sync, fm10k_mc_unsync);
+ }
+
fm10k_mbx_unlock(interface);
}
@@ -1047,6 +1047,9 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface)
vid, true, 0);
}
+ /* update xcast mode before syncronizing addresses */
+ hw->mac.ops.update_xcast_mode(hw, glort, xcast_mode);
+
/* synchronize all of the addresses */
if (xcast_mode != FM10K_XCAST_MODE_PROMISC) {
__dev_uc_sync(netdev, fm10k_uc_sync, fm10k_uc_unsync);
@@ -1054,9 +1057,6 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface)
__dev_mc_sync(netdev, fm10k_mc_sync, fm10k_mc_unsync);
}
- /* update xcast mode */
- hw->mac.ops.update_xcast_mode(hw, glort, xcast_mode);
-
fm10k_mbx_unlock(interface);
/* record updated xcast mode state */
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (19 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size Jeff Kirsher
` (3 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
The use of dropped doesn't really mean dropped mailbox messages, but
rather specifically messages which were too large to fit in the remote
Rx FIFO. Rename the stat to more clearly indicate what it means.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 45e504f..4b9d9f8 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -77,7 +77,7 @@ static const struct fm10k_stats fm10k_gstrings_global_stats[] = {
FM10K_STAT("mac_rules_avail", hw.swapi.mac.avail),
FM10K_STAT("mbx_tx_busy", hw.mbx.tx_busy),
- FM10K_STAT("mbx_tx_dropped", hw.mbx.tx_dropped),
+ FM10K_STAT("mbx_tx_oversized", hw.mbx.tx_dropped),
FM10K_STAT("mbx_tx_messages", hw.mbx.tx_messages),
FM10K_STAT("mbx_tx_dwords", hw.mbx.tx_dwords),
FM10K_STAT("mbx_rx_messages", hw.mbx.rx_messages),
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (20 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:07 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages Jeff Kirsher
` (2 subsequent siblings)
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
When we forcefully shutdown the mailbox, we then go about resetting max
size to 0, and clearing all messages in the FIFO. Instead, we should
just reset the head pointer so that the FIFO becomes empty, rather than
changing the max size to 0. This helps prevent increment in tx_dropped
counter during mailbox negotiation, which is confusing to viewers of
Linux ethtool statistics output.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
index e9ecfb4..27f8279 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
@@ -126,6 +126,18 @@ static u16 fm10k_fifo_head_drop(struct fm10k_mbx_fifo *fifo)
}
/**
+ * fm10k_fifo_drop_all - Drop all messages in FIFO
+ * @fifo: pointer to FIFO
+ *
+ * This function resets the head pointer to drop all messages in the FIFO,
+ * and ensure the FIFO is empty.
+ **/
+static void fm10k_fifo_drop_all(struct fm10k_mbx_fifo *fifo)
+{
+ fifo->head = fifo->tail;
+}
+
+/**
* fm10k_mbx_index_len - Convert a head/tail index into a length value
* @mbx: pointer to mailbox
* @head: head index
@@ -1370,9 +1382,11 @@ static void fm10k_mbx_disconnect(struct fm10k_hw *hw,
timeout -= FM10K_MBX_POLL_DELAY;
} while ((timeout > 0) && (mbx->state != FM10K_STATE_CLOSED));
- /* in case we didn't close just force the mailbox into shutdown */
+ /* in case we didn't close, just force the mailbox into shutdown and
+ * drop all left over messages in the FIFO.
+ */
fm10k_mbx_connect_reset(mbx);
- fm10k_mbx_update_max_size(mbx, 0);
+ fm10k_fifo_drop_all(&mbx->tx);
fm10k_write_reg(hw, mbx->mbmem_reg, 0);
}
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (21 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:07 ` Jeff Kirsher
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update Jeff Kirsher
2015-04-03 21:00 ` [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
When we call update_max_size it does not drop all oversized messages.
This is due to the difficulty in performing this operation, since it is
a FIFO which makes updating anything other than head or tail very
difficult. To fix this, modify validate_msg_size to ensure that we error
out later when trying to transmit the message that could be oversized.
This will generally be a rare condition, as it requires the FIFO to
include a message larger than the max_size negotiated during mailbox
connect. Note that max_size is always smaller than rx.size so it should
be safe to use here.
Also, update the update_max_size function header comment to clearly
indicate that it does not drop all oversized messages, but only those at
the head of the FIFO.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
index 27f8279..1b27383 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
@@ -327,7 +327,7 @@ static u16 fm10k_mbx_validate_msg_size(struct fm10k_mbx_info *mbx, u16 len)
} while (total_len < len);
/* message extends out of pushed section, but fits in FIFO */
- if ((len < total_len) && (msg_len <= mbx->rx.size))
+ if ((len < total_len) && (msg_len <= mbx->max_size))
return 0;
/* return length of invalid section */
@@ -1063,8 +1063,11 @@ static void fm10k_mbx_reset_work(struct fm10k_mbx_info *mbx)
* @mbx: pointer to mailbox
* @size: new value for max_size
*
- * This function will update the max_size value and drop any outgoing messages
- * from the head of the Tx FIFO that are larger than max_size.
+ * This function updates the max_size value and drops any outgoing messages
+ * at the head of the Tx FIFO if they are larger than max_size. It does not
+ * drop all messages, as this is too difficult to parse and remove them from
+ * the FIFO. Instead, rely on the checking to ensure that messages larger
+ * than max_size aren't pushed into the memory buffer.
**/
static void fm10k_mbx_update_max_size(struct fm10k_mbx_info *mbx, u16 size)
{
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (22 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages Jeff Kirsher
@ 2015-04-03 20:27 ` Jeff Kirsher
2015-04-03 21:07 ` Jeff Kirsher
2015-04-03 21:00 ` [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 20:27 UTC (permalink / raw)
To: intel-wired-lan
VFs were being improperly added to the switch's multicast group. The
error stems from the fact that incorrect arguments were passed to the
"update_mc_addr" function. It would seem to be a copy paste error since
the parameters are similar to the "update_uc_addr" function.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
index be80024..30264d8 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
@@ -334,6 +334,9 @@ static s32 fm10k_update_xc_addr_pf(struct fm10k_hw *hw, u16 glort,
struct fm10k_mac_update mac_update;
u32 msg[5];
+ /* clear set bit from VLAN ID */
+ vid &= ~FM10K_VLAN_CLEAR;
+
/* if glort or vlan are not valid return error */
if (!fm10k_glort_valid_pf(hw, glort) || vid >= FM10K_VLAN_TABLE_VID_MAX)
return FM10K_ERR_PARAM;
@@ -1264,8 +1267,8 @@ s32 fm10k_iov_msg_mac_vlan_pf(struct fm10k_hw *hw, u32 **results,
}
/* notify switch of request for new multicast address */
- err = hw->mac.ops.update_mc_addr(hw, vf_info->glort, mac,
- !(vlan & FM10K_VLAN_CLEAR), 0);
+ err = hw->mac.ops.update_mc_addr(hw, vf_info->glort, mac, vlan,
+ !(vlan & FM10K_VLAN_CLEAR));
}
return err;
--
1.9.3
^ permalink raw reply related [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
` (23 preceding siblings ...)
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update Jeff Kirsher
@ 2015-04-03 21:00 ` Jeff Kirsher
2015-04-14 19:36 ` Singh, Krishneil K
24 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:00 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> The function collecting Tx statistics was actually using values from
> the RX
> ring. Thus, Tx and Rx statistics values reported by "ifconfig" will
> return identical values. This change corrects this error and the Tx
> statistics is now reading from the Tx ring.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/8ea413f9/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
@ 2015-04-03 21:01 ` Jeff Kirsher
2015-04-14 19:37 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:01 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Output of ethtool was reporting 2 rx_errors entries. This change
> removes one of the redundant entries.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +--
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 3 +--
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 5 ++---
> 3 files changed, 4 insertions(+), 7 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/63436402/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake Jeff Kirsher
@ 2015-04-03 21:01 ` Jeff Kirsher
2015-04-14 19:37 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:01 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Corrected a spelling mistake that was found over time.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/754b54a1/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init Jeff Kirsher
@ 2015-04-03 21:01 ` Jeff Kirsher
2015-04-14 19:42 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:01 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Currently, the VFs do not read the default VLAN during initialization,
> so they will not be able to indicate untagged frames properly.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/4abb4eac/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
@ 2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:44 ` Singh, Krishneil K
2015-04-07 15:17 ` Alexander Duyck
1 sibling, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:02 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> This change adds a function called "fm10k_netpoll" that's used to
> define
> "ndo_poll_controller" in "fm10k_netdev_ops". This is required to
> enable
> support for "netconsole" in fm10k.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 1 +
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 21
> +++++++++++++++++++++
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 3 files changed, 23 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/223445f6/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings Jeff Kirsher
@ 2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:45 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:02 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> The were several functions which had parameters which were never or
> sometimes used in functions. To resolve possible compiler warnings,
> use __always_unused or __maybe_unused kernel macros to resolve.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c | 6 +++---
> drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 8 +++++---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 12 ++++++------
> drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 6 +++---
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 18
> ++++++------------
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 17
> +++++++++--------
> drivers/net/ethernet/intel/fm10k/fm10k_ptp.c | 5 +++--
> 7 files changed, 35 insertions(+), 37 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/b3ca7632/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
@ 2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:45 ` Singh, Krishneil K
2015-04-04 17:39 ` Alexander Duyck
1 sibling, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:02 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Previously, the user was not allowed to create a VLAN interface on top
> of the switch default vid.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
> 1 file changed, 4 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/29968564/attachment-0001.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware Jeff Kirsher
@ 2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:46 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:02 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Currently, we show statistics for all 128 queues, even though we don't
> necessarily have that many queues available especially in the VF case.
> Instead, use the hw->mac.max_queues value, which tells us how many
> queues we actually have, rather than the space for the rings we
> allocated. In this way, we prevent dumping statistics that are useless
> on the VF.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/025936ae/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats Jeff Kirsher
@ 2015-04-03 21:03 ` Jeff Kirsher
2015-04-14 19:47 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:03 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Even though it shouldn't strictly matter, don't count queue stats
> higher
> than the max_queues value stored for this mac. This ensures that we
> don't attempt to check queues which don't belong to use in VFs. This
> shouldn't be a visible change, as the VFs should see zero for queues
> which don't belong to them.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 18
> +++++++++++-------
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 2 files changed, 12 insertions(+), 8 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/c874000b/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them Jeff Kirsher
@ 2015-04-03 21:03 ` Jeff Kirsher
2015-04-14 19:47 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:03 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> This patch resolves an issue with ethtool stats displaying useless
> values on the VF, because some stats simply have no meaning to the VF.
> Resolve this by splitting these out into PF_STATS and only showing
> them
> if we aren't the VF.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 51
> +++++++++++++++++-------
> 1 file changed, 37 insertions(+), 14 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/ba6ba4ec/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message Jeff Kirsher
@ 2015-04-03 21:03 ` Jeff Kirsher
2015-04-14 19:47 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:03 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since we already print this message when a reset is requested via the
> RESET_REQUESTED flag, we do not need to print it before setting the
> flag.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 1 -
> 1 file changed, 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/c8ece0b8/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path Jeff Kirsher
@ 2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:48 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:04 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> We were incrementing the tx_timeout_count for both the Tx hang
> and then for all reset flows. Instead, we should only increment
> tx_timeout_count in the Tx hang path, so that our Tx hang counter
> does not increment when it was not caused by a Tx hang.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 1 -
> 1 file changed, 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/b5a2ffe4/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat Jeff Kirsher
@ 2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:48 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:04 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Named it tx_hang_count to differentiate it from tx_hwtstamp_timeout.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 ++
> 1 file changed, 2 insertions(+)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/4dae378b/attachment-0001.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization Jeff Kirsher
@ 2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:04 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When returning virtualization queues from the VF back to the PF, do
> not
> retain the VF rate limiter.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Todd Russell <todd.a.russell@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/8dabeb4d/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver Jeff Kirsher
@ 2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:04 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since we run the watchdog periodically, which might take a while and
> potentially monopolize the system default workqueue, create our own
> separate work queue. This also helps reduce and stabilize latency
> between scheduling the work in our interrupt and actually performing
> the work. Still use a timer for the regular scheduled interval but
> queue the work onto its own work queue.
>
> It seemed overkill to create a single workqueue per interface, so we
> just spawn a single work queue for all interfaces upon driver load.
> For
> this reason, use a multi-threaded workqueue with one thread per
> processor, rather than single threaded queue.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +++
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 12 ++++++++++++
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 3 files changed, 16 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/caa940cc/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path Jeff Kirsher
@ 2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:05 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since we already schedule the service task, we can just wait for this
> task to handle the mailbox events from the VF. This reduces some
> complex
> code flow, and makes it so we have a single path for handling the VF
> messages. There is a possibility that we have a slight delay in
> handling
> VF messages, but it should be minimal.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 30
> ++--------------------------
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 3 +++
> 2 files changed, 5 insertions(+), 28 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/656a09a2/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow Jeff Kirsher
@ 2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:05 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Add a header comment explaining why we have the somewhat crazy mailbox
> flow. This flow is necessary as it prevents the PF<->SM mailbox from
> being flooded by the VF messages, which normally trigger a message to
> the PF. This helps prevent the case where we see a PF mailbox timeout.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/0a3383a1/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment Jeff Kirsher
@ 2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:05 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> The header comment included a miscopy of a C-code line, and also
> mis-used Rx FIFO when it clearly meant Tx FIFO
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/771c0d71/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe Jeff Kirsher
@ 2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:05 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since the service task handles varying work that doesn't all require
> the
> interface to be up, launch the service timer immediately. This ensures
> that we continually check the mailbox, as well as handle other tasks
> while the device is down.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/a61cae49/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed Jeff Kirsher
@ 2015-04-03 21:06 ` Jeff Kirsher
2015-04-04 18:16 ` Alexander Duyck
1 sibling, 0 replies; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:06 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Fm10k's interrupt throttle timers are based on the PCIe link
> speed. Because of this, the value being programmed into the ITR
> registers must be scaled.
>
> For the PF, this is as simple as reading the PCIe link speed and
> storing
> the result. However, in the case of SR-IOV, the VF's interrupt
> throttle
> timers are based on the link speed of the PF. However, the VF is
> unable
> to get the link speed information from its configuration space, so the
> PF must inform it of what scale to use.
>
> Rather than pass this scale via mailbox message, take advantage of
> unused bits in the TDLEN register to pass the scale. It is the
> responsibility of the PF to program this for the VF while setting up
> the
> VF queues and the responsibility of the VF to get the information
> accordingly. This is preferable because it allows the VF to set up the
> interrupts properly during initialization and matches how the MAC
> address is passed in the TDBAL/TDBAH registers.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 4 ++++
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 17 +++++++++++++----
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 12 ++++++++++--
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 16 +++++++++++++++-
> drivers/net/ethernet/intel/fm10k/fm10k_type.h | 6 ++++++
> drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 11 +++++++++--
> 6 files changed, 57 insertions(+), 9 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/8670b4c5/attachment-0001.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses Jeff Kirsher
@ 2015-04-03 21:06 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:06 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When the PF receives a request to update a multicast address for the
> VF,
> it checks the enabled multicast mode first. Fix a bug where the VF
> tried
> to set a multicast address before requesting the required xcast mode.
> This ensures the multicast addresses are honored as long as the xcast
> mode was allowed.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 22
> +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/7514b79c/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized Jeff Kirsher
@ 2015-04-03 21:06 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:06 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> The use of dropped doesn't really mean dropped mailbox messages, but
> rather specifically messages which were too large to fit in the remote
> Rx FIFO. Rename the stat to more clearly indicate what it means.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/b87cf8b8/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size Jeff Kirsher
@ 2015-04-03 21:07 ` Jeff Kirsher
2015-04-14 19:51 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:07 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When we forcefully shutdown the mailbox, we then go about resetting
> max
> size to 0, and clearing all messages in the FIFO. Instead, we should
> just reset the head pointer so that the FIFO becomes empty, rather
> than
> changing the max size to 0. This helps prevent increment in tx_dropped
> counter during mailbox negotiation, which is confusing to viewers of
> Linux ethtool statistics output.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/200e42ed/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages Jeff Kirsher
@ 2015-04-03 21:07 ` Jeff Kirsher
2015-04-14 19:51 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:07 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When we call update_max_size it does not drop all oversized messages.
> This is due to the difficulty in performing this operation, since it
> is
> a FIFO which makes updating anything other than head or tail very
> difficult. To fix this, modify validate_msg_size to ensure that we
> error
> out later when trying to transmit the message that could be oversized.
> This will generally be a rare condition, as it requires the FIFO to
> include a message larger than the max_size negotiated during mailbox
> connect. Note that max_size is always smaller than rx.size so it
> should
> be safe to use here.
>
> Also, update the update_max_size function header comment to clearly
> indicate that it does not drop all oversized messages, but only those
> at
> the head of the FIFO.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/0252b906/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update Jeff Kirsher
@ 2015-04-03 21:07 ` Jeff Kirsher
2015-04-14 19:51 ` Singh, Krishneil K
0 siblings, 1 reply; 80+ messages in thread
From: Jeff Kirsher @ 2015-04-03 21:07 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> VFs were being improperly added to the switch's multicast group. The
> error stems from the fact that incorrect arguments were passed to the
> "update_mc_addr" function. It would seem to be a copy paste error
> since
> the parameters are similar to the "update_uc_addr" function.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/109015bf/attachment.asc>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
@ 2015-04-04 17:39 ` Alexander Duyck
1 sibling, 0 replies; 80+ messages in thread
From: Alexander Duyck @ 2015-04-04 17:39 UTC (permalink / raw)
To: intel-wired-lan
On 04/03/2015 01:26 PM, Jeff Kirsher wrote:
> Previously, the user was not allowed to create a VLAN interface on top
> of the switch default vid.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> index 2a61b83..c9f87bb 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> @@ -770,10 +770,6 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
> if (hw->mac.vlan_override)
> return -EACCES;
>
> - /* if default VLAN is already present do nothing */
> - if (vid == hw->mac.default_vid)
> - return -EBUSY;
> -
> /* update active_vlans bitmask */
> set_bit(vid, interface->active_vlans);
> if (!set)
Instead of removing this it should probably just return 0 and move it
down a few lines after setting or clearing the bit. Otherwise you will
strip the default VLAN on removal and I am pretty sure that will disable
all receives until the interface is reset and restores VLAN 0 from the
VF which maps to the default VLAN.
- Alex
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
@ 2015-04-04 18:16 ` Alexander Duyck
2015-04-06 16:39 ` Vick, Matthew
1 sibling, 1 reply; 80+ messages in thread
From: Alexander Duyck @ 2015-04-04 18:16 UTC (permalink / raw)
To: intel-wired-lan
On 04/03/2015 01:27 PM, Jeff Kirsher wrote:
> Fm10k's interrupt throttle timers are based on the PCIe link
> speed. Because of this, the value being programmed into the ITR
> registers must be scaled.
>
> For the PF, this is as simple as reading the PCIe link speed and storing
> the result. However, in the case of SR-IOV, the VF's interrupt throttle
> timers are based on the link speed of the PF. However, the VF is unable
> to get the link speed information from its configuration space, so the
> PF must inform it of what scale to use.
>
> Rather than pass this scale via mailbox message, take advantage of
> unused bits in the TDLEN register to pass the scale. It is the
> responsibility of the PF to program this for the VF while setting up the
> VF queues and the responsibility of the VF to get the information
> accordingly. This is preferable because it allows the VF to set up the
> interrupts properly during initialization and matches how the MAC
> address is passed in the TDBAL/TDBAH registers.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 4 ++++
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 17 +++++++++++++----
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 12 ++++++++++--
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 16 +++++++++++++++-
> drivers/net/ethernet/intel/fm10k/fm10k_type.h | 6 ++++++
> drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 11 +++++++++--
> 6 files changed, 57 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
> index cc7f442e..feb53c0 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k.h
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
> @@ -131,6 +131,7 @@ struct fm10k_ring {
> * different for DCB and RSS modes
> */
> u8 qos_pc; /* priority class of queue */
> + u8 itr_scale; /* throttle scaler based on PCI speed */
> u16 vid; /* default vlan ID of queue */
> u16 count; /* amount of descriptors */
>
This shouldn't be a part of the ring. If it is related to the ITR it
really belongs in the ring container or the q_vector.
> @@ -164,6 +165,9 @@ struct fm10k_ring_container {
> #define FM10K_ITR_10K 100 /* 100us */
> #define FM10K_ITR_20K 50 /* 50us */
> #define FM10K_ITR_ADAPTIVE 0x8000 /* adaptive interrupt moderation flag */
> +#define FM10K_ITR_SCALE_SMALL 60 /* Constant factor for small frames */
> +#define FM10K_ITR_SCALE_MEDIUM 50 /* Constant factor for medium frames */
> +#define FM10K_ITR_SCALE_LARGE 40 /* Constant factor for large frames */
>
> #define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
>
These values don't make any sense to me, where did they come from?
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> index 1e08832..cd2e86a 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> @@ -1395,11 +1395,20 @@ static void fm10k_update_itr(struct fm10k_ring_container *ring_container)
> if (avg_wire_size > 3000)
> avg_wire_size = 3000;
>
> - /* Give a little boost to mid-size frames */
> - if ((avg_wire_size > 300) && (avg_wire_size < 1200))
> - avg_wire_size /= 3;
> + /* Simple throttle rate management based on average wire size,
> + * providing boosts to small and medium packet loads. Divide the
> + * average wire size by a constant factor to calculate the minimum time
> + * until the next interrupt in microseconds.
> + */
> + if (avg_wire_size < 300)
> + avg_wire_size /= FM10K_ITR_SCALE_SMALL;
> + else if ((avg_wire_size >= 300) && (avg_wire_size < 1200))
> + avg_wire_size /= FM10K_ITR_SCALE_MEDIUM;
> else
> - avg_wire_size /= 2;
> + avg_wire_size /= FM10K_ITR_SCALE_LARGE;
> +
> + /* Scale for various PCIe link speeds */
> + avg_wire_size /= ring_container->ring->itr_scale;
>
> /* write back value and retain adaptive flag */
> ring_container->itr = avg_wire_size | FM10K_ITR_ADAPTIVE;
This seems like all it is doing is maxing out the interrupt rate for all
cases. For example, a value of 1514 is reduced to 37.8. When you use
that as a usecs value that means the queue is capable of over 26K
interrupts per second.
The division by itr_scale is a really bad idea. I would recommend
replacing it with a shift and you should probably check for the value
hitting 0.
I suspect you probably aren't seeing much of a penalty because the MSI-X
interrupt call is pretty cheap, however that is still a pretty high
interrupt rate compared to past parts.
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> index cc527dd..c7c9832 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> @@ -532,6 +532,9 @@ static void fm10k_configure_tx_ring(struct fm10k_intfc *interface,
> /* store tail pointer */
> ring->tail = &interface->uc_addr[FM10K_TDT(reg_idx)];
>
> + /* store ITR scale */
> + ring->itr_scale = hw->mac.itr_scale;
> +
> /* reset ntu and ntc to place SW in sync with hardwdare */
> ring->next_to_clean = 0;
> ring->next_to_use = 0;
> @@ -638,6 +641,9 @@ static void fm10k_configure_rx_ring(struct fm10k_intfc *interface,
> /* store tail pointer */
> ring->tail = &interface->uc_addr[FM10K_RDT(reg_idx)];
>
> + /* store ITR scale */
> + ring->itr_scale = hw->mac.itr_scale;
> +
> /* reset ntu and ntc to place SW in sync with hardwdare */
> ring->next_to_clean = 0;
> ring->next_to_use = 0;
> @@ -824,7 +830,8 @@ static irqreturn_t fm10k_msix_mbx_vf(int __always_unused irq, void *data)
>
> /* re-enable mailbox interrupt and indicate 20us delay */
> fm10k_write_reg(hw, FM10K_VFITR(FM10K_MBX_VECTOR),
> - FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
> + FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
> + hw->mac.itr_scale));
>
> /* service upstream mailbox */
> if (fm10k_mbx_trylock(interface)) {
> @@ -1007,7 +1014,8 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
>
> /* re-enable mailbox interrupt and indicate 20us delay */
> fm10k_write_reg(hw, FM10K_ITR(FM10K_MBX_VECTOR),
> - FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
> + FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
> + hw->mac.itr_scale));
>
> return IRQ_HANDLED;
> }
You would be much better off here using the itr_scale as a multiple or a
shift value rather than doing a divide in an interrupt handler as a
divide can be quite expensive.
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
> index a92b58d..be80024 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
> @@ -144,16 +144,21 @@ static s32 fm10k_init_hw_pf(struct fm10k_hw *hw)
> FM10K_TPH_RXCTRL_HDR_WROEN);
> }
>
> - /* set max hold interval to align with 1.024 usec in all modes */
> + /* set max hold interval to align with 1.024 usec in all modes and
> + * store ITR scale
> + */
> switch (hw->bus.speed) {
> case fm10k_bus_speed_2500:
> dma_ctrl = FM10K_DMA_CTRL_MAX_HOLD_1US_GEN1;
> + hw->mac.itr_scale = FM10K_TDLEN_ITR_SCALE_GEN1;
> break;
> case fm10k_bus_speed_5000:
> dma_ctrl = FM10K_DMA_CTRL_MAX_HOLD_1US_GEN2;
> + hw->mac.itr_scale = FM10K_TDLEN_ITR_SCALE_GEN2;
> break;
> case fm10k_bus_speed_8000:
> dma_ctrl = FM10K_DMA_CTRL_MAX_HOLD_1US_GEN3;
> + hw->mac.itr_scale = FM10K_TDLEN_ITR_SCALE_GEN3;
> break;
> default:
> dma_ctrl = 0;
> @@ -907,6 +912,12 @@ static s32 fm10k_iov_assign_default_mac_vlan_pf(struct fm10k_hw *hw,
> fm10k_write_reg(hw, FM10K_TDBAL(vf_q_idx), tdbal);
> fm10k_write_reg(hw, FM10K_TDBAH(vf_q_idx), tdbah);
>
> + /* Provide the VF the ITR scale, using software-defined fields in TDLEN
> + * to pass the information during VF initialization
> + */
> + fm10k_write_reg(hw, FM10K_TDLEN(vf_q_idx), hw->mac.itr_scale <<
> + FM10K_TDLEN_ITR_SCALE_SHIFT);
> +
> err_out:
> /* configure Queue control register */
> txqctl = ((u32)vf_vid << FM10K_TXQCTL_VID_SHIFT) &
> @@ -1039,6 +1050,9 @@ static s32 fm10k_iov_reset_resources_pf(struct fm10k_hw *hw,
> for (i = queues_per_pool; i--;) {
> fm10k_write_reg(hw, FM10K_TDBAL(vf_q_idx + i), tdbal);
> fm10k_write_reg(hw, FM10K_TDBAH(vf_q_idx + i), tdbah);
> + fm10k_write_reg(hw, FM10K_TDLEN(vf_q_idx + i),
> + hw->mac.itr_scale <<
> + FM10K_TDLEN_ITR_SCALE_SHIFT);
> fm10k_write_reg(hw, FM10K_TQMAP(qmap_idx + i), vf_q_idx + i);
> fm10k_write_reg(hw, FM10K_RQMAP(qmap_idx + i), vf_q_idx + i);
> }
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_type.h b/drivers/net/ethernet/intel/fm10k/fm10k_type.h
> index 4af9668..c9a646d 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_type.h
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_type.h
> @@ -271,6 +271,11 @@ struct fm10k_hw;
> #define FM10K_TDBAL(_n) ((0x40 * (_n)) + 0x8000)
> #define FM10K_TDBAH(_n) ((0x40 * (_n)) + 0x8001)
> #define FM10K_TDLEN(_n) ((0x40 * (_n)) + 0x8002)
> +#define FM10K_TDLEN_ITR_SCALE_SHIFT 9
> +#define FM10K_TDLEN_ITR_SCALE_MASK 0x00000E00
> +#define FM10K_TDLEN_ITR_SCALE_GEN1 4
> +#define FM10K_TDLEN_ITR_SCALE_GEN2 2
> +#define FM10K_TDLEN_ITR_SCALE_GEN3 1
> #define FM10K_TPH_TXCTRL(_n) ((0x40 * (_n)) + 0x8003)
> #define FM10K_TPH_TXCTRL_DESC_TPHEN 0x00000020
> #define FM10K_TPH_TXCTRL_DESC_RROEN 0x00000200
> @@ -560,6 +565,7 @@ struct fm10k_mac_info {
> bool get_host_state;
> bool tx_ready;
> u32 dglort_map;
> + u8 itr_scale;
> };
>
> struct fm10k_swapi_table_info {
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
> index 94f0f6a..099f190 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c
> @@ -28,7 +28,7 @@
> static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
> {
> u8 *perm_addr = hw->mac.perm_addr;
> - u32 bal = 0, bah = 0;
> + u32 bal = 0, bah = 0, tdlen;
> s32 err;
> u16 i;
>
> @@ -48,6 +48,9 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
> ((u32)perm_addr[2]);
> }
>
> + /* restore default itr_scale for next VF initialization */
> + tdlen = hw->mac.itr_scale << FM10K_TDLEN_ITR_SCALE_SHIFT;
> +
> /* The queues have already been disabled so we just need to
> * update their base address registers
> */
> @@ -56,6 +59,7 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
> fm10k_write_reg(hw, FM10K_TDBAH(i), bah);
> fm10k_write_reg(hw, FM10K_RDBAL(i), bal);
> fm10k_write_reg(hw, FM10K_RDBAH(i), bah);
> + fm10k_write_reg(hw, FM10K_TDLEN(i), tdlen);
> }
>
> return 0;
> @@ -124,9 +128,12 @@ static s32 fm10k_init_hw_vf(struct fm10k_hw *hw)
> /* record maximum queue count */
> hw->mac.max_queues = i;
>
> - /* fetch default VLAN */
> + /* fetch default VLAN and ITR scale */
> hw->mac.default_vid = (fm10k_read_reg(hw, FM10K_TXQCTL(0)) &
> FM10K_TXQCTL_VID_MASK) >> FM10K_TXQCTL_VID_SHIFT;
> + hw->mac.itr_scale = (fm10k_read_reg(hw, FM10K_TDLEN(0)) &
> + FM10K_TDLEN_ITR_SCALE_MASK) >>
> + FM10K_TDLEN_ITR_SCALE_SHIFT;
>
> return 0;
> }
>
This is a good reason to get rid of the divide in favor of a shift. If
a VF didn't restore the tdlen value using the stop_hw_vf function then
you could potentially have one driver load trip up the next and cause a
divide by 0.
- Alex
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed
2015-04-04 18:16 ` Alexander Duyck
@ 2015-04-06 16:39 ` Vick, Matthew
2015-04-06 17:05 ` Alexander Duyck
0 siblings, 1 reply; 80+ messages in thread
From: Vick, Matthew @ 2015-04-06 16:39 UTC (permalink / raw)
To: intel-wired-lan
On 4/4/15, 11:16 AM, "Alexander Duyck" <alexander.duyck@gmail.com> wrote:
>On 04/03/2015 01:27 PM, Jeff Kirsher wrote:
[...]
>>
>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h
>>b/drivers/net/ethernet/intel/fm10k/fm10k.h
>> index cc7f442e..feb53c0 100644
>> --- a/drivers/net/ethernet/intel/fm10k/fm10k.h
>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
>> @@ -131,6 +131,7 @@ struct fm10k_ring {
>> * different for DCB and RSS modes
>> */
>> u8 qos_pc; /* priority class of queue */
>> + u8 itr_scale; /* throttle scaler based on PCI speed */
>> u16 vid; /* default vlan ID of queue */
>> u16 count; /* amount of descriptors */
>>
>
>This shouldn't be a part of the ring. If it is related to the ITR it
>really belongs in the ring container or the q_vector.
Fair enough--I definitely went back and forth on where to put it. I think
I'll put it in the ring container, since the ITR already gets updated
there. It's just mildly annoying during the initialization routines is all.
>> @@ -164,6 +165,9 @@ struct fm10k_ring_container {
>> #define FM10K_ITR_10K 100 /* 100us */
>> #define FM10K_ITR_20K 50 /* 50us */
>> #define FM10K_ITR_ADAPTIVE 0x8000 /* adaptive interrupt moderation
>>flag */
>> +#define FM10K_ITR_SCALE_SMALL 60 /* Constant factor for small frames */
>> +#define FM10K_ITR_SCALE_MEDIUM 50 /* Constant factor for medium frames
>>*/
>> +#define FM10K_ITR_SCALE_LARGE 40 /* Constant factor for large frames */
>>
>> #define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
>>
>
>These values don't make any sense to me, where did they come from?
They were experimental. I'll be the first to admit they probably aren't
perfect, but they're at least a significant improvement.
Do you have some recommendations for interrupt rates at 25G/50G? Depending
on what the targets are, it'd be nice to get these scalars to something we
can shift by instead of divide by.
>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>> index 1e08832..cd2e86a 100644
>> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>> @@ -1395,11 +1395,20 @@ static void fm10k_update_itr(struct
>>fm10k_ring_container *ring_container)
>> if (avg_wire_size > 3000)
>> avg_wire_size = 3000;
>>
>> - /* Give a little boost to mid-size frames */
>> - if ((avg_wire_size > 300) && (avg_wire_size < 1200))
>> - avg_wire_size /= 3;
>> + /* Simple throttle rate management based on average wire size,
>> + * providing boosts to small and medium packet loads. Divide the
>> + * average wire size by a constant factor to calculate the minimum
>>time
>> + * until the next interrupt in microseconds.
>> + */
>> + if (avg_wire_size < 300)
>> + avg_wire_size /= FM10K_ITR_SCALE_SMALL;
>> + else if ((avg_wire_size >= 300) && (avg_wire_size < 1200))
>> + avg_wire_size /= FM10K_ITR_SCALE_MEDIUM;
>> else
>> - avg_wire_size /= 2;
>> + avg_wire_size /= FM10K_ITR_SCALE_LARGE;
>> +
>> + /* Scale for various PCIe link speeds */
>> + avg_wire_size /= ring_container->ring->itr_scale;
>>
>> /* write back value and retain adaptive flag */
>> ring_container->itr = avg_wire_size | FM10K_ITR_ADAPTIVE;
>
>This seems like all it is doing is maxing out the interrupt rate for all
>cases. For example, a value of 1514 is reduced to 37.8. When you use
>that as a usecs value that means the queue is capable of over 26K
>interrupts per second.
>
>The division by itr_scale is a really bad idea. I would recommend
>replacing it with a shift and you should probably check for the value
>hitting 0.
>
>I suspect you probably aren't seeing much of a penalty because the MSI-X
>interrupt call is pretty cheap, however that is still a pretty high
>interrupt rate compared to past parts.
The interrupt rates are definitely open to suggestion. I tried to maintain
the idea of the original algorithm, which did basically the same thing
(avg_wire_size divided by some scalar), so I'm not seeing what's
significantly different here from that angle.
A shift for the itr_scale is a fair suggestion. I'll incorporate that into
a v2.
I definitely understand that I went with some high interrupt values, but
given the architecture of the device I'd be skeptical about dropping all
the way to 8000int/s.
>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>>b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>> index cc527dd..c7c9832 100644
>> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>> @@ -532,6 +532,9 @@ static void fm10k_configure_tx_ring(struct
>>fm10k_intfc *interface,
>> /* store tail pointer */
>> ring->tail = &interface->uc_addr[FM10K_TDT(reg_idx)];
>>
>> + /* store ITR scale */
>> + ring->itr_scale = hw->mac.itr_scale;
>> +
>> /* reset ntu and ntc to place SW in sync with hardwdare */
>> ring->next_to_clean = 0;
>> ring->next_to_use = 0;
>> @@ -638,6 +641,9 @@ static void fm10k_configure_rx_ring(struct
>>fm10k_intfc *interface,
>> /* store tail pointer */
>> ring->tail = &interface->uc_addr[FM10K_RDT(reg_idx)];
>>
>> + /* store ITR scale */
>> + ring->itr_scale = hw->mac.itr_scale;
>> +
>> /* reset ntu and ntc to place SW in sync with hardwdare */
>> ring->next_to_clean = 0;
>> ring->next_to_use = 0;
>> @@ -824,7 +830,8 @@ static irqreturn_t fm10k_msix_mbx_vf(int
>>__always_unused irq, void *data)
>>
>> /* re-enable mailbox interrupt and indicate 20us delay */
>> fm10k_write_reg(hw, FM10K_VFITR(FM10K_MBX_VECTOR),
>> - FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
>> + FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
>> + hw->mac.itr_scale));
>>
>> /* service upstream mailbox */
>> if (fm10k_mbx_trylock(interface)) {
>> @@ -1007,7 +1014,8 @@ static irqreturn_t fm10k_msix_mbx_pf(int
>>__always_unused irq, void *data)
>>
>> /* re-enable mailbox interrupt and indicate 20us delay */
>> fm10k_write_reg(hw, FM10K_ITR(FM10K_MBX_VECTOR),
>> - FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
>> + FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
>> + hw->mac.itr_scale));
>>
>> return IRQ_HANDLED;
>> }
>
>You would be much better off here using the itr_scale as a multiple or a
>shift value rather than doing a divide in an interrupt handler as a
>divide can be quite expensive.
Will fix for v2.
>> @@ -56,6 +59,7 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
>> fm10k_write_reg(hw, FM10K_TDBAH(i), bah);
>> fm10k_write_reg(hw, FM10K_RDBAL(i), bal);
>> fm10k_write_reg(hw, FM10K_RDBAH(i), bah);
>> + fm10k_write_reg(hw, FM10K_TDLEN(i), tdlen);
>> }
>>
>> return 0;
>> @@ -124,9 +128,12 @@ static s32 fm10k_init_hw_vf(struct fm10k_hw *hw)
>> /* record maximum queue count */
>> hw->mac.max_queues = i;
>>
>> - /* fetch default VLAN */
>> + /* fetch default VLAN and ITR scale */
>> hw->mac.default_vid = (fm10k_read_reg(hw, FM10K_TXQCTL(0)) &
>> FM10K_TXQCTL_VID_MASK) >> FM10K_TXQCTL_VID_SHIFT;
>> + hw->mac.itr_scale = (fm10k_read_reg(hw, FM10K_TDLEN(0)) &
>> + FM10K_TDLEN_ITR_SCALE_MASK) >>
>> + FM10K_TDLEN_ITR_SCALE_SHIFT;
>>
>> return 0;
>> }
>>
>
>This is a good reason to get rid of the divide in favor of a shift. If
>a VF didn't restore the tdlen value using the stop_hw_vf function then
>you could potentially have one driver load trip up the next and cause a
>divide by 0.
Agreed, and sure enough we have a commit in the works that assumes a
default value if we read zero. I originally went with the divide for
readability's sake, but the shift is probably the better choice, so I'll
send a v2 with that.
If you have some suggestions for an interrupt range, I can look into
incorporating those as well.
Thank you for the review, Alex!
Cheers,
Matthew
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed
2015-04-06 16:39 ` Vick, Matthew
@ 2015-04-06 17:05 ` Alexander Duyck
2015-04-06 18:33 ` Vick, Matthew
0 siblings, 1 reply; 80+ messages in thread
From: Alexander Duyck @ 2015-04-06 17:05 UTC (permalink / raw)
To: intel-wired-lan
On 04/06/2015 09:39 AM, Vick, Matthew wrote:
> On 4/4/15, 11:16 AM, "Alexander Duyck" <alexander.duyck@gmail.com> wrote:
>
>> On 04/03/2015 01:27 PM, Jeff Kirsher wrote:
> [...]
>
>>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h
>>> b/drivers/net/ethernet/intel/fm10k/fm10k.h
>>> index cc7f442e..feb53c0 100644
>>> --- a/drivers/net/ethernet/intel/fm10k/fm10k.h
>>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
>>> @@ -131,6 +131,7 @@ struct fm10k_ring {
>>> * different for DCB and RSS modes
>>> */
>>> u8 qos_pc; /* priority class of queue */
>>> + u8 itr_scale; /* throttle scaler based on PCI speed */
>>> u16 vid; /* default vlan ID of queue */
>>> u16 count; /* amount of descriptors */
>>>
>> This shouldn't be a part of the ring. If it is related to the ITR it
>> really belongs in the ring container or the q_vector.
> Fair enough--I definitely went back and forth on where to put it. I think
> I'll put it in the ring container, since the ITR already gets updated
> there. It's just mildly annoying during the initialization routines is all.
>
>>> @@ -164,6 +165,9 @@ struct fm10k_ring_container {
>>> #define FM10K_ITR_10K 100 /* 100us */
>>> #define FM10K_ITR_20K 50 /* 50us */
>>> #define FM10K_ITR_ADAPTIVE 0x8000 /* adaptive interrupt moderation
>>> flag */
>>> +#define FM10K_ITR_SCALE_SMALL 60 /* Constant factor for small frames */
>>> +#define FM10K_ITR_SCALE_MEDIUM 50 /* Constant factor for medium frames
>>> */
>>> +#define FM10K_ITR_SCALE_LARGE 40 /* Constant factor for large frames */
>>>
>>> #define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
>>>
>> These values don't make any sense to me, where did they come from?
> They were experimental. I'll be the first to admit they probably aren't
> perfect, but they're at least a significant improvement.
>
> Do you have some recommendations for interrupt rates at 25G/50G? Depending
> on what the targets are, it'd be nice to get these scalars to something we
> can shift by instead of divide by.
If nothing else these need to be documented along with the expected
range of interrupts per second.
So for example if you expect the FM10K_ITR_SCALE_SMALL of 60 to be used
with packets 300 bytes and smaller you should document somewhere that
this is going to drive rates of 1 million to 200 thousand interrupts per
second if that is what you actually want. I was assuming that was a bug
since that value seems obscenely high, however at 50Gb/s I supposed it
is possible that you could theoretically push 70Mpps so in theory that
might be appropriate if we were actually processing small packets at
line rate.. :-)
>>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>> b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>> index 1e08832..cd2e86a 100644
>>> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>> @@ -1395,11 +1395,20 @@ static void fm10k_update_itr(struct
>>> fm10k_ring_container *ring_container)
>>> if (avg_wire_size > 3000)
>>> avg_wire_size = 3000;
>>>
>>> - /* Give a little boost to mid-size frames */
>>> - if ((avg_wire_size > 300) && (avg_wire_size < 1200))
>>> - avg_wire_size /= 3;
>>> + /* Simple throttle rate management based on average wire size,
>>> + * providing boosts to small and medium packet loads. Divide the
>>> + * average wire size by a constant factor to calculate the minimum
>>> time
>>> + * until the next interrupt in microseconds.
>>> + */
>>> + if (avg_wire_size < 300)
>>> + avg_wire_size /= FM10K_ITR_SCALE_SMALL;
>>> + else if ((avg_wire_size >= 300) && (avg_wire_size < 1200))
>>> + avg_wire_size /= FM10K_ITR_SCALE_MEDIUM;
>>> else
>>> - avg_wire_size /= 2;
>>> + avg_wire_size /= FM10K_ITR_SCALE_LARGE;
>>> +
>>> + /* Scale for various PCIe link speeds */
>>> + avg_wire_size /= ring_container->ring->itr_scale;
>>>
>>> /* write back value and retain adaptive flag */
>>> ring_container->itr = avg_wire_size | FM10K_ITR_ADAPTIVE;
>> This seems like all it is doing is maxing out the interrupt rate for all
>> cases. For example, a value of 1514 is reduced to 37.8. When you use
>> that as a usecs value that means the queue is capable of over 26K
>> interrupts per second.
>>
>> The division by itr_scale is a really bad idea. I would recommend
>> replacing it with a shift and you should probably check for the value
>> hitting 0.
>>
>> I suspect you probably aren't seeing much of a penalty because the MSI-X
>> interrupt call is pretty cheap, however that is still a pretty high
>> interrupt rate compared to past parts.
> The interrupt rates are definitely open to suggestion. I tried to maintain
> the idea of the original algorithm, which did basically the same thing
> (avg_wire_size divided by some scalar), so I'm not seeing what's
> significantly different here from that angle.
>
> A shift for the itr_scale is a fair suggestion. I'll incorporate that into
> a v2.
>
> I definitely understand that I went with some high interrupt values, but
> given the architecture of the device I'd be skeptical about dropping all
> the way to 8000int/s.
I think the big issue with this is that there is no bottom end. So if
you have a setup where you are running small packets your adjustment
brings it all the way down to 1us since 60/60 is 1. Then you also have
to do a shift by 2 or divide by 4 for the PCIe gen1 which will bring the
value down to 0 which isn't correct.
What you probably need to do is look at creating a limit on just how low
a value you can have. Since you are having to do a divide by 4 after
the computation you might make 4us the lowest value you can generate for
this algorithm, and probably make that the limit, excluding ITR
disabled, for user controllable interrupt moderation as well. Then that
way things are always at least throttled to no more than 250K
interrupts/second per queue. Otherwise there is s good chance that
everything with packet size smaller than 240B will just end up with no
interrupt moderation since that is currently being shifted off into
oblivion.
>
>>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>>> b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>>> index cc527dd..c7c9832 100644
>>> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
>>> @@ -532,6 +532,9 @@ static void fm10k_configure_tx_ring(struct
>>> fm10k_intfc *interface,
>>> /* store tail pointer */
>>> ring->tail = &interface->uc_addr[FM10K_TDT(reg_idx)];
>>>
>>> + /* store ITR scale */
>>> + ring->itr_scale = hw->mac.itr_scale;
>>> +
>>> /* reset ntu and ntc to place SW in sync with hardwdare */
>>> ring->next_to_clean = 0;
>>> ring->next_to_use = 0;
>>> @@ -638,6 +641,9 @@ static void fm10k_configure_rx_ring(struct
>>> fm10k_intfc *interface,
>>> /* store tail pointer */
>>> ring->tail = &interface->uc_addr[FM10K_RDT(reg_idx)];
>>>
>>> + /* store ITR scale */
>>> + ring->itr_scale = hw->mac.itr_scale;
>>> +
>>> /* reset ntu and ntc to place SW in sync with hardwdare */
>>> ring->next_to_clean = 0;
>>> ring->next_to_use = 0;
>>> @@ -824,7 +830,8 @@ static irqreturn_t fm10k_msix_mbx_vf(int
>>> __always_unused irq, void *data)
>>>
>>> /* re-enable mailbox interrupt and indicate 20us delay */
>>> fm10k_write_reg(hw, FM10K_VFITR(FM10K_MBX_VECTOR),
>>> - FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
>>> + FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
>>> + hw->mac.itr_scale));
>>>
>>> /* service upstream mailbox */
>>> if (fm10k_mbx_trylock(interface)) {
>>> @@ -1007,7 +1014,8 @@ static irqreturn_t fm10k_msix_mbx_pf(int
>>> __always_unused irq, void *data)
>>>
>>> /* re-enable mailbox interrupt and indicate 20us delay */
>>> fm10k_write_reg(hw, FM10K_ITR(FM10K_MBX_VECTOR),
>>> - FM10K_ITR_ENABLE | FM10K_MBX_INT_DELAY);
>>> + FM10K_ITR_ENABLE | (FM10K_MBX_INT_DELAY /
>>> + hw->mac.itr_scale));
>>>
>>> return IRQ_HANDLED;
>>> }
>> You would be much better off here using the itr_scale as a multiple or a
>> shift value rather than doing a divide in an interrupt handler as a
>> divide can be quite expensive.
> Will fix for v2.
>
>>> @@ -56,6 +59,7 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)
>>> fm10k_write_reg(hw, FM10K_TDBAH(i), bah);
>>> fm10k_write_reg(hw, FM10K_RDBAL(i), bal);
>>> fm10k_write_reg(hw, FM10K_RDBAH(i), bah);
>>> + fm10k_write_reg(hw, FM10K_TDLEN(i), tdlen);
>>> }
>>>
>>> return 0;
>>> @@ -124,9 +128,12 @@ static s32 fm10k_init_hw_vf(struct fm10k_hw *hw)
>>> /* record maximum queue count */
>>> hw->mac.max_queues = i;
>>>
>>> - /* fetch default VLAN */
>>> + /* fetch default VLAN and ITR scale */
>>> hw->mac.default_vid = (fm10k_read_reg(hw, FM10K_TXQCTL(0)) &
>>> FM10K_TXQCTL_VID_MASK) >> FM10K_TXQCTL_VID_SHIFT;
>>> + hw->mac.itr_scale = (fm10k_read_reg(hw, FM10K_TDLEN(0)) &
>>> + FM10K_TDLEN_ITR_SCALE_MASK) >>
>>> + FM10K_TDLEN_ITR_SCALE_SHIFT;
>>>
>>> return 0;
>>> }
>>>
>> This is a good reason to get rid of the divide in favor of a shift. If
>> a VF didn't restore the tdlen value using the stop_hw_vf function then
>> you could potentially have one driver load trip up the next and cause a
>> divide by 0.
> Agreed, and sure enough we have a commit in the works that assumes a
> default value if we read zero. I originally went with the divide for
> readability's sake, but the shift is probably the better choice, so I'll
> send a v2 with that.
>
> If you have some suggestions for an interrupt range, I can look into
> incorporating those as well.
>
> Thank you for the review, Alex!
>
> Cheers,
> Matthew
>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed
2015-04-06 17:05 ` Alexander Duyck
@ 2015-04-06 18:33 ` Vick, Matthew
0 siblings, 0 replies; 80+ messages in thread
From: Vick, Matthew @ 2015-04-06 18:33 UTC (permalink / raw)
To: intel-wired-lan
On 4/6/15, 10:05 AM, "Alexander Duyck" <alexander.duyck@gmail.com> wrote:
>On 04/06/2015 09:39 AM, Vick, Matthew wrote:
>> On 4/4/15, 11:16 AM, "Alexander Duyck" <alexander.duyck@gmail.com>
>>wrote:
>>
>>> On 04/03/2015 01:27 PM, Jeff Kirsher wrote:
[...]
>>>> @@ -164,6 +165,9 @@ struct fm10k_ring_container {
>>>> #define FM10K_ITR_10K 100 /* 100us */
>>>> #define FM10K_ITR_20K 50 /* 50us */
>>>> #define FM10K_ITR_ADAPTIVE 0x8000 /* adaptive interrupt moderation
>>>> flag */
>>>> +#define FM10K_ITR_SCALE_SMALL 60 /* Constant factor for small frames
>>>>*/
>>>> +#define FM10K_ITR_SCALE_MEDIUM 50 /* Constant factor for medium
>>>>frames
>>>> */
>>>> +#define FM10K_ITR_SCALE_LARGE 40 /* Constant factor for large frames
>>>>*/
>>>>
>>>> #define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
>>>>
>>> These values don't make any sense to me, where did they come from?
>> They were experimental. I'll be the first to admit they probably aren't
>> perfect, but they're at least a significant improvement.
>>
>> Do you have some recommendations for interrupt rates at 25G/50G?
>>Depending
>> on what the targets are, it'd be nice to get these scalars to something
>>we
>> can shift by instead of divide by.
>
>If nothing else these need to be documented along with the expected
>range of interrupts per second.
>
>So for example if you expect the FM10K_ITR_SCALE_SMALL of 60 to be used
>with packets 300 bytes and smaller you should document somewhere that
>this is going to drive rates of 1 million to 200 thousand interrupts per
>second if that is what you actually want. I was assuming that was a bug
>since that value seems obscenely high, however at 50Gb/s I supposed it
>is possible that you could theoretically push 70Mpps so in theory that
>might be appropriate if we were actually processing small packets at
>line rate.. :-)
That, um, was totally intentional. Yeah, 1 million interrupts or bust--I
totally didn't mess up the math when I had intended it to go up to 100k
int/s. :) Will definitely fix (and document) in v2.
>>>> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>>> b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>>> index 1e08832..cd2e86a 100644
>>>> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>>> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
>>>> @@ -1395,11 +1395,20 @@ static void fm10k_update_itr(struct
>>>> fm10k_ring_container *ring_container)
>>>> if (avg_wire_size > 3000)
>>>> avg_wire_size = 3000;
>>>>
>>>> - /* Give a little boost to mid-size frames */
>>>> - if ((avg_wire_size > 300) && (avg_wire_size < 1200))
>>>> - avg_wire_size /= 3;
>>>> + /* Simple throttle rate management based on average wire size,
>>>> + * providing boosts to small and medium packet loads. Divide the
>>>> + * average wire size by a constant factor to calculate the minimum
>>>> time
>>>> + * until the next interrupt in microseconds.
>>>> + */
>>>> + if (avg_wire_size < 300)
>>>> + avg_wire_size /= FM10K_ITR_SCALE_SMALL;
>>>> + else if ((avg_wire_size >= 300) && (avg_wire_size < 1200))
>>>> + avg_wire_size /= FM10K_ITR_SCALE_MEDIUM;
>>>> else
>>>> - avg_wire_size /= 2;
>>>> + avg_wire_size /= FM10K_ITR_SCALE_LARGE;
>>>> +
>>>> + /* Scale for various PCIe link speeds */
>>>> + avg_wire_size /= ring_container->ring->itr_scale;
>>>>
>>>> /* write back value and retain adaptive flag */
>>>> ring_container->itr = avg_wire_size | FM10K_ITR_ADAPTIVE;
>>> This seems like all it is doing is maxing out the interrupt rate for
>>>all
>>> cases. For example, a value of 1514 is reduced to 37.8. When you use
>>> that as a usecs value that means the queue is capable of over 26K
>>> interrupts per second.
>>>
>>> The division by itr_scale is a really bad idea. I would recommend
>>> replacing it with a shift and you should probably check for the value
>>> hitting 0.
>>>
>>> I suspect you probably aren't seeing much of a penalty because the
>>>MSI-X
>>> interrupt call is pretty cheap, however that is still a pretty high
>>> interrupt rate compared to past parts.
>> The interrupt rates are definitely open to suggestion. I tried to
>>maintain
>> the idea of the original algorithm, which did basically the same thing
>> (avg_wire_size divided by some scalar), so I'm not seeing what's
>> significantly different here from that angle.
>>
>> A shift for the itr_scale is a fair suggestion. I'll incorporate that
>>into
>> a v2.
>>
>> I definitely understand that I went with some high interrupt values, but
>> given the architecture of the device I'd be skeptical about dropping all
>> the way to 8000int/s.
>
>I think the big issue with this is that there is no bottom end. So if
>you have a setup where you are running small packets your adjustment
>brings it all the way down to 1us since 60/60 is 1. Then you also have
>to do a shift by 2 or divide by 4 for the PCIe gen1 which will bring the
>value down to 0 which isn't correct.
>
>What you probably need to do is look at creating a limit on just how low
>a value you can have. Since you are having to do a divide by 4 after
>the computation you might make 4us the lowest value you can generate for
>this algorithm, and probably make that the limit, excluding ITR
>disabled, for user controllable interrupt moderation as well. Then that
>way things are always at least throttled to no more than 250K
>interrupts/second per queue. Otherwise there is s good chance that
>everything with packet size smaller than 240B will just end up with no
>interrupt moderation since that is currently being shifted off into
>oblivion.
And that's very much a bug I'll make sure to get fixed.
The accidentally unmoderated user input case is a good catch as well! I'll
add some lower bounds based on the PCIe link speed to the set_coalesce
call.
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
@ 2015-04-07 15:17 ` Alexander Duyck
1 sibling, 0 replies; 80+ messages in thread
From: Alexander Duyck @ 2015-04-07 15:17 UTC (permalink / raw)
To: intel-wired-lan
On 04/03/2015 01:26 PM, Jeff Kirsher wrote:
> This change adds a function called "fm10k_netpoll" that's used to define
> "ndo_poll_controller" in "fm10k_netdev_ops". This is required to enable
> support for "netconsole" in fm10k.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 1 +
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 21 +++++++++++++++++++++
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 3 files changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
> index 65e7001..715d0a0 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k.h
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
> @@ -457,6 +457,7 @@ void fm10k_down(struct fm10k_intfc *interface);
> void fm10k_update_stats(struct fm10k_intfc *interface);
> void fm10k_service_event_schedule(struct fm10k_intfc *interface);
> void fm10k_update_rx_drop_en(struct fm10k_intfc *interface);
> +irqreturn_t fm10k_msix_clean_rings(int irq, void *data);
>
> /* Netdev */
> struct net_device *fm10k_alloc_netdev(void);
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> index a7db5e2..2a61b83 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> @@ -1350,6 +1350,26 @@ static void fm10k_dfwd_del_station(struct net_device *dev, void *priv)
> }
> }
>
> +/**
> + * fm10k_netpoll - A Polling 'interrupt' handler
> + * @netdev: network interface device structure
> + *
> + * This is used by netconsole to send skbs without having to re-enable
> + * interrupts. It's not called while the normal interrupt routine is executing.
> + **/
> +static void fm10k_netpoll(struct net_device *netdev)
> +{
> + struct fm10k_intfc *interface = netdev_priv(netdev);
> + int i;
> +
> + /* if interface is down do nothing */
> + if (test_bit(__FM10K_DOWN, &interface->state))
> + return;
> +
> + for (i = 0; i < interface->num_q_vectors; i++)
> + fm10k_msix_clean_rings(0, interface->q_vector[i]);
> +}
> +
> static netdev_features_t fm10k_features_check(struct sk_buff *skb,
> struct net_device *dev,
> netdev_features_t features)
> @@ -1382,6 +1402,7 @@ static const struct net_device_ops fm10k_netdev_ops = {
> .ndo_do_ioctl = fm10k_ioctl,
> .ndo_dfwd_add_station = fm10k_dfwd_add_station,
> .ndo_dfwd_del_station = fm10k_dfwd_del_station,
> + .ndo_poll_controller = fm10k_netpoll,
> .ndo_features_check = fm10k_features_check,
> };
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> index 6fc9965..c11e2c9 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> @@ -807,7 +807,7 @@ static void fm10k_napi_enable_all(struct fm10k_intfc *interface)
> }
> }
>
> -static irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
> +irqreturn_t fm10k_msix_clean_rings(int irq, void *data)
> {
> struct fm10k_q_vector *q_vector = data;
>
2 quick issues with this patch based on the fact that it triggered the
build bot.
1. You should probably place fm10k_netpoll in fm10k_pci.c since it is
technically an interrupt handler. Then you can avoid issues down the
road for having to convert fm10k_msix_clean_rings to a non-static
function that is only used when CONFIG_NET_POLL_CONTROLLER is defined.
2. It should be wrapped in CONFIG_NET_POLL_CONTROLLER along with the
inititalization in the fm10k_netdev_ops structure.
- Alex
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics
2015-04-03 21:00 ` [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
@ 2015-04-14 19:36 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:36 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:01 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Singh, Krishneil K
Subject: Re: [net-next 01/25] fm10k: Corrected an error in Tx statistics
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> The function collecting Tx statistics was actually using values from
> the RX ring. Thus, Tx and Rx statistics values reported by "ifconfig"
> will return identical values. This change corrects this error and the
> Tx statistics is now reading from the Tx ring.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool
2015-04-03 21:01 ` Jeff Kirsher
@ 2015-04-14 19:37 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:37 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:01 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Singh, Krishneil K
Subject: Re: [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Output of ethtool was reporting 2 rx_errors entries. This change
> removes one of the redundant entries.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +--
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 3 +--
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 5 ++---
> 3 files changed, 4 insertions(+), 7 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake
2015-04-03 21:01 ` Jeff Kirsher
@ 2015-04-14 19:37 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:37 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:01 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Kwan, Ngai-mint; Singh, Krishneil K
Subject: Re: [net-next 03/25] fm10k: Correct spelling mistake
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Corrected a spelling mistake that was found over time.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init
2015-04-03 21:01 ` Jeff Kirsher
@ 2015-04-14 19:42 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:42 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:02 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Vick, Matthew; Singh, Krishneil K
Subject: Re: [net-next 04/25] fm10k: Have the VF get the default VLAN during init
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Currently, the VFs do not read the default VLAN during initialization,
> so they will not be able to indicate untagged frames properly.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support
2015-04-03 21:02 ` Jeff Kirsher
@ 2015-04-14 19:44 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:44 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:02 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Kwan, Ngai-mint; Singh, Krishneil K
Subject: Re: [net-next 05/25] fm10k: Add netconsole support
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> This change adds a function called "fm10k_netpoll" that's used to
> define "ndo_poll_controller" in "fm10k_netdev_ops". This is required
> to enable support for "netconsole" in fm10k.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 1 +
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 21
> +++++++++++++++++++++
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 3 files changed, 23 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings
2015-04-03 21:02 ` Jeff Kirsher
@ 2015-04-14 19:45 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:45 UTC (permalink / raw)
To: intel-wired-lan
Thank You
Krishneil Singh
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:02 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 06/25] fm10k: fix unused warnings
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> The were several functions which had parameters which were never or
> sometimes used in functions. To resolve possible compiler warnings,
> use __always_unused or __maybe_unused kernel macros to resolve.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c | 6 +++---
> drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 8 +++++---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 12 ++++++------
> drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 6 +++---
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 18
> ++++++------------
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 17
> +++++++++--------
> drivers/net/ethernet/intel/fm10k/fm10k_ptp.c | 5 +++--
> 7 files changed, 35 insertions(+), 37 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid
2015-04-03 21:02 ` Jeff Kirsher
@ 2015-04-14 19:45 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:45 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:03 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 07/25] fm10k: allow creation of VLAN on default vid
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Previously, the user was not allowed to create a VLAN interface on top
> of the switch default vid.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
> 1 file changed, 4 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware
2015-04-03 21:02 ` Jeff Kirsher
@ 2015-04-14 19:46 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:46 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:03 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Currently, we show statistics for all 128 queues, even though we don't
> necessarily have that many queues available especially in the VF case.
> Instead, use the hw->mac.max_queues value, which tells us how many
> queues we actually have, rather than the space for the rings we
> allocated. In this way, we prevent dumping statistics that are useless
> on the VF.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats
2015-04-03 21:03 ` Jeff Kirsher
@ 2015-04-14 19:47 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:47 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:03 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 09/25] fm10k: use hw->mac.max_queues for stats
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Even though it shouldn't strictly matter, don't count queue stats
> higher than the max_queues value stored for this mac. This ensures
> that we don't attempt to check queues which don't belong to use in
> VFs. This shouldn't be a visible change, as the VFs should see zero
> for queues which don't belong to them.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 18
> +++++++++++-------
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 2 files changed, 12 insertions(+), 8 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them
2015-04-03 21:03 ` Jeff Kirsher
@ 2015-04-14 19:47 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:47 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:04 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 10/25] fm10k: separate PF only stats so that VF does not display them
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> This patch resolves an issue with ethtool stats displaying useless
> values on the VF, because some stats simply have no meaning to the VF.
> Resolve this by splitting these out into PF_STATS and only showing
> them if we aren't the VF.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 51
> +++++++++++++++++-------
> 1 file changed, 37 insertions(+), 14 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message
2015-04-03 21:03 ` Jeff Kirsher
@ 2015-04-14 19:47 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:47 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:04 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 11/25] fm10k: remove extraneous "Reset interface" message
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since we already print this message when a reset is requested via the
> RESET_REQUESTED flag, we do not need to print it before setting the
> flag.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 1 -
> 1 file changed, 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path
2015-04-03 21:04 ` Jeff Kirsher
@ 2015-04-14 19:48 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:48 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:04 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> We were incrementing the tx_timeout_count for both the Tx hang and
> then for all reset flows. Instead, we should only increment
> tx_timeout_count in the Tx hang path, so that our Tx hang counter does
> not increment when it was not caused by a Tx hang.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 1 -
> 1 file changed, 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat
2015-04-03 21:04 ` Jeff Kirsher
@ 2015-04-14 19:48 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:48 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:04 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Named it tx_hang_count to differentiate it from tx_hwtstamp_timeout.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 ++
> 1 file changed, 2 insertions(+)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization
2015-04-03 21:04 ` Jeff Kirsher
@ 2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:49 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:05 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Russell, Todd A; Singh, Krishneil K
Subject: Re: [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When returning virtualization queues from the VF back to the PF, do
> not retain the VF rate limiter.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Todd Russell <todd.a.russell@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver
2015-04-03 21:04 ` Jeff Kirsher
@ 2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:49 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:05 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 15/25] fm10k: use separate workqueue for fm10k driver
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since we run the watchdog periodically, which might take a while and
> potentially monopolize the system default workqueue, create our own
> separate work queue. This also helps reduce and stabilize latency
> between scheduling the work in our interrupt and actually performing
> the work. Still use a timer for the regular scheduled interval but
> queue the work onto its own work queue.
>
> It seemed overkill to create a single workqueue per interface, so we
> just spawn a single work queue for all interfaces upon driver load.
> For
> this reason, use a multi-threaded workqueue with one thread per
> processor, rather than single threaded queue.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +++
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 12 ++++++++++++
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
> 3 files changed, 16 insertions(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path
2015-04-03 21:05 ` Jeff Kirsher
@ 2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:49 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:05 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 16/25] fm10k: don't handle mailbox events in iov_event path
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since we already schedule the service task, we can just wait for this
> task to handle the mailbox events from the VF. This reduces some
> complex code flow, and makes it so we have a single path for handling
> the VF messages. There is a possibility that we have a slight delay in
> handling VF messages, but it should be minimal.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 30
> ++--------------------------
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 3 +++
> 2 files changed, 5 insertions(+), 28 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow
2015-04-03 21:05 ` Jeff Kirsher
@ 2015-04-14 19:49 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:49 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:05 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 17/25] fm10k: comment next_vf_mbx flow
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Add a header comment explaining why we have the somewhat crazy mailbox
> flow. This flow is necessary as it prevents the PF<->SM mailbox from
> being flooded by the VF messages, which normally trigger a message to
> the PF. This helps prevent the case where we see a PF mailbox timeout.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment
2015-04-03 21:05 ` Jeff Kirsher
@ 2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:50 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:06 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 18/25] fm10k: fix function header comment
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> The header comment included a miscopy of a C-code line, and also
> mis-used Rx FIFO when it clearly meant Tx FIFO
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe
2015-04-03 21:05 ` Jeff Kirsher
@ 2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:50 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:06 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 19/25] fm10k: start service timer on probe
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> Since the service task handles varying work that doesn't all require
> the interface to be up, launch the service timer immediately. This
> ensures that we continually check the mailbox, as well as handle other
> tasks while the device is down.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses
2015-04-03 21:06 ` Jeff Kirsher
@ 2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:50 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:07 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When the PF receives a request to update a multicast address for the
> VF, it checks the enabled multicast mode first. Fix a bug where the VF
> tried to set a multicast address before requesting the required xcast
> mode.
> This ensures the multicast addresses are honored as long as the xcast
> mode was allowed.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 22
> +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
2015-04-03 21:06 ` Jeff Kirsher
@ 2015-04-14 19:50 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:50 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:07 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> The use of dropped doesn't really mean dropped mailbox messages, but
> rather specifically messages which were too large to fit in the remote
> Rx FIFO. Rename the stat to more clearly indicate what it means.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size
2015-04-03 21:07 ` Jeff Kirsher
@ 2015-04-14 19:51 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:51 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:07 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 23/25] fm10k: reset head instead of calling update_max_size
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When we forcefully shutdown the mailbox, we then go about resetting
> max size to 0, and clearing all messages in the FIFO. Instead, we
> should just reset the head pointer so that the FIFO becomes empty,
> rather than changing the max size to 0. This helps prevent increment
> in tx_dropped counter during mailbox negotiation, which is confusing
> to viewers of Linux ethtool statistics output.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages
2015-04-03 21:07 ` Jeff Kirsher
@ 2015-04-14 19:51 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:51 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:08 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> When we call update_max_size it does not drop all oversized messages.
> This is due to the difficulty in performing this operation, since it
> is a FIFO which makes updating anything other than head or tail very
> difficult. To fix this, modify validate_msg_size to ensure that we
> error out later when trying to transmit the message that could be
> oversized.
> This will generally be a rare condition, as it requires the FIFO to
> include a message larger than the max_size negotiated during mailbox
> connect. Note that max_size is always smaller than rx.size so it
> should be safe to use here.
>
> Also, update the update_max_size function header comment to clearly
> indicate that it does not drop all oversized messages, but only those
> at the head of the FIFO.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
* [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update
2015-04-03 21:07 ` Jeff Kirsher
@ 2015-04-14 19:51 ` Singh, Krishneil K
0 siblings, 0 replies; 80+ messages in thread
From: Singh, Krishneil K @ 2015-04-14 19:51 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Kirsher, Jeffrey T
Sent: Friday, April 3, 2015 2:08 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Kwan, Ngai-mint; Singh, Krishneil K
Subject: Re: [net-next 25/25] fm10k: corrected VF multicast update
On Fri, 2015-04-03 at 13:27 -0700, Jeff Kirsher wrote:
> VFs were being improperly added to the switch's multicast group. The
> error stems from the fact that incorrect arguments were passed to the
> "update_mc_addr" function. It would seem to be a copy paste error
> since the parameters are similar to the "update_uc_addr" function.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 80+ messages in thread
end of thread, other threads:[~2015-04-14 19:51 UTC | newest]
Thread overview: 80+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-03 20:26 [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
2015-04-03 21:01 ` Jeff Kirsher
2015-04-14 19:37 ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 03/25] fm10k: Correct spelling mistake Jeff Kirsher
2015-04-03 21:01 ` Jeff Kirsher
2015-04-14 19:37 ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 04/25] fm10k: Have the VF get the default VLAN during init Jeff Kirsher
2015-04-03 21:01 ` Jeff Kirsher
2015-04-14 19:42 ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:44 ` Singh, Krishneil K
2015-04-07 15:17 ` Alexander Duyck
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 06/25] fm10k: fix unused warnings Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:45 ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:45 ` Singh, Krishneil K
2015-04-04 17:39 ` Alexander Duyck
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware Jeff Kirsher
2015-04-03 21:02 ` Jeff Kirsher
2015-04-14 19:46 ` Singh, Krishneil K
2015-04-03 20:26 ` [Intel-wired-lan] [net-next 09/25] fm10k: use hw->mac.max_queues for stats Jeff Kirsher
2015-04-03 21:03 ` Jeff Kirsher
2015-04-14 19:47 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so that VF does not display them Jeff Kirsher
2015-04-03 21:03 ` Jeff Kirsher
2015-04-14 19:47 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 11/25] fm10k: remove extraneous "Reset interface" message Jeff Kirsher
2015-04-03 21:03 ` Jeff Kirsher
2015-04-14 19:47 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:48 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:48 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 15/25] fm10k: use separate workqueue for fm10k driver Jeff Kirsher
2015-04-03 21:04 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 16/25] fm10k: don't handle mailbox events in iov_event path Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 17/25] fm10k: comment next_vf_mbx flow Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:49 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 18/25] fm10k: fix function header comment Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 19/25] fm10k: start service timer on probe Jeff Kirsher
2015-04-03 21:05 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 20/25] fm10k: Add support for ITR scaling based on PCIe link speed Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
2015-04-04 18:16 ` Alexander Duyck
2015-04-06 16:39 ` Vick, Matthew
2015-04-06 17:05 ` Alexander Duyck
2015-04-06 18:33 ` Vick, Matthew
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 21/25] fm10k: update xcast mode before synchronizing multicast addresses Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 22/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized Jeff Kirsher
2015-04-03 21:06 ` Jeff Kirsher
2015-04-14 19:50 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 23/25] fm10k: reset head instead of calling update_max_size Jeff Kirsher
2015-04-03 21:07 ` Jeff Kirsher
2015-04-14 19:51 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 24/25] fm10k: mbx_update_max_size does not drop all oversized messages Jeff Kirsher
2015-04-03 21:07 ` Jeff Kirsher
2015-04-14 19:51 ` Singh, Krishneil K
2015-04-03 20:27 ` [Intel-wired-lan] [net-next 25/25] fm10k: corrected VF multicast update Jeff Kirsher
2015-04-03 21:07 ` Jeff Kirsher
2015-04-14 19:51 ` Singh, Krishneil K
2015-04-03 21:00 ` [Intel-wired-lan] [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-14 19:36 ` Singh, Krishneil K
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.