Heads up of API language change proposal:

In https://gerrit.fd.io/r/c/vpp/+/45649

vppapigen: union endian generation

In the VPP API language unions have been an ugly duckling.
Autogenerated endian functions for unions have applied endian
transform for every arm of the union. This has led to indeterministic
behaviour for "autoendian" functions using those.

With this fix vppapigen refuses to generate endian functions for
old-style unions.

It also adds language support for unions in this form:
enum punt_type {
PUNT_API_TYPE_L4,
PUNT_API_TYPE_IP_PROTO,
PUNT_API_TYPE_EXCEPTION,
};
union punt_union {
vl_api_punt_exception_t exception[case=PUNT_API_TYPE_EXCEPTION];
vl_api_punt_l4_t l4[case=PUNT_API_TYPE_L4];
vl_api_punt_ip_proto_t ip_proto[case=PUNT_API_TYPE_IP_PROTO];
};
typedef punt {
vl_api_punt_type_t type;
vl_api_punt_union_t punt[discriminator=type];
};

Nathan, would you mind taking a look at npol.api? There is a union 
(npol_ipset_member_val) that has no type field. Either that will require a 
manually provided endian function or the adding of an explicit type.

Cheers,
Ole


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26991): https://lists.fd.io/g/vpp-dev/message/26991
Mute This Topic: https://lists.fd.io/mt/119045257/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to