[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);

?

Thanks,
Chris.

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

View/Reply Online (#15503): https://lists.fd.io/g/vpp-dev/message/15503
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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to