From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 515DB8E6E for ; Tue, 3 Nov 2015 12:35:06 +0100 (CET) Received: by wmll128 with SMTP id l128so84390192wml.0 for ; Tue, 03 Nov 2015 03:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=reply-to:subject:references:to:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=DJwHvrajXSQbK6rQy7wFtuit0DdU+9z+lEHuO4quMTE=; b=GtToS4brXGMByqhqZcS5NbH55qAoDRLxbFruwgfegdn5W1O6Se3cTfX9/aNSQv321D nf7keyoops3L7viCUNuCsAJkZyXEm2W58mFSYimnOPJOF0h1rhdAv7fpsfokFr5wfKHH qB6c87GIAplJVHpEqO/09VzGxAcS20anHx8JVaBzl0Z39p8/xNYnBzQcg5+qNI9hJ/Xt c5cnZ8PRj8GChmubiCJy5Dcj+dDFj0WBRpVafxSqyOIbuZj9NvNkvWt6NTUujFnekqg/ 3MKJHyrdS4hOLSINb0dcw1WfBtMaKoWS3fxAvMcHoVKN4VInHdEyTzoKIAcvwP1X4Qt5 scAw== X-Received: by 10.28.174.144 with SMTP id x138mr19576005wme.28.1446550506185; Tue, 03 Nov 2015 03:35:06 -0800 (PST) Received: from [192.168.1.115] ([46.120.6.143]) by smtp.googlemail.com with ESMTPSA id 197sm22843351wmx.23.2015.11.03.03.35.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Nov 2015 03:35:05 -0800 (PST) References: <1446550121-27776-1-git-send-email-marcel@redhat.com> To: Marcel Apfelbaum , dev@dpdk.org From: Marcel Apfelbaum Message-ID: <56389BE6.3030202@gmail.com> Date: Tue, 3 Nov 2015 13:35:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1446550121-27776-1-git-send-email-marcel@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [Qemu-devel] [PATCH] vhost: fix compilation issue caused by virtio 1.0 support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: marcel@redhat.com List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 11:35:06 -0000 On 11/03/2015 01:28 PM, Marcel Apfelbaum wrote: > Commit 15e9ee6982a4822ce395fd597dd500a61ceafa7c (vhost: enable virtio 1.0) > uses the VIRTIO_F_VERSION_1 macro existing only in newer kernels. > > Fixed it by manually defining it for older kernels. I added to CC the involved developers, the git-send-email blocked it. Also sorry for the [Qemu-devel] prefix. Thanks, Marcel > > Reported-by: Xu, Qian Q > Signed-off-by: Marcel Apfelbaum > --- > > Hi, > > I reproduced the issue with 3.9.5 kernel and solved using > Xie, Huawei's idea. > > By the way, what is the earlier kernel that DPDK supports? > I tried 3.19 with no luck. > > Please let me know if you prefer another way to do it. > > Thanks, > Marcel > > lib/librte_vhost/rte_virtio_net.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h > index b6386f9..5687452 100644 > --- a/lib/librte_vhost/rte_virtio_net.h > +++ b/lib/librte_vhost/rte_virtio_net.h > @@ -108,6 +108,13 @@ struct vhost_virtqueue { > #define VHOST_SUPPORTS_MQ 0 > #endif > > +/* > + * Define virtio 1.0 for older kernels > + */ > +#ifndef VIRTIO_F_VERSION_1 > + #define VIRTIO_F_VERSION_1 32 > +#endif > + > /** > * Device structure contains all configuration information relating to the device. > */ >