Hi Christian,
> [from another thread]
>
>> - VAPI seems to require callbacks for results. [...] Having callbacks with
>> synchronous calls is pretty cumbersome, is there a way around having to use
>> callbacks with VAPI?
>
> This is actually makes vapi pretty unappealing (at least for me).
>
> Could the vapi generator be extended generate calls that use (2?) generic
> callbacks that stored the reply/replies in a user provided location (e.g.,
> foo_msg_reply_t **result, or foo_msg_details_t **results, the latter being a
> vec of foo_msg_details_t * for "dump" results)
>
> So instead of just:
>
> vapi_error_e vapi_sw_interface_dump(struct vapi_ctx_s *ctx,
> vapi_msg_sw_interface_dump *msg,
> vapi_error_e (*callback)(struct vapi_ctx_s *ctx,
> void *callback_ctx,
> vapi_error_e rv,
> bool is_last,
> vapi_payload_sw_interface_details *reply),
> void *callback_ctx);
>
> It would provide this too:
>
> vapi_error_e
> vsapi_sw_interface_dump(struct vapi_ctx_s *ctx,
> vapi_msg_sw_interface_dump *msg,
> vapi_payload_sw_interface_details **replies);
>
> ?
Yes, you could generate a blocking API version too.
You need to find a solution to separating out the asynchronous messages (e.g.
results from want_ calls) from the replies to the synchronous call.
One option is to use two separate connection (that Dave recently added support
for).
Best regards,
Ole
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15508): https://lists.fd.io/g/vpp-dev/message/15508
Mute This Topic: https://lists.fd.io/mt/71489738/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-