summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-12-06 22:10:46 +0000
committerBen Hutchings <bhutchings@solarflare.com>2013-12-06 22:22:34 +0000
commit35f9a7a380728a94d417e5824a866f969423ac83 (patch)
tree5076c6937b05d033a824dbb0b9e3d6362b22e6c0 /drivers/net
parentf32116003c39f3a6815215a7512e1ea8d1e4bbc7 (diff)
downloadlinux-stable-35f9a7a380728a94d417e5824a866f969423ac83.tar.gz
linux-stable-35f9a7a380728a94d417e5824a866f969423ac83.tar.bz2
linux-stable-35f9a7a380728a94d417e5824a866f969423ac83.zip
sfc: Rate-limit log message for PTP packets without a matching timestamp 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: 7c236c43b838 ('sfc: Add support for IEEE-1588 PTP') Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/sfc/ptp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index 8b2cf783217c..8c665f1b5480 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -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 */