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

2018-09-19 Thread Nikolay Nikolaev
On Wed, Sep 19, 2018 at 10:37 AM Maxime Coquelin wrote: > > > > On 09/15/2018 07:20 AM, 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_use

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

2018-09-19 Thread Maxime Coquelin
On 09/15/2018 07:20 AM, 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 and propagat

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

2018-09-14 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