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

2022-07-26 Thread Geva, Erez
Looking in the kernel code. The link mode mask are mandatory for the get_link_ksettings() call-back, the driver is require to fill them. The size is fixed to __ETHTOOL_LINK_MODE_MASK_NU32. >From kernel net/ethtool/ioctl.c:

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

2022-07-26 Thread Devasish Dey
Hi Erez, > I am confused. > Why do you ask for the link_mode_data, if you do not use it? > Wouldn't the ethtool_link_settings contain all the information we need here? Unfortunately, the ioctl call returns speed as 0 with ethtool_link_settings. So we had to use ecmd. Thanks, Devasish Dey

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

2022-07-26 Thread Erez
On Tue, 26 Jul 2022 at 14:27, 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

Re: [Linuxptp-devel] [PATCH 3/3] [Interface Rate TLV] adding TLV support

2022-07-26 Thread Devasish Dey
Hi Miroslav, Please find the answers to the queries. Thanks, Devasish Dey SyncMonk Technologies. www.syncmonk.net > > --- a/config.c > > +++ b/config.c > > @@ -240,6 +240,7 @@ struct config_item config_tab[] = { > > GLOB_ITEM_ENU("clock_type", CLOCK_TYPE_ORDINARY, clock_type_enu), > >

[Linuxptp-devel] [PATCH 3/4] [Interface Rate TLV] organization TLV support for interface rate

2022-07-26 Thread SyncMonk Technologies
adding interface rate TLV as defined by ITU-T G.8275.2 Annex D to enable master to communicate PTP port interface rate to slave. Signed-off-by: Greg Armstrong Signed-off-by: Leon Goldin Signed-off-by: Devasish Dey Signed-off-by: Vipin Sharma --- clock.c | 7 +++ clock.h | 7 +++

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

2022-07-26 Thread SyncMonk Technologies
Delay asymmetry calculation based on the PTP port interface speed of master obtained from TLV and the slave interface rate obtained by ethtool. Signed-off-by: Greg Armstrong Signed-off-by: Leon Goldin Signed-off-by: Devasish Dey Signed-off-by: Vipin Sharma --- interface.c | 9

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

2022-07-26 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. Signed-off-by: Greg Armstrong

[Linuxptp-devel] [PATCH 2/4] [Interface Rate TLV] adding speed field information for interface

2022-07-26 Thread SyncMonk Technologies
Get the interface speed related information using ethtool Signed-off-by: Greg Armstrong Signed-off-by: Leon Goldin Signed-off-by: Devasish Dey Signed-off-by: Vipin Sharma --- clock.c | 2 ++ interface.c | 11 +++ interface.h | 14 ++ port.c | 5 + 4 files