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

2022-12-30 Thread Erez
On Thu, 29 Dec 2022 at 08:02, Devasish Dey wrote: > Hi Erez, > > >> > + 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. > > The

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

2022-12-28 Thread Devasish Dey
Hi Erez, > > + 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. The existing code seems to be more readable. One socket creation

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 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

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

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

2022-12-12 Thread Devasish Dey
> > > + 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_masks_nwords >= 0 || > > +

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

2022-12-09 Thread Geva, Erez
On Wed, 2022-12-07 at 17:34 +0530, SyncMonk Technologies wrote: > When master and slave instance interacting with each other operating > at different interface speed, delay assymetry needs to be compensated > as described in G.8271 appendix V. > > In this patch we are adding changes to get the

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

2022-12-07 Thread SyncMonk Technologies
When master and slave instance interacting with each other operating at different interface speed, delay assymetry needs to be compensated as described in G.8271 appendix V. In this patch we are adding changes to get the interface speed using ethtool. v1: initial commit. v2: updating comments