net/virtio: check mbuf is direct when using any layout
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 9 May 2016 16:19:35 +0000 (18:19 +0200)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 22 Jun 2016 04:10:54 +0000 (06:10 +0200)
commit88c107840d67662f2f34e6fd69844f5e86a86075
tree167a07a66585d27edfa9b2dfe1c55c328177105e
parent34d279906d588e349f3e69020a94d7f932bdf099
net/virtio: check mbuf is direct when using any layout

The commit dd856dfcb9e74 introduced an optimization that prepends virtio
header to mbuf data. It can be used when the tx mbuf is writeable, so we
need to check that the mbuf is direct (i.e. it embeds its own data).

Fixes: dd856dfcb9e7 ("virtio: use any layout on Tx")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_rxtx.c