On Mon, Mar 15, 2021 at 04:58:09PM +0100, Erez Geva wrote:
> diff --git a/tlv.c b/tlv.c
> index 98ef6e1..6e919e6 100644
> --- a/tlv.c
> +++ b/tlv.c
> @@ -324,6 +324,10 @@ static int mgt_post_recv(struct management_tlv *m,
> uint16_t data_len,
> psn = (struct port_stats_np *)m->data;
> psn->portIdentity.portNumber =
> ntohs(psn->portIdentity.portNumber);
> + for (i = 0 ; i < MAX_MESSAGE_TYPES; i++) {
> + psn->stats.rxMsgType[i] =
> le64_to_cpu(psn->stats.rxMsgType[i]);
> + psn->stats.txMsgType[i] =
> le64_to_cpu(psn->stats.txMsgType[i]);
> + }
Thanks for taking this approach. I'm getting build errors. Could you
please take a look?
/home/richard/git/linuxptp/tlv.c: In function ‘mgt_post_recv’:
/home/richard/git/linuxptp/tlv.c:327:8: error: ‘i’ undeclared (first use in
this function)
for (i = 0 ; i < MAX_MESSAGE_TYPES; i++) {
^
/home/richard/git/linuxptp/tlv.c:327:8: note: each undeclared identifier is
reported only once for each function it appears in
/home/richard/git/linuxptp/tlv.c:328:30: error: implicit declaration of
function ‘le64_to_cpu’; did you mean ‘le64toh’?
[-Werror=implicit-function-declaration]
psn->stats.rxMsgType[i] = le64_to_cpu(psn->stats.rxMsgType[i]);
^~~~~~~~~~~
le64toh
/home/richard/git/linuxptp/tlv.c: In function ‘mgt_pre_send’:
/home/richard/git/linuxptp/tlv.c:443:8: error: ‘i’ undeclared (first use in
this function)
for (i = 0 ; i < MAX_MESSAGE_TYPES; i++) {
^
/home/richard/git/linuxptp/tlv.c:444:30: error: implicit declaration of
function ‘cpu_to_le64’; did you mean ‘htole64’?
[-Werror=implicit-function-declaration]
psn->stats.rxMsgType[i] = cpu_to_le64(psn->stats.rxMsgType[i]);
^~~~~~~~~~~
htole64
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel