vhost: fix checking of device features
To compare enabled features in current device we must use bit
mask instead of bit position.
Fixes: c843af3aa1
("vhost: access header only if offloading is supported")
Cc: stable@dpdk.org
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This commit is contained in:
parent
71afcefbd5
commit
c665d9a231
@ -615,9 +615,11 @@ static inline bool
|
||||
virtio_net_with_host_offload(struct virtio_net *dev)
|
||||
{
|
||||
if (dev->features &
|
||||
(VIRTIO_NET_F_CSUM | VIRTIO_NET_F_HOST_ECN |
|
||||
VIRTIO_NET_F_HOST_TSO4 | VIRTIO_NET_F_HOST_TSO6 |
|
||||
VIRTIO_NET_F_HOST_UFO))
|
||||
((1ULL << VIRTIO_NET_F_CSUM) |
|
||||
(1ULL << VIRTIO_NET_F_HOST_ECN) |
|
||||
(1ULL << VIRTIO_NET_F_HOST_TSO4) |
|
||||
(1ULL << VIRTIO_NET_F_HOST_TSO6) |
|
||||
(1ULL << VIRTIO_NET_F_HOST_UFO)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user