examples/vhost: support jumbo frame
authorOuyang Changchun <changchun.ouyang@intel.com>
Fri, 15 Aug 2014 04:58:01 +0000 (12:58 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 25 Aug 2014 15:14:36 +0000 (17:14 +0200)
commit2bbb811998086131d7bf29760bd77c1cec71e97c
treed3958f158bcc852a0fbeba464ecffac1ff375d40
parent13ce5e7eb94fc3b4049d1127c78692eb22b5bd6c
examples/vhost: support jumbo frame

This patch support mergeable RX feature and thus support jumbo frame RX and TX
in user space vhost(as virtio backend).

On RX, it secures enough room from vring to accommodate one complete scattered
packet which is received by PMD from physical port, and then copy data from
mbuf to vring buffer, possibly across a few vring entries and descriptors.

On TX, it gets a jumbo frame, possibly described by a few vring descriptors which
are chained together with the flags of 'NEXT', and then copy them into one scattered
packet and TX it to physical port through PMD.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
examples/vhost/main.c
examples/vhost/virtio-net.h