net/virtio: fix build with 0 headroom
authorHemant Agrawal <hemant.agrawal@nxp.com>
Thu, 25 Jul 2019 11:06:45 +0000 (16:36 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 5 Aug 2019 17:26:49 +0000 (19:26 +0200)
commitc1ada9b63b8309a99c6370ff50a24b7d6d238c9b
tree49c8e38ba745578836db1586a823214f9d66b5b7
parentf4435e380d7cd51327051d2de3409ba83a2b690c
net/virtio: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, virito ethdev driver throws
compilation error
virtio_ethdev.c:1851:2: note: in expansion of macro ‘RTE_BUILD_BUG_ON’
RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM
< sizeof(struct virtio_net_hdr_mrg_rxbuf));

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: dec08c28c0b3 ("virtio: check packet headroom at compile time")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_ethdev.c