[dpdk-dev] [PATCH 0/7] vhost/example cleanup/fix

2016-04-28 Thread Wang, Zhihong

> -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 ; Yuanhan Liu
> 
> 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



[dpdk-dev] [PATCH 0/7] vhost/example cleanup/fix

2016-04-28 Thread Yuanhan Liu
On Thu, Apr 28, 2016 at 05:45:16AM +, Wang, Zhihong wrote:
> 
> > -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 ; Yuanhan Liu
> > 
> > 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?

Yes, but I will stop here, and maybe do the left in near future, as I
have more important thing to do now. I even thought about to make the
VMDq and VLAN stuff optional, to not let our example connect with those
hardware feature that tight.

So, feel free to make patches to clean it further if you have time.

--yliu


[dpdk-dev] [PATCH 0/7] vhost/example cleanup/fix

2016-04-25 Thread Yuanhan Liu
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.

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