Re: [dpdk-dev] [PATCH v6 5/5] vhost: message handling implemented as a callback array

2018-10-02 Thread Maxime Coquelin
Hi Nikolay, On 09/24/2018 10:17 PM, Nikolay Nikolaev wrote: Introduce vhost_message_handlers, which maps the message request type to the message handler. Then replace the switch construct with a map and call. Failing vhost_user_set_features is fatal and all processing should stop immediately an

Re: [dpdk-dev] [PATCH v6 5/5] vhost: message handling implemented as a callback array

2018-09-26 Thread Maxime Coquelin
Hi Nikolay, On 09/24/2018 10:17 PM, Nikolay Nikolaev wrote: + switch (ret) { + case VH_RESULT_ERR: + RTE_LOG(ERR, VHOST_CONFIG, + "Processing %s failed.\n", + vhost_message_str[request])

[dpdk-dev] [PATCH v6 5/5] vhost: message handling implemented as a callback array

2018-09-24 Thread Nikolay Nikolaev
Introduce vhost_message_handlers, which maps the message request type to the message handler. Then replace the switch construct with a map and call. Failing vhost_user_set_features is fatal and all processing should stop immediately and propagate the error to the upper layers. Change the code acco