net/virtio-user: check negotiated features before set
authorEric Zhang <eric.zhang@windriver.com>
Wed, 29 Aug 2018 15:55:21 +0000 (11:55 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 12 Sep 2018 17:10:09 +0000 (19:10 +0200)
commit1db4d2330bc849a19b9f18479ae7a5a75bc01df2
treeb704fec5c982ceb0fa87bd23f94762428c9744c8
parent28925156d91bedb8f4b85b10dd9f3303a4d9e759
net/virtio-user: check negotiated features before set

This patch checks negotiated features to see if necessary to offload
before set the tap device offload capabilities. It also checks if kernel
support the TUNSETOFFLOAD operation.

Fixes: 5e97e4202563 ("net/virtio-user: enable offloading")
Cc: stable@dpdk.org
Signed-off-by: Eric Zhang <eric.zhang@windriver.com>
Reviewed-by: Tiwei Bie <tiwei.bie@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