Skip to content

Commit 205ed44

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-03-27 This series contains updates to i40e and i40evf only. Alex updates the driver code so that we can do bulk updates of the page reference count instead of just incrementing it by one reference at a time. Fixed an issue where we were not resetting skb back to NULL when we have freed it. Cleaned up the i40e_process_skb_fields() to align with other Intel drivers. Removed FCoE code, since it is not supported in any of the Fortville/Fortpark hardware, so there is not much point of carrying the code around, especially if it is broken and untested. Harshitha fixes a bug in the driver where the calculation of the RSS size was not taking into account the number of traffic classes enabled. Robert fixes a potential race condition during VF reset by eliminating IOMMU DMAR Faults caused by VF hardware and when the OS initiates a VF reset and before the reset is finished we modify the VF's settings. Bimmy removes a delay that is no longer needed, since it was only needed for preproduction hardware. Colin King fixes null pointer dereference, where VSI was being dereferenced before the VSI NULL check. Jake fixes an issue with the recent addition of the "client code" to the driver, where we attempt to use an uninitialized variable, so correctly initialize the params variable by calling i40e_client_get_params(). v2: dropped patch 5 of the original series from Carolyn since we need more documentation and reason why the added delay, so Carolyn is taking the time to update the patch before we re-submit it for kernel inclusion. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 402a5bc + 7be147d commit 205ed44

18 files changed

+112
-673
lines changed

drivers/net/ethernet/intel/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,6 @@ config I40E_DCB
235235

236236
If unsure, say N.
237237

238-
config I40E_FCOE
239-
bool "Fibre Channel over Ethernet (FCoE)"
240-
default n
241-
depends on I40E && DCB && FCOE
242-
---help---
243-
Say Y here if you want to use Fibre Channel over Ethernet (FCoE)
244-
in the driver. This will create new netdev for exclusive FCoE
245-
use with XL710 FCoE offloads enabled.
246-
247-
If unsure, say N.
248-
249238
config I40EVF
250239
tristate "Intel(R) XL710 X710 Virtual Function Ethernet support"
251240
depends on PCI_MSI

drivers/net/ethernet/intel/i40e/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ i40e-objs := i40e_main.o \
4545
i40e_virtchnl_pf.o
4646

4747
i40e-$(CONFIG_I40E_DCB) += i40e_dcb.o i40e_dcb_nl.o
48-
i40e-$(CONFIG_I40E_FCOE) += i40e_fcoe.o

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
#include <linux/ptp_clock_kernel.h>
5757
#include "i40e_type.h"
5858
#include "i40e_prototype.h"
59-
#ifdef I40E_FCOE
60-
#include "i40e_fcoe.h"
61-
#endif
6259
#include "i40e_client.h"
6360
#include "i40e_virtchnl.h"
6461
#include "i40e_virtchnl_pf.h"
@@ -85,10 +82,6 @@
8582
(((pf)->flags & I40E_FLAG_128_QP_RSS_CAPABLE) ? 128 : 64)
8683
#define I40E_FDIR_RING 0
8784
#define I40E_FDIR_RING_COUNT 32
88-
#ifdef I40E_FCOE
89-
#define I40E_DEFAULT_FCOE 8 /* default number of QPs for FCoE */
90-
#define I40E_MINIMUM_FCOE 1 /* minimum number of QPs for FCoE */
91-
#endif /* I40E_FCOE */
9285
#define I40E_MAX_AQ_BUF_SIZE 4096
9386
#define I40E_AQ_LEN 256
9487
#define I40E_AQ_WORK_LIMIT 66 /* max number of VFs + a little */
@@ -347,10 +340,6 @@ struct i40e_pf {
347340
u16 num_vmdq_msix; /* num queue vectors per vmdq pool */
348341
u16 num_req_vfs; /* num VFs requested for this VF */
349342
u16 num_vf_qps; /* num queue pairs per VF */
350-
#ifdef I40E_FCOE
351-
u16 num_fcoe_qps; /* num fcoe queues this PF has set up */
352-
u16 num_fcoe_msix; /* num queue vectors per fcoe pool */
353-
#endif /* I40E_FCOE */
354343
u16 num_lan_qps; /* num lan queues this PF has set up */
355344
u16 num_lan_msix; /* num queue vectors for the base PF vsi */
356345
u16 num_fdsb_msix; /* num queue vectors for sideband Fdir */
@@ -411,9 +400,6 @@ struct i40e_pf {
411400
#define I40E_FLAG_FDIR_REQUIRES_REINIT BIT_ULL(8)
412401
#define I40E_FLAG_NEED_LINK_UPDATE BIT_ULL(9)
413402
#define I40E_FLAG_IWARP_ENABLED BIT_ULL(10)
414-
#ifdef I40E_FCOE
415-
#define I40E_FLAG_FCOE_ENABLED BIT_ULL(11)
416-
#endif /* I40E_FCOE */
417403
#define I40E_FLAG_CLEAN_ADMINQ BIT_ULL(14)
418404
#define I40E_FLAG_FILTER_SYNC BIT_ULL(15)
419405
#define I40E_FLAG_SERVICE_CLIENT_REQUESTED BIT_ULL(16)
@@ -461,10 +447,6 @@ struct i40e_pf {
461447
*/
462448
u64 hw_disabled_flags;
463449

464-
#ifdef I40E_FCOE
465-
struct i40e_fcoe fcoe;
466-
467-
#endif /* I40E_FCOE */
468450
struct i40e_client_instance *cinst;
469451
bool stat_offsets_loaded;
470452
struct i40e_hw_port_stats stats;
@@ -520,8 +502,6 @@ struct i40e_pf {
520502
*/
521503
u16 dcbx_cap;
522504

523-
u32 fcoe_hmc_filt_num;
524-
u32 fcoe_hmc_cntx_num;
525505
struct i40e_filter_control_settings filter_settings;
526506

527507
struct ptp_clock *ptp_clock;
@@ -641,11 +621,6 @@ struct i40e_vsi {
641621
struct rtnl_link_stats64 net_stats_offsets;
642622
struct i40e_eth_stats eth_stats;
643623
struct i40e_eth_stats eth_stats_offsets;
644-
#ifdef I40E_FCOE
645-
struct i40e_fcoe_stats fcoe_stats;
646-
struct i40e_fcoe_stats fcoe_stats_offsets;
647-
bool fcoe_stat_offsets_loaded;
648-
#endif
649624
u32 tx_restart;
650625
u32 tx_busy;
651626
u64 tx_linearize;
@@ -918,11 +893,6 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi);
918893
struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
919894
u16 uplink, u32 param1);
920895
int i40e_vsi_release(struct i40e_vsi *vsi);
921-
#ifdef I40E_FCOE
922-
void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
923-
struct i40e_vsi_context *ctxt,
924-
u8 enabled_tc, bool is_add);
925-
#endif
926896
void i40e_service_event_schedule(struct i40e_pf *pf);
927897
void i40e_notify_client_of_vf_msg(struct i40e_vsi *vsi, u32 vf_id,
928898
u8 *msg, u16 len);
@@ -982,20 +952,7 @@ static inline void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)
982952

983953
void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf);
984954
void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf, bool clearpba);
985-
#ifdef I40E_FCOE
986-
void i40e_get_netdev_stats_struct(struct net_device *netdev,
987-
struct rtnl_link_stats64 *storage);
988-
int i40e_set_mac(struct net_device *netdev, void *p);
989-
void i40e_set_rx_mode(struct net_device *netdev);
990-
#endif
991955
int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
992-
#ifdef I40E_FCOE
993-
void i40e_tx_timeout(struct net_device *netdev);
994-
int i40e_vlan_rx_add_vid(struct net_device *netdev,
995-
__always_unused __be16 proto, u16 vid);
996-
int i40e_vlan_rx_kill_vid(struct net_device *netdev,
997-
__always_unused __be16 proto, u16 vid);
998-
#endif
999956
int i40e_open(struct net_device *netdev);
1000957
int i40e_close(struct net_device *netdev);
1001958
int i40e_vsi_open(struct i40e_vsi *vsi);
@@ -1009,25 +966,6 @@ struct i40e_mac_filter *i40e_add_mac_filter(struct i40e_vsi *vsi,
1009966
int i40e_del_mac_filter(struct i40e_vsi *vsi, const u8 *macaddr);
1010967
bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi);
1011968
struct i40e_mac_filter *i40e_find_mac(struct i40e_vsi *vsi, const u8 *macaddr);
1012-
#ifdef I40E_FCOE
1013-
int __i40e_setup_tc(struct net_device *netdev, u32 handle, __be16 proto,
1014-
struct tc_to_netdev *tc);
1015-
void i40e_netpoll(struct net_device *netdev);
1016-
int i40e_fcoe_enable(struct net_device *netdev);
1017-
int i40e_fcoe_disable(struct net_device *netdev);
1018-
int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt);
1019-
u8 i40e_get_fcoe_tc_map(struct i40e_pf *pf);
1020-
void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi);
1021-
void i40e_fcoe_vsi_setup(struct i40e_pf *pf);
1022-
void i40e_init_pf_fcoe(struct i40e_pf *pf);
1023-
int i40e_fcoe_setup_ddp_resources(struct i40e_vsi *vsi);
1024-
void i40e_fcoe_free_ddp_resources(struct i40e_vsi *vsi);
1025-
int i40e_fcoe_handle_offload(struct i40e_ring *rx_ring,
1026-
union i40e_rx_desc *rx_desc,
1027-
struct sk_buff *skb);
1028-
void i40e_fcoe_handle_status(struct i40e_ring *rx_ring,
1029-
union i40e_rx_desc *rx_desc, u8 prog_id);
1030-
#endif /* I40E_FCOE */
1031969
void i40e_vlan_stripping_enable(struct i40e_vsi *vsi);
1032970
#ifdef CONFIG_I40E_DCB
1033971
void i40e_dcbnl_flush_apps(struct i40e_pf *pf,

drivers/net/ethernet/intel/i40e/i40e_client.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi)
147147
dev_dbg(&vsi->back->pdev->dev, "Client is not open, abort l2 param change\n");
148148
return;
149149
}
150+
memset(&params, 0, sizeof(params));
151+
i40e_client_get_params(vsi, &params);
150152
memcpy(&cdev->lan_info.params, &params, sizeof(struct i40e_params));
151153
cdev->client->ops->l2_param_change(&cdev->lan_info, cdev->client,
152154
&params);

drivers/net/ethernet/intel/i40e/i40e_common.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,33 +1088,6 @@ void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable)
10881088

10891089
wr32(hw, I40E_GLLAN_TXPRE_QDIS(reg_block), reg_val);
10901090
}
1091-
#ifdef I40E_FCOE
1092-
1093-
/**
1094-
* i40e_get_san_mac_addr - get SAN MAC address
1095-
* @hw: pointer to the HW structure
1096-
* @mac_addr: pointer to SAN MAC address
1097-
*
1098-
* Reads the adapter's SAN MAC address from NVM
1099-
**/
1100-
i40e_status i40e_get_san_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
1101-
{
1102-
struct i40e_aqc_mac_address_read_data addrs;
1103-
i40e_status status;
1104-
u16 flags = 0;
1105-
1106-
status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL);
1107-
if (status)
1108-
return status;
1109-
1110-
if (flags & I40E_AQC_SAN_ADDR_VALID)
1111-
ether_addr_copy(mac_addr, addrs.pf_san_mac);
1112-
else
1113-
status = I40E_ERR_INVALID_MAC_ADDR;
1114-
1115-
return status;
1116-
}
1117-
#endif
11181091

11191092
/**
11201093
* i40e_read_pba_string - Reads part number string from EEPROM

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -484,25 +484,6 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
484484
vsi->bw_ets_limit_credits[i],
485485
vsi->bw_ets_max_quanta[i]);
486486
}
487-
#ifdef I40E_FCOE
488-
if (vsi->type == I40E_VSI_FCOE) {
489-
dev_info(&pf->pdev->dev,
490-
" fcoe_stats: rx_packets = %llu, rx_dwords = %llu, rx_dropped = %llu\n",
491-
vsi->fcoe_stats.rx_fcoe_packets,
492-
vsi->fcoe_stats.rx_fcoe_dwords,
493-
vsi->fcoe_stats.rx_fcoe_dropped);
494-
dev_info(&pf->pdev->dev,
495-
" fcoe_stats: tx_packets = %llu, tx_dwords = %llu\n",
496-
vsi->fcoe_stats.tx_fcoe_packets,
497-
vsi->fcoe_stats.tx_fcoe_dwords);
498-
dev_info(&pf->pdev->dev,
499-
" fcoe_stats: bad_crc = %llu, last_error = %llu\n",
500-
vsi->fcoe_stats.fcoe_bad_fccrc,
501-
vsi->fcoe_stats.fcoe_last_error);
502-
dev_info(&pf->pdev->dev, " fcoe_stats: ddp_count = %llu\n",
503-
vsi->fcoe_stats.fcoe_ddp_count);
504-
}
505-
#endif
506487
}
507488

508489
/**

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -162,37 +162,16 @@ static const struct i40e_stats i40e_gstrings_stats[] = {
162162
I40E_PF_STAT("rx_lpi_count", stats.rx_lpi_count),
163163
};
164164

165-
#ifdef I40E_FCOE
166-
static const struct i40e_stats i40e_gstrings_fcoe_stats[] = {
167-
I40E_VSI_STAT("fcoe_bad_fccrc", fcoe_stats.fcoe_bad_fccrc),
168-
I40E_VSI_STAT("rx_fcoe_dropped", fcoe_stats.rx_fcoe_dropped),
169-
I40E_VSI_STAT("rx_fcoe_packets", fcoe_stats.rx_fcoe_packets),
170-
I40E_VSI_STAT("rx_fcoe_dwords", fcoe_stats.rx_fcoe_dwords),
171-
I40E_VSI_STAT("fcoe_ddp_count", fcoe_stats.fcoe_ddp_count),
172-
I40E_VSI_STAT("fcoe_last_error", fcoe_stats.fcoe_last_error),
173-
I40E_VSI_STAT("tx_fcoe_packets", fcoe_stats.tx_fcoe_packets),
174-
I40E_VSI_STAT("tx_fcoe_dwords", fcoe_stats.tx_fcoe_dwords),
175-
};
176-
177-
#endif /* I40E_FCOE */
178165
#define I40E_QUEUE_STATS_LEN(n) \
179166
(((struct i40e_netdev_priv *)netdev_priv((n)))->vsi->num_queue_pairs \
180167
* 2 /* Tx and Rx together */ \
181168
* (sizeof(struct i40e_queue_stats) / sizeof(u64)))
182169
#define I40E_GLOBAL_STATS_LEN ARRAY_SIZE(i40e_gstrings_stats)
183170
#define I40E_NETDEV_STATS_LEN ARRAY_SIZE(i40e_gstrings_net_stats)
184171
#define I40E_MISC_STATS_LEN ARRAY_SIZE(i40e_gstrings_misc_stats)
185-
#ifdef I40E_FCOE
186-
#define I40E_FCOE_STATS_LEN ARRAY_SIZE(i40e_gstrings_fcoe_stats)
187-
#define I40E_VSI_STATS_LEN(n) (I40E_NETDEV_STATS_LEN + \
188-
I40E_FCOE_STATS_LEN + \
189-
I40E_MISC_STATS_LEN + \
190-
I40E_QUEUE_STATS_LEN((n)))
191-
#else
192172
#define I40E_VSI_STATS_LEN(n) (I40E_NETDEV_STATS_LEN + \
193173
I40E_MISC_STATS_LEN + \
194174
I40E_QUEUE_STATS_LEN((n)))
195-
#endif /* I40E_FCOE */
196175
#define I40E_PFC_STATS_LEN ( \
197176
(FIELD_SIZEOF(struct i40e_pf, stats.priority_xoff_rx) + \
198177
FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_rx) + \
@@ -1530,13 +1509,6 @@ static void i40e_get_ethtool_stats(struct net_device *netdev,
15301509
data[i++] = (i40e_gstrings_misc_stats[j].sizeof_stat ==
15311510
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
15321511
}
1533-
#ifdef I40E_FCOE
1534-
for (j = 0; j < I40E_FCOE_STATS_LEN; j++) {
1535-
p = (char *)vsi + i40e_gstrings_fcoe_stats[j].stat_offset;
1536-
data[i++] = (i40e_gstrings_fcoe_stats[j].sizeof_stat ==
1537-
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
1538-
}
1539-
#endif
15401512
rcu_read_lock();
15411513
for (j = 0; j < vsi->num_queue_pairs; j++) {
15421514
tx_ring = ACCESS_ONCE(vsi->tx_rings[j]);
@@ -1624,13 +1596,6 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
16241596
i40e_gstrings_misc_stats[i].stat_string);
16251597
p += ETH_GSTRING_LEN;
16261598
}
1627-
#ifdef I40E_FCOE
1628-
for (i = 0; i < I40E_FCOE_STATS_LEN; i++) {
1629-
snprintf(p, ETH_GSTRING_LEN, "%s",
1630-
i40e_gstrings_fcoe_stats[i].stat_string);
1631-
p += ETH_GSTRING_LEN;
1632-
}
1633-
#endif
16341599
for (i = 0; i < vsi->num_queue_pairs; i++) {
16351600
snprintf(p, ETH_GSTRING_LEN, "tx-%d.tx_packets", i);
16361601
p += ETH_GSTRING_LEN;

0 commit comments

Comments
 (0)