lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Jul 2020 08:38:31 -0700
From:   Richard Cochran <>
To:     Vladimir Oltean <>
Cc:     Kurt Kanzenbach <>, Andrew Lunn <>,
        Vivien Didelot <>,
        Florian Fainelli <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,,
        Rob Herring <>,,
        Sebastian Andrzej Siewior <>,
        Kamil Alkhouri <>,
Subject: Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware

On Mon, Jul 13, 2020 at 05:12:17PM +0300, Vladimir Oltean wrote:
> On Mon, Jul 13, 2020 at 07:01:12AM -0700, Richard Cochran wrote:
> > I don't think it makes sense for DSA drivers to set this bit, as it
> > serves no purpose in the DSA context.
> > 
> For whom does this bit serve a purpose, though, and how do you tell?

It had a historical purpose.  Originally, the stack delivered either a
hardware or a software time stamp, but not both.  This restriction was
eventually lifted via the SOF_TIMESTAMPING_OPT_TX_SWHW option, but
still the original behavior is preserved as the default.

You can see how SKBTX_IN_PROGRESS is used by the skb_tstamp_tx() path

void __skb_tstamp_tx(struct sk_buff *orig_skb,
		     struct skb_shared_hwtstamps *hwtstamps,
		     struct sock *sk, int tstype)

	if (!hwtstamps && !(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_TX_SWHW) &&
	    skb_shinfo(orig_skb)->tx_flags & SKBTX_IN_PROGRESS)

It prevents SW time stamp when the flag is set.

Note that DSA drivers deliver TX time stamps via a different path,
namely skb_complete_tx_timestamp().  Also, DSA drivers don't provide
SW time stamping at all.

Q: When should drivers set SKBTX_IN_PROGRESS?

A: When the interface they represent offers both


Powered by blists - more mailing lists