I'm starting to work on the vhost ABI refactoring, that I also have to touch the vhost example code. The vhost example code, however, is very messy, full of __very__ long lines. This would make a later diff to apply the new vhost API be very ugly, therefore, not friendly for review. This is how this cleanup comes.
Besides that, there is one enhancement patch, which handles the broadcast packets so that we could rely the ARP request packet, to let vhost-switch be more like a real switch. There is another patch that (hopefully) would fix the mbuf allocation failure ultimately. I also added some guidelines there as comments to show how to count how many mbuf entries is enough for our usage. In another word, an example is meant to be clean/simple and with good coding style so that people can get the usage easily. So, one way or another, this patch is good to have, even without this ABI refactoring stuff. Note that I'm going to apply it before the end of this week, if no objections. v2: - some checkpatch fixes - cleaned the code about device statistics --- Yuanhan Liu (8): examples/vhost: remove the non-working zero copy code examples/vhost: remove unused macro and struct examples/vhost: use tailq to link vhost devices examples/vhost: use mac compare helper function directly examples/vhost: handle broadcast packet examples/vhost: fix mbuf allocation failure examples/vhost: switch_worker cleanup examples/vhost: embed statistics into vhost_dev struct doc/guides/sample_app_ug/vhost.rst | 36 +- examples/vhost/main.c | 2394 ++++++------------------------------ examples/vhost/main.h | 56 +- 3 files changed, 391 insertions(+), 2095 deletions(-) -- 1.9.3