Skip to content

Commit f5333f8

Browse files
committed
Merge branch '40GbE' of ra.kernel.org:/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-10-06 This series contains updates to i40e and i40evf only. Rami fixes a typo in the code comments. Mitch adds an ethtool private flag to control source pruning to resolve an issue where our default behavior is to enable source pruning which breaks ARP monitoring in channel bonding. Fixes a couple of register definitions, which were incorrect. Jake fixes an issue with multiple logical CPUs per core (simultaneous multithreading - SMT) and how we set an affinity hint based on the v_idx of that q_vector, which is an incremental value and might lead to multiple offline CPUs being assigned to a q_vector. Instead, we should only assign hints for CPUs which are online, so look to use cpumask_local_spread(). Also fixed a VF VLAN tag stripping issue, where the flag created to change this feature was seen as unchangeable. Lastly, organized and re-numbered the feature flags. Alan re-enables PTP L4 for XL710 devices with firmware version 6.0 or greater, now that the previous bug in the older firmware is fixed. Implements the PCI error handlers for reset_prepare() and reset_done() to allow us to handle function level resets. Alice cleans up code that was added to the incorrect function during a merge. Filip adds a change to display an error message when a module is inserted that does not meet the thermal requirements, Talking Heads "Burning Down the House" comes to mind. Also fixed a flow director filter issue where a variable was not being cleared which stores the filter number to be removed from the list when the firmware refused to add the requested filter. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 4bc4e64 + b74f571 commit f5333f8

File tree

12 files changed

+203
-138
lines changed

12 files changed

+203
-138
lines changed

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

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ struct i40e_pf {
350350
u16 num_vmdq_vsis; /* num vmdq vsis this PF has set up */
351351
u16 num_vmdq_qps; /* num queue pairs per vmdq pool */
352352
u16 num_vmdq_msix; /* num queue vectors per vmdq pool */
353-
u16 num_req_vfs; /* num VFs requested for this VF */
353+
u16 num_req_vfs; /* num VFs requested for this PF */
354354
u16 num_vf_qps; /* num queue pairs per VF */
355355
u16 num_lan_qps; /* num lan queues this PF has set up */
356356
u16 num_lan_msix; /* num queue vectors for the base PF vsi */
@@ -403,55 +403,57 @@ struct i40e_pf {
403403
struct timer_list service_timer;
404404
struct work_struct service_task;
405405

406-
u64 hw_features;
407-
#define I40E_HW_RSS_AQ_CAPABLE BIT_ULL(0)
408-
#define I40E_HW_128_QP_RSS_CAPABLE BIT_ULL(1)
409-
#define I40E_HW_ATR_EVICT_CAPABLE BIT_ULL(2)
410-
#define I40E_HW_WB_ON_ITR_CAPABLE BIT_ULL(3)
411-
#define I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE BIT_ULL(4)
412-
#define I40E_HW_NO_PCI_LINK_CHECK BIT_ULL(5)
413-
#define I40E_HW_100M_SGMII_CAPABLE BIT_ULL(6)
414-
#define I40E_HW_NO_DCB_SUPPORT BIT_ULL(7)
415-
#define I40E_HW_USE_SET_LLDP_MIB BIT_ULL(8)
416-
#define I40E_HW_GENEVE_OFFLOAD_CAPABLE BIT_ULL(9)
417-
#define I40E_HW_PTP_L4_CAPABLE BIT_ULL(10)
418-
#define I40E_HW_WOL_MC_MAGIC_PKT_WAKE BIT_ULL(11)
419-
#define I40E_HW_MPLS_HDR_OFFLOAD_CAPABLE BIT_ULL(12)
420-
#define I40E_HW_HAVE_CRT_RETIMER BIT_ULL(13)
421-
#define I40E_HW_OUTER_UDP_CSUM_CAPABLE BIT_ULL(14)
422-
#define I40E_HW_PHY_CONTROLS_LEDS BIT_ULL(15)
423-
#define I40E_HW_STOP_FW_LLDP BIT_ULL(16)
424-
#define I40E_HW_PORT_ID_VALID BIT_ULL(17)
425-
#define I40E_HW_RESTART_AUTONEG BIT_ULL(18)
406+
u32 hw_features;
407+
#define I40E_HW_RSS_AQ_CAPABLE BIT(0)
408+
#define I40E_HW_128_QP_RSS_CAPABLE BIT(1)
409+
#define I40E_HW_ATR_EVICT_CAPABLE BIT(2)
410+
#define I40E_HW_WB_ON_ITR_CAPABLE BIT(3)
411+
#define I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE BIT(4)
412+
#define I40E_HW_NO_PCI_LINK_CHECK BIT(5)
413+
#define I40E_HW_100M_SGMII_CAPABLE BIT(6)
414+
#define I40E_HW_NO_DCB_SUPPORT BIT(7)
415+
#define I40E_HW_USE_SET_LLDP_MIB BIT(8)
416+
#define I40E_HW_GENEVE_OFFLOAD_CAPABLE BIT(9)
417+
#define I40E_HW_PTP_L4_CAPABLE BIT(10)
418+
#define I40E_HW_WOL_MC_MAGIC_PKT_WAKE BIT(11)
419+
#define I40E_HW_MPLS_HDR_OFFLOAD_CAPABLE BIT(12)
420+
#define I40E_HW_HAVE_CRT_RETIMER BIT(13)
421+
#define I40E_HW_OUTER_UDP_CSUM_CAPABLE BIT(14)
422+
#define I40E_HW_PHY_CONTROLS_LEDS BIT(15)
423+
#define I40E_HW_STOP_FW_LLDP BIT(16)
424+
#define I40E_HW_PORT_ID_VALID BIT(17)
425+
#define I40E_HW_RESTART_AUTONEG BIT(18)
426426

427427
u64 flags;
428-
#define I40E_FLAG_RX_CSUM_ENABLED BIT_ULL(1)
429-
#define I40E_FLAG_MSI_ENABLED BIT_ULL(2)
430-
#define I40E_FLAG_MSIX_ENABLED BIT_ULL(3)
431-
#define I40E_FLAG_HW_ATR_EVICT_ENABLED BIT_ULL(4)
432-
#define I40E_FLAG_RSS_ENABLED BIT_ULL(6)
433-
#define I40E_FLAG_VMDQ_ENABLED BIT_ULL(7)
434-
#define I40E_FLAG_IWARP_ENABLED BIT_ULL(10)
435-
#define I40E_FLAG_FILTER_SYNC BIT_ULL(15)
436-
#define I40E_FLAG_SERVICE_CLIENT_REQUESTED BIT_ULL(16)
437-
#define I40E_FLAG_SRIOV_ENABLED BIT_ULL(19)
438-
#define I40E_FLAG_DCB_ENABLED BIT_ULL(20)
439-
#define I40E_FLAG_FD_SB_ENABLED BIT_ULL(21)
440-
#define I40E_FLAG_FD_ATR_ENABLED BIT_ULL(22)
441-
#define I40E_FLAG_FD_SB_AUTO_DISABLED BIT_ULL(23)
442-
#define I40E_FLAG_FD_ATR_AUTO_DISABLED BIT_ULL(24)
443-
#define I40E_FLAG_PTP BIT_ULL(25)
444-
#define I40E_FLAG_MFP_ENABLED BIT_ULL(26)
445-
#define I40E_FLAG_UDP_FILTER_SYNC BIT_ULL(27)
446-
#define I40E_FLAG_DCB_CAPABLE BIT_ULL(29)
447-
#define I40E_FLAG_VEB_STATS_ENABLED BIT_ULL(37)
448-
#define I40E_FLAG_LINK_POLLING_ENABLED BIT_ULL(39)
449-
#define I40E_FLAG_VEB_MODE_ENABLED BIT_ULL(40)
450-
#define I40E_FLAG_TRUE_PROMISC_SUPPORT BIT_ULL(51)
451-
#define I40E_FLAG_CLIENT_RESET BIT_ULL(54)
452-
#define I40E_FLAG_TEMP_LINK_POLLING BIT_ULL(55)
453-
#define I40E_FLAG_CLIENT_L2_CHANGE BIT_ULL(56)
454-
#define I40E_FLAG_LEGACY_RX BIT_ULL(58)
428+
#define I40E_FLAG_RX_CSUM_ENABLED BIT(0)
429+
#define I40E_FLAG_MSI_ENABLED BIT(1)
430+
#define I40E_FLAG_MSIX_ENABLED BIT(2)
431+
#define I40E_FLAG_RSS_ENABLED BIT(3)
432+
#define I40E_FLAG_VMDQ_ENABLED BIT(4)
433+
#define I40E_FLAG_FILTER_SYNC BIT(5)
434+
#define I40E_FLAG_SRIOV_ENABLED BIT(6)
435+
#define I40E_FLAG_DCB_CAPABLE BIT(7)
436+
#define I40E_FLAG_DCB_ENABLED BIT(8)
437+
#define I40E_FLAG_FD_SB_ENABLED BIT(9)
438+
#define I40E_FLAG_FD_ATR_ENABLED BIT(10)
439+
#define I40E_FLAG_FD_SB_AUTO_DISABLED BIT(11)
440+
#define I40E_FLAG_FD_ATR_AUTO_DISABLED BIT(12)
441+
#define I40E_FLAG_MFP_ENABLED BIT(13)
442+
#define I40E_FLAG_UDP_FILTER_SYNC BIT(14)
443+
#define I40E_FLAG_HW_ATR_EVICT_ENABLED BIT(15)
444+
#define I40E_FLAG_VEB_MODE_ENABLED BIT(16)
445+
#define I40E_FLAG_VEB_STATS_ENABLED BIT(17)
446+
#define I40E_FLAG_LINK_POLLING_ENABLED BIT(18)
447+
#define I40E_FLAG_TRUE_PROMISC_SUPPORT BIT(19)
448+
#define I40E_FLAG_TEMP_LINK_POLLING BIT(20)
449+
#define I40E_FLAG_LEGACY_RX BIT(21)
450+
#define I40E_FLAG_PTP BIT(22)
451+
#define I40E_FLAG_IWARP_ENABLED BIT(23)
452+
#define I40E_FLAG_SERVICE_CLIENT_REQUESTED BIT(24)
453+
#define I40E_FLAG_CLIENT_L2_CHANGE BIT(25)
454+
#define I40E_FLAG_CLIENT_RESET BIT(26)
455+
#define I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED BIT(27)
456+
#define I40E_FLAG_SOURCE_PRUNING_DISABLED BIT(28)
455457

456458
struct i40e_client_instance *cinst;
457459
bool stat_offsets_loaded;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1771,9 +1771,10 @@ enum i40e_aq_phy_type {
17711771
I40E_PHY_TYPE_25GBASE_CR = 0x20,
17721772
I40E_PHY_TYPE_25GBASE_SR = 0x21,
17731773
I40E_PHY_TYPE_25GBASE_LR = 0x22,
1774+
I40E_PHY_TYPE_MAX,
1775+
I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD,
17741776
I40E_PHY_TYPE_EMPTY = 0xFE,
17751777
I40E_PHY_TYPE_DEFAULT = 0xFF,
1776-
I40E_PHY_TYPE_MAX
17771778
};
17781779

17791780
#define I40E_LINK_SPEED_100MB_SHIFT 0x1

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
278278
rx_ring->netdev,
279279
rx_ring->rx_bi);
280280
dev_info(&pf->pdev->dev,
281-
" rx_rings[%i]: state = %li, queue_index = %d, reg_idx = %d\n",
282-
i, rx_ring->state,
281+
" rx_rings[%i]: state = %lu, queue_index = %d, reg_idx = %d\n",
282+
i, *rx_ring->state,
283283
rx_ring->queue_index,
284284
rx_ring->reg_idx);
285285
dev_info(&pf->pdev->dev,
@@ -334,8 +334,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
334334
tx_ring->netdev,
335335
tx_ring->tx_bi);
336336
dev_info(&pf->pdev->dev,
337-
" tx_rings[%i]: state = %li, queue_index = %d, reg_idx = %d\n",
338-
i, tx_ring->state,
337+
" tx_rings[%i]: state = %lu, queue_index = %d, reg_idx = %d\n",
338+
i, *tx_ring->state,
339339
tx_ring->queue_index,
340340
tx_ring->reg_idx);
341341
dev_info(&pf->pdev->dev,

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ static const struct i40e_priv_flags i40e_gstrings_priv_flags[] = {
227227
I40E_PRIV_FLAG("veb-stats", I40E_FLAG_VEB_STATS_ENABLED, 0),
228228
I40E_PRIV_FLAG("hw-atr-eviction", I40E_FLAG_HW_ATR_EVICT_ENABLED, 0),
229229
I40E_PRIV_FLAG("legacy-rx", I40E_FLAG_LEGACY_RX, 0),
230+
I40E_PRIV_FLAG("disable-source-pruning",
231+
I40E_FLAG_SOURCE_PRUNING_DISABLED, 0),
230232
};
231233

232234
#define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_gstrings_priv_flags)
@@ -2008,7 +2010,9 @@ static int i40e_set_phys_id(struct net_device *netdev,
20082010
if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) {
20092011
pf->led_status = i40e_led_get(hw);
20102012
} else {
2011-
i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL, NULL);
2013+
if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE))
2014+
i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL,
2015+
NULL);
20122016
ret = i40e_led_get_phy(hw, &temp_status,
20132017
&pf->phy_led_val);
20142018
pf->led_status = temp_status;
@@ -2033,7 +2037,8 @@ static int i40e_set_phys_id(struct net_device *netdev,
20332037
ret = i40e_led_set_phy(hw, false, pf->led_status,
20342038
(pf->phy_led_val |
20352039
I40E_PHY_LED_MODE_ORIG));
2036-
i40e_aq_set_phy_debug(hw, 0, NULL);
2040+
if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE))
2041+
i40e_aq_set_phy_debug(hw, 0, NULL);
20372042
}
20382043
break;
20392044
default:
@@ -4090,7 +4095,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
40904095
struct i40e_netdev_priv *np = netdev_priv(dev);
40914096
struct i40e_vsi *vsi = np->vsi;
40924097
struct i40e_pf *pf = vsi->back;
4093-
u64 orig_flags, new_flags, changed_flags;
4098+
u32 orig_flags, new_flags, changed_flags;
40944099
u32 i, j;
40954100

40964101
orig_flags = READ_ONCE(pf->flags);
@@ -4142,12 +4147,12 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
41424147
return -EOPNOTSUPP;
41434148

41444149
/* Compare and exchange the new flags into place. If we failed, that
4145-
* is if cmpxchg64 returns anything but the old value, this means that
4150+
* is if cmpxchg returns anything but the old value, this means that
41464151
* something else has modified the flags variable since we copied it
41474152
* originally. We'll just punt with an error and log something in the
41484153
* message buffer.
41494154
*/
4150-
if (cmpxchg64(&pf->flags, orig_flags, new_flags) != orig_flags) {
4155+
if (cmpxchg(&pf->flags, orig_flags, new_flags) != orig_flags) {
41514156
dev_warn(&pf->pdev->dev,
41524157
"Unable to update pf->flags as it was modified by another thread...\n");
41534158
return -EAGAIN;
@@ -4189,8 +4194,9 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
41894194
/* Issue reset to cause things to take effect, as additional bits
41904195
* are added we will need to create a mask of bits requiring reset
41914196
*/
4192-
if ((changed_flags & I40E_FLAG_VEB_STATS_ENABLED) ||
4193-
((changed_flags & I40E_FLAG_LEGACY_RX) && netif_running(dev)))
4197+
if (changed_flags & (I40E_FLAG_VEB_STATS_ENABLED |
4198+
I40E_FLAG_LEGACY_RX |
4199+
I40E_FLAG_SOURCE_PRUNING_DISABLED))
41944200
i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true);
41954201

41964202
return 0;

0 commit comments

Comments
 (0)