Re: [Linuxptp-devel] [PATCH v3 1/4] [Interface Rate TLV] function to support get interface speed via ethtool

2022-12-13 Thread Richard Cochran
On Tue, Dec 13, 2022 at 10:39:59AM +0530, Devasish Dey wrote: > > +struct sk_if_info { > > + bool valid; > It is better not to use bool in a structure, as the size is usually > int, i.e. 64 bits to hold 1 bit. Because we don't have huge arrays of these structs, the size isn't critical IMO.

Re: [Linuxptp-devel] [PATCH v3 4/4] [Interface Rate TLV] adding delay asymmetry calculation

2022-12-13 Thread Geva, Erez
On Tue, 2022-12-13 at 10:56 +0530, Devasish Dey wrote: > + /* Megabits per secon converted to attoseconds per bit. */ > + return 1ULL/ iface->if_info.speed; Performing division in running is not a very good idea. It is better to perform the division when updating the speed a

Re: [Linuxptp-devel] [PATCH v3 1/4] [Interface Rate TLV] function to support get interface speed via ethtool

2022-12-13 Thread Geva, Erez
On Tue, 2022-12-13 at 10:39 +0530, Devasish Dey wrote: > + goto failed; > + } I think it is better to merge this ioctl and the socket creation with sk_get_ts_info(). No reason for duplication. You can use a static function or inline one. > + > + if (ecmd.req.link_mode_ma

Re: [Linuxptp-devel] [PATCH v3 4/4] [Interface Rate TLV] adding delay asymmetry calculation

2022-12-13 Thread Geva, Erez
On Tue, 2022-12-13 at 17:27 +0100, Erez Geva wrote: On Tue, 2022-12-13 at 10:56 +0530, Devasish Dey wrote: > + /* Megabits per secon converted to attoseconds per bit. */ > + return 1ULL/ iface->if_info.speed; Performing division in running is not a very good idea. It is bett

Re: [Linuxptp-devel] [PATCH v3 1/4] [Interface Rate TLV] function to support get interface speed via ethtool

2022-12-13 Thread Geva, Erez
On Tue, 2022-12-13 at 17:39 +0100, Erez Geva wrote: On Tue, 2022-12-13 at 10:39 +0530, Devasish Dey wrote: > + goto failed; > + } I think it is better to merge this ioctl and the socket creation with sk_get_ts_info(). No reason for duplication. You can use a static function or

[Linuxptp-devel] [PATCH v3 0/1] Unselected master port may unintentionally continue to request announce/sync/delay_resp packets

2022-12-13 Thread vincent.cheng.xh
From: Vincent Cheng Problem === Unselected master port may unintentionally continue to request announce/sync/delay_resp packets. Expecting port with unselected master to only maintain announce messages. Setup = Client running with unicast mode and 2 ports, each port has single entry

[Linuxptp-devel] [PATCH v3 1/1] clock: Fix stale clock parent pid usage after best master change

2022-12-13 Thread vincent.cheng.xh
From: Vincent Cheng Problem === Unselected master port may unintentionally continue to request announce/sync/delay_resp packets. Expecting port with unselected master to only maintain announce messages. Cause = In handle_state_decision_event() loop, the update of the clock's parent pid

Re: [Linuxptp-devel] [PATCH v2 1/1] clock: Fix stale clock parent pid usage after best master change

2022-12-13 Thread Maciek Machnikowski
On 12/9/2022 1:56 AM, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > Please add a short description to the patch (ex. the problem and solution from the cover letter), as the description from the cover letter will not get to the git repo. > Signed-off-by: Vincent Cheng > --- >