Are you sure this isn't fixed with:
commit b5c0d35f9445d4d99f2c5c7bd3175e68721a8ee5
Author: Neale Ranns <nra...@cisco.com>
Date:   Wed Apr 22 16:06:45 2020 +0000

    vapi: packed enum type generation

    Type: fix

    if the ,api/.json specifies that a enum should be u8/u16 that the
    generated c enum needs to be packed.

Cheers,
Ole


> On 26 May 2020, at 17:17, pashinho1...@gmail.com wrote:
> 
> Hi all,
> 
> I don't know if this is the right place to ask and if the "issue" here is 
> really an expected one, or if I'm just doing something really stupid. So, 
> someone please do let me know.
> 
> I found some inconsistencies in some API header files installed under 
> "/usr/include/", in my case specifically 
> "/usr/include/vnet/ip/ip_types.api_types.h" and 
> "/usr/include/vapi/ip_types.api.vapi.h". For example, "vl_api_ip_dscp_t" is 
> defined in "/usr/include/vnet/ip/ip_types.api_types.h" header file as a 
> packed enum, while "vapi_enum_ip_dscp" (the one used by a e.g. C++ client) 
> defined in "/usr/include/vapi/ip_types.api.vapi.h" as a non-packed enum. This 
> is a problem because, as in my case, the C++ client sends a big message which 
> in the middle it happens to have a vapi_enum_ip_dscp field which is 4 bytes 
> long, while VPP receives this message where it sees the same dscp field as 
> "vapi_enum_ip_dscp" which is 1 byte long, so there you have it, I leave to 
> your imagination the consequences. 
> 
> I may apply some workarounds, but I really wanted to know if this was 
> expected (although I wouldn't know the sense of it).
> 
> Thank you 

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

View/Reply Online (#16500): https://lists.fd.io/g/vpp-dev/message/16500
Mute This Topic: https://lists.fd.io/mt/74479551/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #vnet: https://lists.fd.io/mk?hashtag=vnet&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