[dpdk-dev] [PATCH] vhost: fix build error on old kernel doesn't support MQ

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Oct 30 15:58:17 CET 2015


2015-10-30 15:40, David Marchand:
> On Thu, Oct 29, 2015 at 4:37 AM, Yuanhan Liu <yuanhan.liu at linux.intel.com>
> wrote:
> 
> > Fix build error:
> >
> >   virtio-net.c:80:89: error: ‘VIRTIO_NET_F_MQ’ undeclared here
> >   rte_virtio_net.h:109: error: ‘VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX’
> > undeclared here
> >
> > Above two virtio-net MQ macros are introduced since kernel v3.8.
> > For older kernel, we should not reference them directly, hence,
> > this patch introduced two wrapper macros, with proper values
> > being set depending on we support MQ or not.
> >
> > Fixes: 19d4d7ef2a21 ("vhost-user: enable multiple queue")
> 
> Not sure about this fix line as a build error first appeared for me at
> b09b198bfb5c ("vhost-user: announce queue number in message")

Fixed

> > Reported-by: Gu YongjieX <yongjiex.gu at intel.com>
> > Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> >
> 
> Build restored on kernel 3.2 with this fixed applied.
> Tested-by: David Marchand <david.marchand at 6wind.com>

Applied, thanks


More information about the dev mailing list