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-next>] [day] [month] [year] [list]
Message-ID: <20250916101055.740518-1-niklas.soderlund+renesas@ragnatech.se>
Date: Tue, 16 Sep 2025 12:10:49 +0200
From: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
To: Paul Barker <paul@...rker.dev>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Magnus Damm <magnus.damm@...il.com>,
	Richard Cochran <richardcochran@...il.com>,
	netdev@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org
Cc: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
Subject: [net-next 0/6] net: renesas: Cleanup usage of gPTP flags

Hello,

This series aim is to prepare for future work that will enable the use 
of gPTP on R-Car RAVB on Gen4. Currently RAVB have a dedicated gPTP 
implementation supported on Gen2 and Gen3 (ravb_ptp.c). For Gen4 a new 
implementation that is already upstream (rcar_gen4_ptp.c) and used by 
other Gen4 devices such as RTSN and RSWITCH is needed.

Unfortunately the design of the Gen2/Gen3 RAVB driver where driver 
specific flags to control gPTP behavior have been mimicked in RTSN and 
RSWITCH. This was OK as there was no overlap between the two gPTP 
implementations. Now that RAVB needs to be able to use both having to 
translate between driver specific flags and common net code flags 
becomes even more cumbersome as there are two sets of driver specific 
flags to pick from.

This series cleans this up for all Renesas drivers using gPTP by 
removing all driver specific flags and using the common flags directly.  
This simplifies drivers while at the same time prepare RAVB to be 
extended with Gen4 support.

Patch 1/6 is a drive by patch where RSWITCH specific define was added in 
the wrong header. Patch 2/6 removes a short-cut used in RTSN and RSWITCH 
that prevents extending Gen4 support to RAVB without fuss. While patch 
3/6 to 6/6 rework the Renesas drivers to use the common flags instead of 
driver specific ones.

There is no intentional behavior change and only a small rework in logic 
in the RAVB driver. Looking at patch 3/6, 4/6 and 6/6 one can clearly 
see how the code have been copied from RAVB to the later implementations 
in RTSN and RSWITCH.

Niklas Söderlund (6):
  net: rswitch: Move definition of S4 gPTP offset
  net: rcar_gen4_ptp: Move control fields to users
  net: rswitch: Use common defines for time stamping control
  net: rtsn: Use common defines for time stamping control
  net: rcar_gen4_ptp: Remove unused defines
  net: ravb: Use common defines for time stamping control

 drivers/net/ethernet/renesas/ravb.h          | 14 +----
 drivers/net/ethernet/renesas/ravb_main.c     | 62 +++++++++-----------
 drivers/net/ethernet/renesas/rcar_gen4_ptp.h | 13 ----
 drivers/net/ethernet/renesas/rswitch.h       |  3 +
 drivers/net/ethernet/renesas/rswitch_main.c  | 41 ++++---------
 drivers/net/ethernet/renesas/rtsn.c          | 47 ++++-----------
 6 files changed, 59 insertions(+), 121 deletions(-)

-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ