> -----Original Message----- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > Sent: Tuesday, April 26, 2016 12:46 PM > To: dev at dpdk.org > Cc: Xie, Huawei <huawei.xie at intel.com>; Yuanhan Liu > <yuanhan.liu at linux.intel.com> > Subject: [dpdk-dev] [PATCH 0/7] vhost/example cleanup/fix > > I'm starting to work on the vhost ABI refactoring, that I also have to > touch the vhost example code, to make it work. 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.
I think this patch is great effort to clean the messy code and make clearer logic, only one suggestion: do you think a complete cleanup would help more? in terms of code style and function organization. Since there'll be further work on it, and it's a small file anyway. Currently some parts still seem messy to me, which compromises the effort of this patch. > > 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. > > --- > Yuanhan Liu (7): > 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 failures > examples/vhost: switch_worker cleanup > > doc/guides/sample_app_ug/vhost.rst | 36 +- > examples/vhost/main.c | 2319 > ++++++------------------------------ > examples/vhost/main.h | 49 +- > 3 files changed, 375 insertions(+), 2029 deletions(-) > > -- > 1.9.0