netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	Tony Lindgren <tony@atomide.com>, Sekhar Nori <nsekhar@ti.com>,
	Murali Karicheri <m-karicheri2@ti.com>,
	netdev <netdev@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v3 08/11] net: ethernet: ti: cpts: move rx timestamp processing to ptp worker only
Date: Tue, 24 Mar 2020 17:34:34 +0200	[thread overview]
Message-ID: <13dd9d58-7417-2f39-aa7d-dceae946482c@ti.com> (raw)
In-Reply-To: <20200324134343.GD18149@localhost>



On 24/03/2020 15:43, Richard Cochran wrote:
> On Fri, Mar 20, 2020 at 09:42:41PM +0200, Grygorii Strashko wrote:
>> Once CPTS IRQ will be enabled the CPTS irq handler may compete with netif
>> RX sofirq path and so RX timestamp might not be ready at the moment packet
>> is processed. As result, packet has to be deferred and processed later.
> 
> This change is not necessary.  The Rx path can simply take a spinlock,
> check the event list and the HW queue.
>   
>> This patch moves RX timestamp processing tx timestamp processing to PTP
>> worker always the same way as it's been done for TX timestamps.
> 
> There is no advantage to delaying Rx time stamp delivery.  In fact, it
> can degrade synchronization performance.  The only reason the
> implementation delays Tx time stamps delivery is because there is no
> other way.

I tested both ways and kept this version as i'v not seen any degradation,
but, of course, i'll redo the test (or may be you can advise what test to run).

My thoughts were - network stack might not immediately deliver packet to the application
and PTP worker can be tuned (pri and smp_affinity), resulted code will be more structured,
less locks and less time spent in softirq context.

I also can drop it.

-- 
Best regards,
grygorii

  reply	other threads:[~2020-03-24 15:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 19:42 [PATCH net-next v3 00/11] net: ethernet: ti: cpts: add irq and HW_TS_PUSH events Grygorii Strashko
2020-03-20 19:42 ` [PATCH net-next v3 01/11] net: ethernet: ti: cpts: use dev_yy() api for logs Grygorii Strashko
2020-03-26 14:03   ` Richard Cochran
2020-03-20 19:42 ` [PATCH net-next v3 02/11] net: ethernet: ti: cpts: separate hw counter read from timecounter Grygorii Strashko
2020-03-26 14:18   ` Richard Cochran
2020-03-26 20:14     ` Grygorii Strashko
2020-03-20 19:42 ` [PATCH net-next v3 03/11] net: ethernet: ti: cpts: move tc mult update in cpts_fifo_read() Grygorii Strashko
2020-03-26 14:20   ` Richard Cochran
2020-03-26 20:18     ` Grygorii Strashko
2020-03-27  1:26       ` Richard Cochran
2020-03-20 19:42 ` [PATCH net-next v3 04/11] net: ethernet: ti: cpts: switch to use new .gettimex64() interface Grygorii Strashko
2020-03-20 19:42 ` [PATCH net-next v3 05/11] net: ethernet: ti: cpts: optimize packet to event matching Grygorii Strashko
2020-03-20 19:42 ` [PATCH net-next v3 06/11] net: ethernet: ti: cpts: move tx timestamp processing to ptp worker only Grygorii Strashko
2020-03-26 14:29   ` Richard Cochran
2020-03-26 20:17     ` Grygorii Strashko
2020-03-20 19:42 ` [PATCH net-next v3 07/11] net: ethernet: ti: cpts: rework locking Grygorii Strashko
2020-03-27  1:28   ` Richard Cochran
2020-03-20 19:42 ` [PATCH net-next v3 08/11] net: ethernet: ti: cpts: move rx timestamp processing to ptp worker only Grygorii Strashko
2020-03-24 13:43   ` Richard Cochran
2020-03-24 15:34     ` Grygorii Strashko [this message]
2020-03-24 16:54       ` Richard Cochran
2020-03-26 11:15         ` Grygorii Strashko
2020-03-27  1:37           ` Richard Cochran
2020-03-20 19:42 ` [PATCH net-next v3 09/11] net: ethernet: ti: cpts: add irq support Grygorii Strashko
2020-03-20 19:42 ` [PATCH net-next v3 10/11] net: ethernet: ti: cpts: add support for HW_TS_PUSH events Grygorii Strashko
2020-03-27  1:34   ` Richard Cochran
2020-03-20 19:42 ` [PATCH net-next v3 11/11] net: ethernet: ti: cpsw: enable cpts irq Grygorii Strashko
2020-03-24  4:17 ` [PATCH net-next v3 00/11] net: ethernet: ti: cpts: add irq and HW_TS_PUSH events David Miller
2020-03-24 13:38 ` Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13dd9d58-7417-2f39-aa7d-dceae946482c@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=richardcochran@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).