From: Ioana Ciornei <ioana.ciornei@nxp.com>
To: Radu-Andrei Bulie <radu-andrei.bulie@nxp.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Y.B. Lu" <yangbo.lu@nxp.com>
Subject: Re: [PATCH net-next 0/2] Provide direct access to 1588 one step register
Date: Mon, 14 Feb 2022 19:18:34 +0000 [thread overview]
Message-ID: <20220214191834.3xmv44htevxpkztn@skbuf> (raw)
In-Reply-To: <20220214160348.25124-1-radu-andrei.bulie@nxp.com>
On Mon, Feb 14, 2022 at 06:03:46PM +0200, Radu Bulie wrote:
> DPAA2 MAC supports 1588 one step timestamping.
> If this option is enabled then for each transmitted PTP event packet,
> the 1588 SINGLE_STEP register is accessed to modify the following fields:
>
> -offset of the correction field inside the PTP packet
> -UDP checksum update bit, in case the PTP event packet has
> UDP encapsulation
>
> These values can change any time, because there may be multiple
> PTP clients connected, that receive various 1588 frame types:
> - L2 only frame
> - UDP / Ipv4
> - UDP / Ipv6
> - other
>
> The current implementation uses dpni_set_single_step_cfg to update the
> SINLGE_STEP register.
> Using an MC command on the Tx datapath for each transmitted 1588 message
> introduces high delays, leading to low throughput and consequently to a
> small number of supported PTP clients. Besides these, the nanosecond
> correction field from the PTP packet will contain the high delay from the
> driver which together with the originTimestamp will render timestamp
> values that are unacceptable in a GM clock implementation.
>
> This patch series replaces the dpni_set_single_step_cfg function call from
> the Tx datapath for 1588 messages (when one step timestamping is enabled)
> with a callback that either implements direct access to the SINGLE_STEP
> register, eliminating the overhead caused by the MC command that will need
> to be dispatched by the MC firmware through the MC command portal
> interface or falls back to the dpni_set_single_step_cfg in case the MC
> version does not have support for returning the single step register
> base address.
>
> In other words all the delay introduced by dpni_set_single_step_cfg
> function will be eliminated (if MC version has support for returning the
> base address of the single step register), improving the egress driver
> performance for PTP packets when single step timestamping is enabled.
>
> The first patch adds a new attribute that contains the base address of
> the SINGLE_STEP register. It will be used to directly update the register
> on the Tx datapath.
>
> The second patch updates the driver such that the SINGLE_STEP
> register is either accessed directly if MC version >= 10.32 or is
> accessed through dpni_set_single_step_cfg command when 1588 messages
> are transmitted.
>
> Radu Bulie (2):
> dpaa2-eth: Update dpni_get_single_step_cfg command
> dpaa2-eth: Provide direct access to 1588 one step register
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
prev parent reply other threads:[~2022-02-14 20:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 16:03 [PATCH net-next 0/2] Provide direct access to 1588 one step register Radu Bulie
2022-02-14 16:03 ` [PATCH net-next 1/2] dpaa2-eth: Update dpni_get_single_step_cfg command Radu Bulie
2022-02-14 16:03 ` [PATCH net-next 2/2] dpaa2-eth: Update SINGLE_STEP register access Radu Bulie
2022-02-16 4:56 ` Jakub Kicinski
2022-02-14 19:18 ` Ioana Ciornei [this message]
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=20220214191834.3xmv44htevxpkztn@skbuf \
--to=ioana.ciornei@nxp.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=radu-andrei.bulie@nxp.com \
--cc=yangbo.lu@nxp.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