Skip to content

Commit

Permalink
sfc: Rate-limit log message for PTP packets without a matching timest…
Browse files Browse the repository at this point in the history
…amp event

In case of a flood of PTP packets, the timestamp peripheral and MC
firmware on the SFN[56]322F boards may not be able to provide
timestamp events for all packets.  Don't complain too much about this.

Fixes: 7c236c4 ('sfc: Add support for IEEE-1588 PTP')
Signed-off-by: Ben Hutchings <[email protected]>
  • Loading branch information
Ben Hutchings committed Dec 6, 2013
1 parent f321160 commit 35f9a7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/sfc/ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,9 @@ static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
__skb_queue_tail(q, skb);
} else if (time_after(jiffies, match->expiry)) {
match->state = PTP_PACKET_STATE_TIMED_OUT;
netif_warn(efx, rx_err, efx->net_dev,
"PTP packet - no timestamp seen\n");
if (net_ratelimit())
netif_warn(efx, rx_err, efx->net_dev,
"PTP packet - no timestamp seen\n");
__skb_queue_tail(q, skb);
} else {
/* Replace unprocessed entry and stop */
Expand Down

0 comments on commit 35f9a7a

Please sign in to comment.