vhost: Code cleaning 16/3916/4
authorPierre Pfister <ppfister@cisco.com>
Tue, 22 Nov 2016 10:33:34 +0000 (10:33 +0000)
committerDamjan Marion <dmarion.lists@gmail.com>
Tue, 6 Dec 2016 13:58:13 +0000 (13:58 +0000)
commitdbb3c25374fc5735c57960465bcc10278b147e5a
tree46f76ed5c93a26066206414d7d4d5f53810eae97
parentbeb1a8db496e87cb70b8fe39e5167c5c0ccde8d8
vhost: Code cleaning

After a bug was found, I decided to review old vhost code.
This change cleans some of it by:
- Use unix file private data rather than hash table
- Use vnet interface lookups rather than hash table
- Keep track of unix_fd index rather than fd value
- Change some indent
- Store interfaces in a clib pool rather than hand-made pool

The overall change reduces the number of lines as well as
the amount of state kept in vhost structures.

Change-Id: I6b9b670b9c7e1fb85981bcf2099f7140b0251fe0
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
vnet/vnet/devices/virtio/vhost-user.c
vnet/vnet/devices/virtio/vhost-user.h