From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; 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: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Feb 2024 05:52:11 -0500 (EST) From: Thomas Monjalon To: David Marchand Cc: dev@dpdk.org, Eelco Chaudron , Maxime Coquelin , Chenbo Xia 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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.