[dpdk-dev,v2] virtio: check if virtio net header could fit in mbuf headroom

Message ID 1461713275-125779-1-git-send-email-huawei.xie@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Yuanhan Liu
Headers

Commit Message

Huawei Xie April 26, 2016, 11:27 p.m. UTC
  check merge-able header as it is supported.
previously we don't support merge-able feature, so non merge-able
header is checked.

v2:
 add missed signoff

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yuanhan Liu April 27, 2016, 10:11 p.m. UTC | #1
On Wed, Apr 27, 2016 at 07:27:55AM +0800, Huawei Xie wrote:
> check merge-able header as it is supported.
> previously we don't support merge-able feature, so non merge-able
> header is checked.
> 
> v2:
>  add missed signoff

Applied to dpdk-next-virtio with above version log removed: DPDK
prefers to put it below the SoB, so that it will not be in git
history.

Thanks.

	--yliu
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 63a368a..20ff03e 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;