From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B974043B4C;
	Mon, 19 Feb 2024 11:52:16 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 9ADFF40289;
	Mon, 19 Feb 2024 11:52:16 +0100 (CET)
Received: from wfout8-smtp.messagingengine.com
 (wfout8-smtp.messagingengine.com [64.147.123.151])
 by mails.dpdk.org (Postfix) with ESMTP id 7B72D40275
 for <dev@dpdk.org>; Mon, 19 Feb 2024 11:52:14 +0100 (CET)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailfout.west.internal (Postfix) with ESMTP id DB5591C0007C;
 Mon, 19 Feb 2024 05:52:12 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Mon, 19 Feb 2024 05:52:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1708339932;
 x=1708426332; bh=duuUNBfv1qQwWoP6pJEddjy4V5nKWIJFy1Syf17IXMI=; b=
 vbF+bDf3s+DWw763CfyawHrSfZt2yJwDG/dNBVEZl9hduXkXRr3rJL3Ulc8v5A31
 lekFj3HzathL0fTc7Au5nUlIPauPuKglQPXT80HbtegPkHWDUB1oXCAbM9UX9PP3
 Nkbb5kTyjyxeO1an9Oy1QqAsV1GpoVqzzun68T6xU5vgmkhQfMhWqckJuahNt2oP
 5YTrxWWwK2PG/nWLzX5jNdwrVxGbpAGU5+vz/G/UZQzjHUlsc4Um9E2nmfBW7yoC
 9/uCu+/rVi5po87Pp5OB3jywA6moQWzFrxYUHdktXkq48It/lPDcCvyEQ4X7fq6Z
 nAdlO8lkmOYRqeKOvuqniA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708339932; x=
 1708426332; bh=duuUNBfv1qQwWoP6pJEddjy4V5nKWIJFy1Syf17IXMI=; b=j
 wY97nwCM2azdF9+EHpbgzy6NZ0XauFB7dP6g+ewYICQp7SxxoHDQ6HyyLtNn0yEo
 V5BQRoPz1InUpkMVTsPkjWx6G5m2EX/CIT27tAmPDM+IsMNa7RSu2y5rvU2cFHLb
 taVp4Uq91Ah6q3TPtDzQIyRJsorFIBqmSe6MvU/+7dbLnoxAZZqXTNU2lovwy6ia
 XP1kA2uyCBzrNkWVkiqfI1Xy+RlNNxHl9sHdntL9IzdOCJnre7ZwzKsAtXzhGIgX
 atQGB2qvqNBhb4+FoyMGBqUq3QGCETcguF0cZAe4sbCVzRS+yBUJ4Enn1bcIit4B
 cL25/WKJTuUDBUKe0+LFg==
X-ME-Sender: <xms:3DLTZWF89qmr9Qnh1oECWqP_YdSENaKWowcWJx5s3zvsUbzhcki98Q>
 <xme:3DLTZXU3FOGdzvQhx9hZkRzBeU5eIi_gTyaQBXIoVLRo79rAc2CNVXNlJIa7I5zeb
 brCOrrDV-XCm0UTxw>
X-ME-Received: <xmr:3DLTZQITq4yp8xJ3Ld-iAjUy6sfZQeLdvujw1vqqBmahZX9lqLTRBuCOZ9yvTdoB9R5o_IgQjrsxw3nmz68-iLhUJw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgddvtdcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek
 gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh
 homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:3DLTZQFQph5XzpMMDhhkKKzSZNrYUdM5-f2Nm1ywevLt9RWziC4T-A>
 <xmx:3DLTZcW64FNWlGbqH7OdSLtBDVhiEqJ1AdL8_lCgERDMMhTgOk50sg>
 <xmx:3DLTZTMg_yLxWquToAmiEvCB3lNTQN17-w0QQsJMbHS5SI4qyRM_sA>
 <xmx:3DLTZWeRpbAJadvFyeq5j9DiIY8iPzUN_Fn4APOZM3I7G_8agk4CPiCldqI>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 19 Feb 2024 05:52:11 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, Eelco Chaudron <echaudro@redhat.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>, Chenbo Xia <chenbox@nvidia.com>
Subject: Re: [PATCH v2 5/5] vhost: enhance virtqueue access lock asserts
Date: Mon, 19 Feb 2024 11:52:10 +0100
Message-ID: <4668504.U7HbjWM52l@thomas>
In-Reply-To: <20231205094536.2816720-5-david.marchand@redhat.com>
References: <20231023095520.2864868-1-david.marchand@redhat.com>
 <20231205094536.2816720-1-david.marchand@redhat.com>
 <20231205094536.2816720-5-david.marchand@redhat.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

05/12/2023 10:45, David Marchand:
> +#define VHOST_USER_ASSERT_LOCK(dev, vq, id) do { \
> +	RTE_BUILD_BUG_ON(!vhost_message_handlers[id].lock_all_qps); \
> +	vq_assert_lock(dev, vq); \
> +} while (0)

Since "eal: enhance compile-time checks using C11 assert",
it is not allowed to have non-constant check in RTE_BUILD_BUG_ON:

lib/vhost/vhost_user.c:413:25: note: in expansion of macro 'VHOST_USER_ASSERT_LOCK'
lib/vhost/vhost_user.c: In function 'vhost_user_set_vring_addr':
lib/eal/include/rte_common.h:518:56: error: expression in static assertion is not constant
  #define RTE_BUILD_BUG_ON(condition) do { static_assert(!(condition), #condition); } while (0)

I suppose we can make this check at compile-time with few adjustments.
For -rc1, I am dropping this patch.