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]
Message-ID: <20250509131932.ymrlfbmcnznksxrg@skbuf>
Date: Fri, 9 May 2025 16:19:32 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: netdev@...r.kernel.org,
	Köry Maincent <kory.maincent@...tlin.com>,
	Andrew Lunn <andrew@...n.ch>,
	Siddharth Vadapalli <s-vadapalli@...com>,
	Roger Quadros <rogerq@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Richard Cochran <richardcochran@...il.com>,
	Russell King <linux@...linux.org.uk>, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH net-next 1/3] net: cpsw: return proper RX timestamping
 filter in cpsw_hwtstamp_get()

On Thu, May 08, 2025 at 11:33:06PM +0100, Vadim Fedorenko wrote:
> On 08/05/2025 20:48, Vladimir Oltean wrote:
> > priv->rx_ts_enabled is a boolean variable (0 or 1). Overlapped over enum
> > hwtstamp_rx_filters, it makes cfg.rx_filter take the value of either
> > HWTSTAMP_FILTER_NONE (when 0) or HWTSTAMP_FILTER_ALL (when 1).
> 
> Hmm.. I have to disagree here. rx_ts_enabled is int, not bool:
> 
> struct cpsw_priv {
>         struct net_device               *ndev;
>         struct device                   *dev;
>         u32                             msg_enable;
>         u8                              mac_addr[ETH_ALEN];
>         bool                            rx_pause;
>         bool                            tx_pause;
>         bool                            mqprio_hw;
>         int                             fifo_bw[CPSW_TC_NUM];
>         int                             shp_cfg_speed;
>         int                             tx_ts_enabled;
>         int                             rx_ts_enabled;
>         struct bpf_prog                 *xdp_prog;
> 	....
> 
> And it's assigned a value of HWTSTAMP_FILTER_PTP_V2_EVENT in
> cpsw_hwtstamp_set(). Not sure this change is actually needed.

You're right, thanks for pointing it out. I had searched for
"rx_ts_enabled" and mistook the first occurrence, in am65-cpsw-nuss.h,
as the definition for this driver. The patch is not needed in that case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ