Hi Klement,

Thanks for your reply and clarification. I found the issue on my end, my bad. 
On the dataplane plugin side of the api message handler:
> 
> 
> vl_api_session_add_t_handler(vl_api_session_add_t *mp)

I was making use of the endian generated functions in order to convert to host 
byte order the whole received api message request, right before processing it.
Endian functions included like so:
> 
> #define vl_endianfun
> #include "sample/sample.api.h"
> #undef vl_endianfun

Using the generated endian functions like so:
> 
> vl_api_session_add_t_handler(vl_api_session_add_t *mp)
> {
> ...
> vl_api_session_add_t_endian(mp);
> ...
> REPLY_MACRO(VL_API_SESSION_ADD_REPLY);
> }

But I wasn't careful enough in that the generated 
'vl_api_session_add_t_endian()' isn't converting to host byte order the message 
payload only, but the header fields also (i.e. '_vl_msg_id', 'client_index', 
and 'context' fields, not good).
As you explained, again thanks for that, 'context' field especially shall not 
be touched, but I unknowingly was swapping its endianness, and that's the 
actual root cause if I understood correctly.
The fix, just verified, is obviously by swapping the endianness of the payload 
only.

Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16569): https://lists.fd.io/g/vpp-dev/message/16569
Mute This Topic: https://lists.fd.io/mt/74526467/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #vapi: https://lists.fd.io/mk?hashtag=vapi&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to