From: <Arun.Ramadoss@microchip.com>
To: <pavan.chebbi@broadcom.com>
Cc: <andrew@lunn.ch>, <linux-kernel@vger.kernel.org>,
<UNGLinuxDriver@microchip.com>, <vivien.didelot@gmail.com>,
<olteanv@gmail.com>, <linux@armlinux.org.uk>, <ceggers@arri.de>,
<Tristram.Ha@microchip.com>, <f.fainelli@gmail.com>,
<kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>,
<richardcochran@gmail.com>, <netdev@vger.kernel.org>,
<Woojung.Huh@microchip.com>, <davem@davemloft.net>
Subject: Re: [Patch net-next v1 02/12] net: dsa: microchip: ptp: Initial hardware time stamping support
Date: Wed, 30 Nov 2022 04:32:40 +0000 [thread overview]
Message-ID: <b9f4fa71c1fd96fef32010e5bd0076ec4ecc56bb.camel@microchip.com> (raw)
In-Reply-To: <CALs4sv3nqNxMXwtdOdXuoS7xTKwXCrba=+s2e=Gq6cdEFNmttg@mail.gmail.com>
Hi Pavan,
Thanks for the comment.
On Tue, 2022-11-29 at 14:19 +0530, Pavan Chebbi wrote:
> On Mon, Nov 28, 2022 at 4:03 PM Arun Ramadoss
> <arun.ramadoss@microchip.com> wrote:
> >
> > From: Christian Eggers <ceggers@arri.de>
> >
> > This patch adds the routine for get_ts_info, hwstamp_get, set. This
> > enables
> > the PTP support towards userspace applications such as linuxptp.
> > Tx timestamping can be enabled per port and Rx timestamping enabled
> > globally.
> >
> > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > Co-developed-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> > Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> >
> > ---
> > RFC v2 -> Patch v1
> > - moved tagger set and get function to separate patch
> > - Removed unnecessary comments
> > ---
> > drivers/net/dsa/microchip/ksz_common.c | 2 +
> > drivers/net/dsa/microchip/ksz_common.h | 4 ++
> > drivers/net/dsa/microchip/ksz_ptp.c | 77
> > +++++++++++++++++++++++++-
> > drivers/net/dsa/microchip/ksz_ptp.h | 14 +++++
> > 4 files changed, 95 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/dsa/microchip/ksz_common.c
> > b/drivers/net/dsa/microchip/ksz_common.c
> > index 2d09cd141db6..7b85b258270c 100644
> > --- a/drivers/net/dsa/microchip/ksz_common.c
> > +++ b/drivers/net/dsa/microchip/ksz_common.c
> > @@ -2873,6 +2873,8 @@ static const struct dsa_switch_ops
> > ksz_switch_ops = {
> > .port_change_mtu = ksz_change_mtu,
> > .port_max_mtu = ksz_max_mtu,
> > .get_ts_info = ksz_get_ts_info,
> > + .port_hwtstamp_get = ksz_hwtstamp_get,
> > + .port_hwtstamp_set = ksz_hwtstamp_set,
> > };
> >
> > struct ksz_device *ksz_switch_alloc(struct device *base, void
> > *priv)
> > diff --git a/drivers/net/dsa/microchip/ksz_common.h
> > b/drivers/net/dsa/microchip/ksz_common.h
> > index 5a6bfd42c6f9..cd20f39a565f 100644
> > --- a/drivers/net/dsa/microchip/ksz_common.h
> > +++ b/drivers/net/dsa/microchip/ksz_common.h
> > @@ -103,6 +103,10 @@ struct ksz_port {
> > struct ksz_device *ksz_dev;
> > struct ksz_irq pirq;
> > u8 num;
> > +#if IS_ENABLED(CONFIG_NET_DSA_MICROCHIP_KSZ_PTP)
> > + u8 hwts_tx_en;
> > + bool hwts_rx_en;
>
> I see that the hwts_rx_en gets removed in the later patch. Instead
> you
> could add rx filters support only later when you have the final code
> in place.
In RFC v2, this patch 2 and next patch 3 are in single patch. There are
two simple reasons, I had splitted them two. One is to have logical
commit and ease of code review. Patch 2 will add the hwtstamp_set and
get dsa hooks and patch 3 to mechanism to coordinate with the tag_ksz.c
to add additional 4 bytes in tail tag when PTP is enabled based on
tagger_data.
Second reason to split is to have patch authorship. I had used the
Christian Eggers patch and extending support for LAN937x. In the
initial series, it has dsa_port->priv variable to store the
ptp_shared_data. Now priv variable is removed from dsa_port so I used
tagger_data based on sja1105 implementation. As it is different from
intial patch series, moved to separate patch.
>
> > +#endif
> > };
> >
> >
> >
> >
> >
> > #endif
> > --
> > 2.36.1
> >
next prev parent reply other threads:[~2022-11-30 4:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 10:32 [Patch net-next v1 00/12] net: dsa: microchip: add PTP support for KSZ9563/KSZ8563 and LAN937x Arun Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 01/12] net: dsa: microchip: ptp: add the posix clock support Arun Ramadoss
2022-11-28 14:49 ` Pavan Chebbi
2022-11-28 14:56 ` Christian Eggers
2022-11-30 23:05 ` Vladimir Oltean
2022-11-30 4:53 ` Arun.Ramadoss
2022-12-01 0:17 ` Vladimir Oltean
2022-12-01 10:01 ` Arun.Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 02/12] net: dsa: microchip: ptp: Initial hardware time stamping support Arun Ramadoss
2022-11-29 8:49 ` Pavan Chebbi
2022-11-30 4:32 ` Arun.Ramadoss [this message]
2022-12-01 0:39 ` Vladimir Oltean
2022-12-01 10:17 ` Arun.Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 03/12] net: dsa: microchip: ptp: add 4 bytes in tail tag when ptp enabled Arun Ramadoss
2022-12-01 0:52 ` Vladimir Oltean
2022-12-01 10:56 ` Arun.Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 04/12] net: dsa: microchip: ptp: Manipulating absolute time using ptp hw clock Arun Ramadoss
2022-11-29 8:43 ` Pavan Chebbi
2022-11-30 4:22 ` Arun.Ramadoss
2022-11-30 6:11 ` Pavan Chebbi
2022-12-01 1:04 ` Vladimir Oltean
2022-12-02 9:40 ` Arun.Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 05/12] net: dsa: microchip: ptp: enable interrupt for timestamping Arun Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 06/12] net: ptp: add helper for one-step P2P clocks Arun Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 07/12] net: dsa: microchip: ptp: add packet reception timestamping Arun Ramadoss
2022-11-29 0:43 ` kernel test robot
2022-11-28 10:32 ` [Patch net-next v1 08/12] net: dsa: microchip: ptp: add packet transmission timestamping Arun Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 09/12] net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag Arun Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 10/12] net: dsa: microchip: ptp: add 2 step timestamping for LAN937x Arun Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 11/12] net: dsa: microchip: ptp: add periodic output signal Arun Ramadoss
2022-11-29 8:53 ` Pavan Chebbi
2022-11-29 9:57 ` Pavan Chebbi
2022-11-30 4:48 ` Arun.Ramadoss
2022-11-30 4:41 ` Arun.Ramadoss
2022-11-28 10:32 ` [Patch net-next v1 12/12] net: dsa: microchip: ptp: add support for perout programmable pins Arun Ramadoss
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=b9f4fa71c1fd96fef32010e5bd0076ec4ecc56bb.camel@microchip.com \
--to=arun.ramadoss@microchip.com \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=ceggers@arri.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=richardcochran@gmail.com \
--cc=vivien.didelot@gmail.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).