net/virtio-user: enable offloading
authorJianfeng Tan <jianfeng.tan@intel.com>
Fri, 13 Jan 2017 12:18:39 +0000 (12:18 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:24:56 +0000 (09:24 +0100)
commit5e97e42025635e03ff5c256275d7d7650fff4dbc
tree36091c9c18f6f41c1f72ffa51e4dfc05017dd90f
parente3b434818bbbda2334ec1c7373ab0c530f0718dd
net/virtio-user: enable offloading

When used with vhost kernel backend, we can offload at both directions.
  - From vhost kernel to virtio_user, the offload is enabled so that
    DPDK app can trust the flow is checksum-correct; and if DPDK app
    sends it through another port, the checksum needs to be
    recalculated or offloaded. It also applies to TSO.
  - From virtio_user to vhost_kernel, the offload is enabled so that
    kernel can trust the flow is L4-checksum-correct, no need to verify
    it; if kernel will consume it, DPDK app should make sure the
    l3-checksum is correctly set.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_user/vhost_kernel.c
drivers/net/virtio/virtio_user/vhost_kernel_tap.c
drivers/net/virtio/virtio_user/vhost_kernel_tap.h