Skip to content

Commit 84c5fb8

Browse files
jacob-kelleranguy11
authored andcommitted
ice: fix Tx queue iteration for Tx timestamp enablement
The driver accidentally copied the ice_for_each_rxq iterator when implementing enablement of the ptp_tx bit for the Tx rings. We still load the Tx rings and set the ptp_tx field, but we iterate over the count of the num_rxq. If the number of Tx and Rx queues differ, this could either cause a buffer overrun when accessing the tx_rings list if num_txq is greater than num_rxq, or it could cause us to fail to enable Tx timestamps for some rings. This was not noticed originally as we generally have the same number of Tx and Rx queues. Fixes: ea9b847 ("ice: enable transmit timestamps for E810 devices") Signed-off-by: Jacob Keller <[email protected]> Tested-by: Gurucharan G <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 5fe2a6b commit 84c5fb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void ice_set_tx_tstamp(struct ice_pf *pf, bool on)
2222
return;
2323

2424
/* Set the timestamp enable flag for all the Tx rings */
25-
ice_for_each_rxq(vsi, i) {
25+
ice_for_each_txq(vsi, i) {
2626
if (!vsi->tx_rings[i])
2727
continue;
2828
vsi->tx_rings[i]->ptp_tx = on;

0 commit comments

Comments
 (0)