vhost: fix virtio-net header length with packed ring
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 1 Oct 2020 10:11:54 +0000 (12:11 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:18:47 +0000 (19:18 +0200)
commit22eaf2613537ba6b0e79f656195eeeaa3dd14666
treeea9edc86bb016f59102e2d951e899ab7bf3f2ab6
parentfa5054c4bb994311278d4a99cccf09be69296177
vhost: fix virtio-net header length with packed ring

In case packed ring layout has been negotiated, but neither
Version 1 nor mergeable buffers, the Virtio-net header len
is assigned to the legacy devices value, which is wrong.

This patch fixes this with using the proper len as devices
using packed ring are not legacy devices.

Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")
Cc: stable@dpdk.org
Reported-by: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/librte_vhost/vhost_user.c