I know,

Yet the actualTableSize variable exist in 4 standard TABLE TLVs, although we do 
not support them yet.
I guess that is why Alexander Bulimov pick that name.
If I would name the variable, I would probably pick some thing different like 
"number of records",
 as size might be misleading. Size could also means total size in octets for 
example.

As for the structure name been different.
In print the name 'clockQuality'  follow the IEEE standard style.
Yet the variable 'clock_quality'  follow Linux coding style.
So, I do not suggest something different from what Alexander Bulimov did by 
himself.

I do not see any connection between the variable name, which should follow the 
Linux coding style,
 and the print name that should follow the IEEE standard.

Alexander also forget to add UNICAST_MASTER_TABLE_NP to pmc_tlv_datalen().
Not blame him in anyway. But unimportant staff like that does tend to slip. 

Personally, I would also use UInteger16 for type, but I am not that picky as 
for internal.
But as for external representation, I would prefer to be more compliant with 
IEEE standard.
Not because IEEE standard is better, just because it is the standard we try to 
keep.

I think it may by a good practice to use the same 'actualTableSize' for all 
future tables, for consistency.

Anyway, if you wish me to update the patch and send a second version, I would 
gladly do.

Thanks
   Erez

-----Original Message-----
From: Richard Cochran <richardcoch...@gmail.com> 
Sent: Tuesday, 22 March 2022 19:54
To: Erez <erezge...@gmail.com>
Cc: Geva, Erez (ext) (DI PA DCP R&D 3) <erez.geva....@siemens.com>; 
linuxptp-devel@lists.sourceforge.net
Subject: Re: [Linuxptp-devel] [PATCH 1/1] Fix management TLV print.

On Tue, Mar 22, 2022 at 12:54:55PM +0100, Erez wrote:
> As actualTableSize name comes from the IEEE standard.

UNICAST_MASTER_TABLE_NP is a custom creation, not in the standard at all.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to