My connect:
vapi_connect (ctx, "test123", NULL, 64, 32, VAPI_MODE_BLOCKING);

Even if there is no vapi_send, I can get 0 from vapi_recv after sometime.

My branch is stable 18.04.

Who can help? 
Thanks very much!



wangchuan...@163.com
 
From: wangchuan...@163.com
Date: 2018-10-14 17:06
To: vpp-dev
Subject: vapi recv error msg_id&msg_name
Hi all,
    I got a serious mistake when using vapi that 'recv msg->name' has nothing 
to do with 'send msg-id'.
The currently installed RPMS were compiled yesterday,and i do some change to 
src/*.
Should I compile my example after making pkg-rpm && installing all rpms again?
The code like :
    vapi_msg_sw_interface_set_l2_bridge *msg = 
vapi_alloc_sw_interface_set_l2_bridge(ctx);
msg->payload.rx_sw_if_index = rx_sw_if_index;
msg->payload.bd_id = bd_id;
msg->payload.shg = shg;
msg->payload.shg = shg;
msg->payload.bvi = bvi;
msg->payload.enable = enable;
vapi_msg_sw_interface_set_l2_bridge_hton (msg);

vapi_error_e rv = vapi_send (ctx, msg);

vapi_msg_sw_interface_set_l2_bridge_reply *resp;
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
vapi_msg_sw_interface_set_l2_bridge_reply_hton(resp);

printf("recv msg[%d] %s\n", resp->header._vl_msg_id, 
vapi_get_msg_name(resp->header._vl_msg_id) );

----------------------------------------------------
    recv msg[166] ip6nd_proxy_details
    recv msg[23] sw_interface_tag_add_del



wangchuan...@163.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10812): https://lists.fd.io/g/vpp-dev/message/10812
Mute This Topic: https://lists.fd.io/mt/27309659/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