From: Huawei Xie Date: Tue, 26 Apr 2016 23:27:55 +0000 (+0800) Subject: virtio: fix mbuf headroom size check X-Git-Tag: spdx-start~6942 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fac0b224c822ee2ea0ee528ce68ab05a2c8be2e7;p=dpdk.git virtio: fix mbuf headroom size check check merge-able header as it is supported. previously we don't support merge-able feature, so non merge-able header is checked. Fixes: 13ce5e7eb94f ("virtio: mergeable buffers") Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index a0ef0a1ea0..1115d45410 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1036,7 +1036,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) struct rte_pci_device *pci_dev; int ret; - RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM < sizeof(struct virtio_net_hdr)); + RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM < sizeof(struct virtio_net_hdr_mrg_rxbuf)); eth_dev->dev_ops = &virtio_eth_dev_ops; eth_dev->tx_pkt_burst = &virtio_xmit_pkts;