lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 13 Apr 2021 03:46:28 +0000
From:   "Y.b. Lu" <yangbo.lu@....com>
To:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "David S . Miller" <davem@...emloft.net>,
        Richard Cochran <richardcochran@...il.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Jakub Kicinski <kuba@...nel.org>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Russell King <linux@...linux.org.uk>
Subject: RE: [net-next, v3, 2/2] enetc: support PTP Sync packet one-step
 timestamping

> -----Original Message-----
> From: Yangbo Lu <yangbo.lu@....com>
> Sent: 2021年4月12日 17:03
> To: netdev@...r.kernel.org
> Cc: Y.b. Lu <yangbo.lu@....com>; David S . Miller <davem@...emloft.net>;
> Richard Cochran <richardcochran@...il.com>; Claudiu Manoil
> <claudiu.manoil@....com>; Jakub Kicinski <kuba@...nel.org>; Vladimir
> Oltean <vladimir.oltean@....com>; Russell King <linux@...linux.org.uk>
> Subject: [net-next, v3, 2/2] enetc: support PTP Sync packet one-step
> timestamping
> 
> This patch is to add support for PTP Sync packet one-step timestamping.
> Since ENETC single-step register has to be configured dynamically per packet
> for correctionField offeset and UDP checksum update, current one-step
> timestamping packet has to be sent only when the last one completes
> transmitting on hardware. So, on the TX, this patch handles one-step
> timestamping packet as below:
> 
> - Trasmit packet immediately if no other one in transfer, or queue to
>   skb queue if there is already one in transfer.
>   The test_and_set_bit_lock() is used here to lock and check state.
> - Start a work when complete transfer on hardware, to release the bit
>   lock and to send one skb in skb queue if has.

Sorry, I made a mistake on the implementation of the logic. A fix-up was sent.
https://patchwork.kernel.org/project/netdevbpf/patch/20210413034817.8924-1-yangbo.lu@nxp.com/

> 
> And the configuration for one-step timestamping on ENETC before
> transmitting is,
> 
> - Set one-step timestamping flag in extension BD.
> - Write 30 bits current timestamp in tstamp field of extension BD.
> - Update PTP Sync packet originTimestamp field with current timestamp.
> - Configure single-step register for correctionField offeset and UDP
>   checksum update.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@....com>
> ---
> Changes for v2:
> 	- Rebased.
> 	- Fixed issues from patchwork checks.
> 	- netif_tx_lock for one-step timestamping packet sending.
> Changes for v3:
> 	- Used system workqueue.
> 	- Set bit lock when transmitted one-step packet, and scheduled
> 	  work when completed. The worker cleared the bit lock, and
> 	  transmitted one skb in skb queue if has, instead of a loop.
> ---
>  drivers/net/ethernet/freescale/enetc/enetc.c  | 191 ++++++++++++++++--
> drivers/net/ethernet/freescale/enetc/enetc.h  |  20 +-
>  .../ethernet/freescale/enetc/enetc_ethtool.c  |   3 +-
>  .../net/ethernet/freescale/enetc/enetc_hw.h   |   7 +
>  4 files changed, 195 insertions(+), 26 deletions(-)
[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ