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
| ||
|
Date: Thu, 24 Nov 2022 10:52:46 +0000 From: <Arun.Ramadoss@...rochip.com> To: <olteanv@...il.com> CC: <andrew@...n.ch>, <linux-kernel@...r.kernel.org>, <UNGLinuxDriver@...rochip.com>, <vivien.didelot@...il.com>, <linux@...linux.org.uk>, <Tristram.Ha@...rochip.com>, <f.fainelli@...il.com>, <kuba@...nel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>, <richardcochran@...il.com>, <netdev@...r.kernel.org>, <Woojung.Huh@...rochip.com>, <davem@...emloft.net> Subject: Re: [RFC Patch net-next v2 3/8] net: dsa: microchip: Initial hardware time stamping support On Thu, 2022-11-24 at 12:22 +0200, Vladimir Oltean wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > On Wed, Nov 23, 2022 at 01:57:47PM +0000, Arun.Ramadoss@...rochip.com > wrote: > > > What's your excuse which such a horrible code pattern? What will > > > happen > > > so bad with the packet if it's flagged with a TX timestamp > > > request in > > > KSZ_SKB_CB(skb) at the same time as REG_PTP_MSG_CONF1 is written > > > to? > > > > > > Also, doesn't dev->ports[port].hwts_tx_en serve as a guard > > > against > > > flagging packets for TX timestamps when you shouldn't? > > > > > > > I took this configuration template routine from other driver. Mistake here. It is carried forwarded from Christian Eggers patch. > > Not really a good excuse. The sja1105 driver has more hardware- > specific > issues to deal with, not necessarily the same as ksz. > > > Can I replace above snippet with > > > > tagger_data->hwtstamp_set_state(dev->ds, rx_on); > > ret = ksz_ptp_enable_mode(dev, rx_on); > > if (ret) > > return ret; > > Why do you need to call hwtstamp_set_state anyway? In tag_ksz.c, xmit function query this state, to determine whether to allocate the 4 PTP timestamp bytes in the skb_buffer or not. Using this tagger_data set state, ptp enable and disable is communicated between ksz_ptp.c and tag_ksz.c
Powered by blists - more mailing lists