netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: cpts: break cycle once late ts is matched
@ 2018-07-10 13:04 Ivan Khoronzhuk
  2018-07-12  7:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Khoronzhuk @ 2018-07-10 13:04 UTC (permalink / raw)
  To: davem, grygorii.strashko; +Cc: netdev, linux-kernel, Ivan Khoronzhuk

The late ts queue can contain a bunch of skbs while hi rate testing,
no need to check all of them if timestamp is already matched.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---

Based on net-next/master

 drivers/net/ethernet/ti/cpts.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 6f63c8729afc..b4ea58dc8caf 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -114,7 +114,10 @@ static bool cpts_match_tx_ts(struct cpts *cpts, struct cpts_event *event)
 			dev_consume_skb_any(skb);
 			dev_dbg(cpts->dev, "match tx timestamp mtype %u seqid %04x\n",
 				mtype, seqid);
-		} else if (time_after(jiffies, skb_cb->tmo)) {
+			break;
+		}
+
+		if (time_after(jiffies, skb_cb->tmo)) {
 			/* timeout any expired skbs over 1s */
 			dev_dbg(cpts->dev,
 				"expiring tx timestamp mtype %u seqid %04x\n",
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ethernet: ti: cpts: break cycle once late ts is matched
  2018-07-10 13:04 [PATCH] net: ethernet: ti: cpts: break cycle once late ts is matched Ivan Khoronzhuk
@ 2018-07-12  7:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-12  7:00 UTC (permalink / raw)
  To: ivan.khoronzhuk; +Cc: grygorii.strashko, netdev, linux-kernel

From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date: Tue, 10 Jul 2018 16:04:04 +0300

> The late ts queue can contain a bunch of skbs while hi rate testing,
> no need to check all of them if timestamp is already matched.
> 
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> ---
> 
> Based on net-next/master

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-12  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 13:04 [PATCH] net: ethernet: ti: cpts: break cycle once late ts is matched Ivan Khoronzhuk
2018-07-12  7:00 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).