Skip to content

vhost/example cleanup/fix

Yuanhan Liu dpdk-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyIn review
  2. v17 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8examples/vhost: remove the non-working zero copy codedoc/guides/sample_app_ug/vhost.rst examples/vhost/main.c examples/vhost/main.h+25 -15250 replies
2/8examples/vhost: remove unused macro and structexamples/vhost/main.c+0 -140 replies
3/8examples/vhost: use tailq to link vhost devicesexamples/vhost/main.c examples/vhost/main.h+126 -3630 replies
4/8examples/vhost: use mac compare helper function directlyexamples/vhost/main.c+1 -130 replies
5/8examples/vhost: handle broadcast packetexamples/vhost/main.c+29 -100 replies
6/8examples/vhost: fix mbuf allocation failureexamples/vhost/main.c+59 -200 replies
7/8examples/vhost: switch_worker cleanupexamples/vhost/main.c+136 -1170 replies
8/8examples/vhost: embed statistics into vhost_dev structexamples/vhost/main.c examples/vhost/main.h+40 -580 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/8] vhost/example cleanup/fix

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(-)
Signature · 1 line
1.9.3