From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <maxime.coquelin@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 2582A68C1
 for <dev@dpdk.org>; Wed, 26 Apr 2017 09:32:48 +0200 (CEST)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
 [10.5.11.15])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 4BA7C46D093;
 Wed, 26 Apr 2017 07:32:47 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4BA7C46D093
Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com;
 dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com;
 spf=pass smtp.mailfrom=maxime.coquelin@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4BA7C46D093
Received: from [10.36.112.43] (ovpn-112-43.ams2.redhat.com [10.36.112.43])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 4627A17D42;
 Wed, 26 Apr 2017 07:32:46 +0000 (UTC)
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>, dev@dpdk.org
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
References: <cover.1493048352.git.adrien.mazarguil@6wind.com>
 <f1b1661e287326a33f05a317832fabaf4f880276.1493048352.git.adrien.mazarguil@6wind.com>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <2425492d-ab03-36ef-6628-ec131faec17f@redhat.com>
Date: Wed, 26 Apr 2017 09:32:44 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.0
MIME-Version: 1.0
In-Reply-To: <f1b1661e287326a33f05a317832fabaf4f880276.1493048352.git.adrien.mazarguil@6wind.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.29]); Wed, 26 Apr 2017 07:32:47 +0000 (UTC)
Subject: Re: [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict
	compilation flags
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Apr 2017 07:32:48 -0000



On 04/24/2017 05:52 PM, Adrien Mazarguil wrote:
> Exported headers must allow compilation with the strictest flags. This
> commit addresses the following errors:
> 
>   In file included from /tmp/check-includes.sh.20132.c:1:0:
>   build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
>      'regions' [-Werror=pedantic]
>   [...]
> 
> Also:
> 
> - Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
> - Move Linux includes into C++ block to prevent linking issues with
>    exported symbols.
> - Update check-includes.sh following the removal of rte_virtio_net.h.
> 
> Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
> from now on since the Linux headers they depend on are not clean enough:
> 
>   In file included from /usr/include/linux/vhost.h:17:0,
>                    from build/include/rte_vhost.h:43,
>                    from build/include/rte_eth_vhost.h:44,
>                    from /tmp/check-includes.sh.20132.c:1:
>   /usr/include/linux/virtio_ring.h: In function 'vring_init':
>   /usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
>      used in arithmetic [-Werror=pointer-arith]
>   [...]
>   In file included from build/include/rte_vhost.h:43:0,
>                    from build/include/rte_eth_vhost.h:44,
>                    from /tmp/check-includes.sh.20132.c:1:
>   /usr/include/linux/vhost.h: At top level:
>   /usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
>      structs/unions [-Werror=pedantic]
>   [...]
> 
> Fixes: eb32247457fe ("vhost: export guest memory regions")
> Fixes: a798beb47c8e ("vhost: rename header file")
> 
> Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
>   devtools/check-includes.sh   |  4 +++-
>   lib/librte_vhost/rte_vhost.h | 16 +++++++++++++---
>   2 files changed, 16 insertions(+), 4 deletions(-)

Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime