Skip to content

Commit a2582cd

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Fixes 2019-11-08 This series contains fixes to igb, igc, ixgbe, i40e, iavf and ice drivers. Colin Ian King fixes a potentially wrap-around counter in a for-loop. Nick fixes the default ITR values for the iavf driver to 50 usecs interval. Arkadiusz fixes 'ethtool -m' for X722 devices where the correct value cannot be obtained from the firmware, so add X722 to the check to ensure the wrong value is not returned. Jake fixes igb and igc drivers in their implementation of launch time support by declaring skb->tstamp value as ktime_t instead of s64. Magnus fixes ixgbe and i40e where the need_wakeup flag for transmit may not be set for AF_XDP sockets that are only used to send packets. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents deabc87 + 0843aa8 commit a2582cd

File tree

8 files changed

+15
-24
lines changed

8 files changed

+15
-24
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
/* API version 1.7 implements additional link and PHY-specific APIs */
2222
#define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007
23+
/* API version 1.9 for X722 implements additional link and PHY-specific APIs */
24+
#define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009
2325
/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */
2426
#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006
2527

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,8 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
18761876
hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
18771877
hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
18781878

1879-
if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE) {
1879+
if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
1880+
hw->mac.type != I40E_MAC_X722) {
18801881
__le32 tmp;
18811882

18821883
memcpy(&tmp, resp->link_type, sizeof(tmp));

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,6 @@ static bool i40e_xmit_zc(struct i40e_ring *xdp_ring, unsigned int budget)
689689
i40e_xdp_ring_update_tail(xdp_ring);
690690

691691
xsk_umem_consume_tx_done(xdp_ring->xsk_umem);
692-
if (xsk_umem_uses_need_wakeup(xdp_ring->xsk_umem))
693-
xsk_clear_tx_need_wakeup(xdp_ring->xsk_umem);
694692
}
695693

696694
return !!budget && work_done;
@@ -769,12 +767,8 @@ bool i40e_clean_xdp_tx_irq(struct i40e_vsi *vsi,
769767
i40e_update_tx_stats(tx_ring, completed_frames, total_bytes);
770768

771769
out_xmit:
772-
if (xsk_umem_uses_need_wakeup(tx_ring->xsk_umem)) {
773-
if (tx_ring->next_to_clean == tx_ring->next_to_use)
774-
xsk_set_tx_need_wakeup(tx_ring->xsk_umem);
775-
else
776-
xsk_clear_tx_need_wakeup(tx_ring->xsk_umem);
777-
}
770+
if (xsk_umem_uses_need_wakeup(tx_ring->xsk_umem))
771+
xsk_set_tx_need_wakeup(tx_ring->xsk_umem);
778772

779773
xmit_done = i40e_xmit_zc(tx_ring, budget);
780774

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ iavf_map_vector_to_rxq(struct iavf_adapter *adapter, int v_idx, int r_idx)
314314
q_vector->rx.target_itr = ITR_TO_REG(rx_ring->itr_setting);
315315
q_vector->ring_mask |= BIT(r_idx);
316316
wr32(hw, IAVF_VFINT_ITRN1(IAVF_RX_ITR, q_vector->reg_idx),
317-
q_vector->rx.current_itr);
317+
q_vector->rx.current_itr >> 1);
318318
q_vector->rx.current_itr = q_vector->rx.target_itr;
319319
}
320320

@@ -340,7 +340,7 @@ iavf_map_vector_to_txq(struct iavf_adapter *adapter, int v_idx, int t_idx)
340340
q_vector->tx.target_itr = ITR_TO_REG(tx_ring->itr_setting);
341341
q_vector->num_ringpairs++;
342342
wr32(hw, IAVF_VFINT_ITRN1(IAVF_TX_ITR, q_vector->reg_idx),
343-
q_vector->tx.target_itr);
343+
q_vector->tx.target_itr >> 1);
344344
q_vector->tx.current_itr = q_vector->tx.target_itr;
345345
}
346346

drivers/net/ethernet/intel/ice/ice_sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)
10361036
struct ice_aqc_query_txsched_res_resp *buf;
10371037
enum ice_status status = 0;
10381038
__le16 max_sibl;
1039-
u8 i;
1039+
u16 i;
10401040

10411041
if (hw->layer_info)
10421042
return status;

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5675,8 +5675,8 @@ static void igb_tx_ctxtdesc(struct igb_ring *tx_ring,
56755675
* should have been handled by the upper layers.
56765676
*/
56775677
if (tx_ring->launchtime_enable) {
5678-
ts = ns_to_timespec64(first->skb->tstamp);
5679-
first->skb->tstamp = 0;
5678+
ts = ktime_to_timespec64(first->skb->tstamp);
5679+
first->skb->tstamp = ktime_set(0, 0);
56805680
context_desc->seqnum_seed = cpu_to_le32(ts.tv_nsec / 32);
56815681
} else {
56825682
context_desc->seqnum_seed = 0;

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ static void igc_tx_ctxtdesc(struct igc_ring *tx_ring,
824824
* should have been handled by the upper layers.
825825
*/
826826
if (tx_ring->launchtime_enable) {
827-
ts = ns_to_timespec64(first->skb->tstamp);
828-
first->skb->tstamp = 0;
827+
ts = ktime_to_timespec64(first->skb->tstamp);
828+
first->skb->tstamp = ktime_set(0, 0);
829829
context_desc->launch_time = cpu_to_le32(ts.tv_nsec / 32);
830830
} else {
831831
context_desc->launch_time = 0;

drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,6 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
622622
if (tx_desc) {
623623
ixgbe_xdp_ring_update_tail(xdp_ring);
624624
xsk_umem_consume_tx_done(xdp_ring->xsk_umem);
625-
if (xsk_umem_uses_need_wakeup(xdp_ring->xsk_umem))
626-
xsk_clear_tx_need_wakeup(xdp_ring->xsk_umem);
627625
}
628626

629627
return !!budget && work_done;
@@ -691,12 +689,8 @@ bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector,
691689
if (xsk_frames)
692690
xsk_umem_complete_tx(umem, xsk_frames);
693691

694-
if (xsk_umem_uses_need_wakeup(tx_ring->xsk_umem)) {
695-
if (tx_ring->next_to_clean == tx_ring->next_to_use)
696-
xsk_set_tx_need_wakeup(tx_ring->xsk_umem);
697-
else
698-
xsk_clear_tx_need_wakeup(tx_ring->xsk_umem);
699-
}
692+
if (xsk_umem_uses_need_wakeup(tx_ring->xsk_umem))
693+
xsk_set_tx_need_wakeup(tx_ring->xsk_umem);
700694

701695
return ixgbe_xmit_zc(tx_ring, q_vector->tx.work_limit);
702696
}

0 commit comments

Comments
 (0)