public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] sfc: add transmit timestamping support
@ 2026-03-24 16:08 Izabela Bakollari
  2026-03-25  0:58 ` Edward Cree
  2026-03-25  9:35 ` Breno Leitao
  0 siblings, 2 replies; 5+ messages in thread
From: Izabela Bakollari @ 2026-03-24 16:08 UTC (permalink / raw)
  To: Edward Cree, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-net-drivers, linux-kernel

Enable software TX Timestamping. The out of tree driver 
also implements this.

Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
---
 drivers/net/ethernet/sfc/ethtool.c | 2 ++
 drivers/net/ethernet/sfc/tx.c      | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
index 362388754a29..c0038b942913 100644
--- a/drivers/net/ethernet/sfc/ethtool.c
+++ b/drivers/net/ethernet/sfc/ethtool.c
@@ -231,6 +231,8 @@ static int efx_ethtool_get_ts_info(struct net_device *net_dev,
 {
 	struct efx_nic *efx = efx_netdev_priv(net_dev);
 
+	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
+
 	efx_ptp_get_ts_info(efx, ts_info);
 	return 0;
 }
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index 4dff19b6ef17..ea0fc1000476 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -371,6 +371,8 @@ netdev_tx_t __efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb
 	if (!data_mapped && (efx_tx_map_data(tx_queue, skb, segments)))
 		goto err;
 
+	skb_tx_timestamp(skb);
+
 	efx_tx_maybe_stop_queue(tx_queue);
 
 	tx_queue->xmit_pending = true;
-- 
2.51.0


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

* Re: [PATCH net-next] sfc: add transmit timestamping support
  2026-03-24 16:08 [PATCH net-next] sfc: add transmit timestamping support Izabela Bakollari
@ 2026-03-25  0:58 ` Edward Cree
  2026-03-25  9:35 ` Breno Leitao
  1 sibling, 0 replies; 5+ messages in thread
From: Edward Cree @ 2026-03-25  0:58 UTC (permalink / raw)
  To: Izabela Bakollari, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-net-drivers, linux-kernel

On 24/03/2026 16:08, Izabela Bakollari wrote:
> Enable software TX Timestamping. The out of tree driver 
> also implements this.
> 
> Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>

Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>

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

* Re: [PATCH net-next] sfc: add transmit timestamping support
  2026-03-24 16:08 [PATCH net-next] sfc: add transmit timestamping support Izabela Bakollari
  2026-03-25  0:58 ` Edward Cree
@ 2026-03-25  9:35 ` Breno Leitao
  2026-03-27  1:39   ` Jakub Kicinski
  1 sibling, 1 reply; 5+ messages in thread
From: Breno Leitao @ 2026-03-25  9:35 UTC (permalink / raw)
  To: Izabela Bakollari
  Cc: Edward Cree, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-net-drivers,
	linux-kernel

On Tue, Mar 24, 2026 at 05:08:21PM +0100, Izabela Bakollari wrote:
> Enable software TX Timestamping. The out of tree driver 
> also implements this.

"The out of tree driver also implements this" is not the most technical
justification.

>
> Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
> ---
>  drivers/net/ethernet/sfc/ethtool.c | 2 ++
>  drivers/net/ethernet/sfc/tx.c      | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
> index 362388754a29..c0038b942913 100644
> --- a/drivers/net/ethernet/sfc/ethtool.c
> +++ b/drivers/net/ethernet/sfc/ethtool.c
> @@ -231,6 +231,8 @@ static int efx_ethtool_get_ts_info(struct net_device *net_dev,
>  {
>  	struct efx_nic *efx = efx_netdev_priv(net_dev);
>  
> +	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;

Don't you need to append SOF_TIMESTAMPING_TX_SOFTWARE instead of
assinging it?

	ts_info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;

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

* Re: [PATCH net-next] sfc: add transmit timestamping support
  2026-03-25  9:35 ` Breno Leitao
@ 2026-03-27  1:39   ` Jakub Kicinski
  2026-03-27 10:29     ` Breno Leitao
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-03-27  1:39 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Izabela Bakollari, Edward Cree, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-net-drivers,
	linux-kernel

On Wed, 25 Mar 2026 02:35:12 -0700 Breno Leitao wrote:
> On Tue, Mar 24, 2026 at 05:08:21PM +0100, Izabela Bakollari wrote:
> > Enable software TX Timestamping. The out of tree driver 
> > also implements this.  
> 
> "The out of tree driver also implements this" is not the most technical
> justification.

+1 it's an odd thing to put in the commit msg.
Please fix and repost (keep Ed's tag)

> > diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
> > index 362388754a29..c0038b942913 100644
> > --- a/drivers/net/ethernet/sfc/ethtool.c
> > +++ b/drivers/net/ethernet/sfc/ethtool.c
> > @@ -231,6 +231,8 @@ static int efx_ethtool_get_ts_info(struct net_device *net_dev,
> >  {
> >  	struct efx_nic *efx = efx_netdev_priv(net_dev);
> >  
> > +	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;  
> 
> Don't you need to append SOF_TIMESTAMPING_TX_SOFTWARE instead of
> assinging it?
> 
> 	ts_info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;

Either way is fine IMHO unless you see a specific reason Breno?
-- 
pw-bot: cr

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

* Re: [PATCH net-next] sfc: add transmit timestamping support
  2026-03-27  1:39   ` Jakub Kicinski
@ 2026-03-27 10:29     ` Breno Leitao
  0 siblings, 0 replies; 5+ messages in thread
From: Breno Leitao @ 2026-03-27 10:29 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Izabela Bakollari, Edward Cree, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-net-drivers,
	linux-kernel

On Thu, Mar 26, 2026 at 06:39:51PM -0700, Jakub Kicinski wrote:
> On Wed, 25 Mar 2026 02:35:12 -0700 Breno Leitao wrote:
> > On Tue, Mar 24, 2026 at 05:08:21PM +0100, Izabela Bakollari wrote:
> > > Enable software TX Timestamping. The out of tree driver 
> > > also implements this.  
> > 
> > "The out of tree driver also implements this" is not the most technical
> > justification.
> 
> +1 it's an odd thing to put in the commit msg.
> Please fix and repost (keep Ed's tag)
> 
> > > diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
> > > index 362388754a29..c0038b942913 100644
> > > --- a/drivers/net/ethernet/sfc/ethtool.c
> > > +++ b/drivers/net/ethernet/sfc/ethtool.c
> > > @@ -231,6 +231,8 @@ static int efx_ethtool_get_ts_info(struct net_device *net_dev,
> > >  {
> > >  	struct efx_nic *efx = efx_netdev_priv(net_dev);
> > >  
> > > +	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;  
> > 
> > Don't you need to append SOF_TIMESTAMPING_TX_SOFTWARE instead of
> > assinging it?
> > 
> > 	ts_info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;
> 
> Either way is fine IMHO unless you see a specific reason Breno?

No specific reason, it is more a nit.

so_timestamping is always zero-initialized before the callback is called,
meaning = and |= are functionally equivalent today.

That said, I see these callbacks setting fields in so_timestamping, and not
overwriting it, given it does it later with it.

  ts_info->so_timestamping |= (SOF_TIMESTAMPING_TX_HARDWARE |
                               SOF_TIMESTAMPING_RX_HARDWARE |
                               SOF_TIMESTAMPING_RAW_HARDWARE);

But again, it makes no difference in here, given the value is already zero.

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

end of thread, other threads:[~2026-03-27 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 16:08 [PATCH net-next] sfc: add transmit timestamping support Izabela Bakollari
2026-03-25  0:58 ` Edward Cree
2026-03-25  9:35 ` Breno Leitao
2026-03-27  1:39   ` Jakub Kicinski
2026-03-27 10:29     ` Breno Leitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox