Commit eeb2045b authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
10GbE Intel Wired LAN Driver Updates 2019-11-04

This series contains old Halloween candy updates, yet still sweet, to
fm10k, ixgbe and i40e.

Jake adds the missing initializers for a couple of the TLV attribute
macros.  Added support for capturing and reporting statistics for all of
the VFs in a given PF.  Lastly, bump the version of the fm10k driver to
reflect the recent changes.

Alex addresses locality issues in the ixgbe driver when it is loaded on
a system supporting multiple NUMA nodes.

Manjunath Patil provides changes to the ixgbe driver, similar to those
made to igb, to prevent transmit packets to request a hardware timestamp
when the NIC has not been setup via the SIOCSHWTSTAMP ioctl.

Alice adds support for x710 by adding the missing device id's in the
appropriate places to ensure all the features are enabled in i40e.

Jesse adds support for VF stats gathering in the i40e via the kernel
via ndo_get_vf_stats function.

v2: Fixed up commit id references in patch 5's description to align with
    how commit id's should be referenced.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 56c1291e dc645dae
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -534,6 +534,7 @@ void fm10k_iov_suspend(struct pci_dev *pdev);
int fm10k_iov_resume(struct pci_dev *pdev);
void fm10k_iov_disable(struct pci_dev *pdev);
int fm10k_iov_configure(struct pci_dev *pdev, int num_vfs);
void fm10k_iov_update_stats(struct fm10k_intfc *interface);
s32 fm10k_iov_update_pvid(struct fm10k_intfc *interface, u16 glort, u16 pvid);
int fm10k_ndo_set_vf_mac(struct net_device *netdev, int vf_idx, u8 *mac);
int fm10k_ndo_set_vf_vlan(struct net_device *netdev,
@@ -542,6 +543,8 @@ int fm10k_ndo_set_vf_bw(struct net_device *netdev, int vf_idx,
			int __always_unused min_rate, int max_rate);
int fm10k_ndo_get_vf_config(struct net_device *netdev,
			    int vf_idx, struct ifla_vf_info *ivi);
int fm10k_ndo_get_vf_stats(struct net_device *netdev,
			   int vf_idx, struct ifla_vf_stats *stats);

/* DebugFS */
#ifdef CONFIG_DEBUG_FS
+48 −0
Original line number Diff line number Diff line
@@ -520,6 +520,27 @@ int fm10k_iov_configure(struct pci_dev *pdev, int num_vfs)
	return num_vfs;
}

/**
 * fm10k_iov_update_stats - Update stats for all VFs
 * @interface: device private structure
 *
 * Updates the VF statistics for all enabled VFs. Expects to be called by
 * fm10k_update_stats and assumes that locking via the __FM10K_UPDATING_STATS
 * bit is already handled.
 */
void fm10k_iov_update_stats(struct fm10k_intfc *interface)
{
	struct fm10k_iov_data *iov_data = interface->iov_data;
	struct fm10k_hw *hw = &interface->hw;
	int i;

	if (!iov_data)
		return;

	for (i = 0; i < iov_data->num_vfs; i++)
		hw->iov.ops.update_stats(hw, iov_data->vf_info[i].stats, i);
}

static inline void fm10k_reset_vf_info(struct fm10k_intfc *interface,
				       struct fm10k_vf_info *vf_info)
{
@@ -650,3 +671,30 @@ int fm10k_ndo_get_vf_config(struct net_device *netdev,

	return 0;
}

int fm10k_ndo_get_vf_stats(struct net_device *netdev,
			   int vf_idx, struct ifla_vf_stats *stats)
{
	struct fm10k_intfc *interface = netdev_priv(netdev);
	struct fm10k_iov_data *iov_data = interface->iov_data;
	struct fm10k_hw *hw = &interface->hw;
	struct fm10k_hw_stats_q *hw_stats;
	u32 idx, qpp;

	/* verify SR-IOV is active and that vf idx is valid */
	if (!iov_data || vf_idx >= iov_data->num_vfs)
		return -EINVAL;

	qpp = fm10k_queues_per_pool(hw);
	hw_stats = iov_data->vf_info[vf_idx].stats;

	for (idx = 0; idx < qpp; idx++) {
		stats->rx_packets += hw_stats[idx].rx_packets.count;
		stats->tx_packets += hw_stats[idx].tx_packets.count;
		stats->rx_bytes += hw_stats[idx].rx_bytes.count;
		stats->tx_bytes += hw_stats[idx].tx_bytes.count;
		stats->rx_dropped += hw_stats[idx].rx_drops.count;
	}

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@

#include "fm10k.h"

#define DRV_VERSION	"0.26.1-k"
#define DRV_VERSION	"0.27.1-k"
#define DRV_SUMMARY	"Intel(R) Ethernet Switch Host Interface Driver"
const char fm10k_driver_version[] = DRV_VERSION;
char fm10k_driver_name[] = "fm10k";
+1 −0
Original line number Diff line number Diff line
@@ -1643,6 +1643,7 @@ static const struct net_device_ops fm10k_netdev_ops = {
	.ndo_set_vf_vlan	= fm10k_ndo_set_vf_vlan,
	.ndo_set_vf_rate	= fm10k_ndo_set_vf_bw,
	.ndo_get_vf_config	= fm10k_ndo_get_vf_config,
	.ndo_get_vf_stats	= fm10k_ndo_get_vf_stats,
	.ndo_udp_tunnel_add	= fm10k_udp_tunnel_add,
	.ndo_udp_tunnel_del	= fm10k_udp_tunnel_del,
	.ndo_dfwd_add_station	= fm10k_dfwd_add_station,
+3 −0
Original line number Diff line number Diff line
@@ -630,6 +630,9 @@ void fm10k_update_stats(struct fm10k_intfc *interface)
	net_stats->rx_errors = rx_errors;
	net_stats->rx_dropped = interface->stats.nodesc_drop.count;

	/* Update VF statistics */
	fm10k_iov_update_stats(interface);

	clear_bit(__FM10K_UPDATING_STATS, interface->state);
}

Loading