X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Flacp%2Flacp_api.c;h=d23bf217baca000b18c29cc956655e34ffcf9c6b;hb=e098e78964c382a81756de0d2ae12deb95685400;hp=8bb6fa90eb0f8cfe3252eb6b5fe01ae963421688;hpb=d3d1205087783eb36c9e44d98a33a0f01adb47c9;p=vpp.git diff --git a/src/plugins/lacp/lacp_api.c b/src/plugins/lacp/lacp_api.c index 8bb6fa90eb0..d23bf217bac 100644 --- a/src/plugins/lacp/lacp_api.c +++ b/src/plugins/lacp/lacp_api.c @@ -50,42 +50,8 @@ #include #undef vl_api_version -/* - * A handy macro to set up a message reply. - * Assumes that the following variables are available: - * mp - pointer to request message - * rmp - pointer to reply message type - * rv - return value - */ -#define REPLY_MACRO(t) \ -do { \ - svm_queue_t * q = \ - vl_api_client_index_to_input_queue (mp->client_index); \ - if (!q) \ - return; \ - \ - rmp = vl_msg_api_alloc (sizeof (*rmp)); \ - rmp->_vl_msg_id = htons ((t)+lm->msg_id_base); \ - rmp->context = mp->context; \ - rmp->retval = htonl (rv); \ - \ - vl_msg_api_send_shmem (q, (u8 *)&rmp); \ -} while(0); - -#define REPLY_MACRO2(t, body) \ -do { \ - svm_queue_t * q = \ - vl_api_client_index_to_input_queue (mp->client_index); \ - if (!q) \ - return; \ - \ - rmp = vl_msg_api_alloc (sizeof (*rmp)); \ - rmp->_vl_msg_id = htons ((t)+lm->msg_id_base); \ - rmp->context = mp->context; \ - rmp->retval = htonl (rv); \ - do {body;} while (0); \ - vl_msg_api_send_shmem (q, (u8 *)&rmp); \ -} while(0); +#define REPLY_MSG_ID_BASE lm->msg_id_base +#include #define foreach_lacp_plugin_api_msg \ _(SW_INTERFACE_LACP_DUMP, sw_interface_lacp_dump)