[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] public: add RING_NR_UNCONSUMED_*() macros to ring.h


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 26 Nov 2021 10:17:48 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oszTwVhiClHAKkG15YPzfXdQ55zZWzzemeeMNVhAdPo=; b=PS6Q6IgMTLfSAfCRO8SsapfS1cZfdmlYcQ1wvbwmUrvvBcV1hQTI8SyQVRV2kQRE4ypifDxqzIzyJwGs1Gjb6z2yEEPPE95dg0IOpIGs/BxwosimkSkDsungAN8lKl/7eZoDDeMh0u735Xpzy6iOwuPOo0dYXEDiAxKgJOzVSjmHtS06LzsIsL5ZZEgnXzqQdSt/k9Zr0pmXA7WB8SWEAsDaNZJaiI2xeqAnD7jB1uXd42NeOMIoC4q0K786bGrF0wkFdY81t8JXzz1hLgt/p6G0nj9TBd7+QZ9H1PI0+Ona/MIvKO2F4Jc+YhH+34ciL06XdMavVWj0binBpCt82w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fUP7FaDW2yC/ShUw/JpHiP+mhKpkw5ZWFNfmRAIVJYk6ffV4VhoO1QSWPhxFy/8esc/mkawg9UmPKVlO0whLiRQaMrI3/B9c30RAuGn8szv0h2mNffjvh9mGFWB3YeEZ92DT/8TxPd2WJXWmATGoG6DU5UQHDs9h+wSQqsINttn4Imuw+a853qSFbS3i6y3SjLgNOWtm0Askz6Hzlrq/ht6hNZ9/FThIF5inzMZ88c/y7xc3hD7M8OjMNIbAmFs/UTHwcYSbE7fIzqpj2WZbbqKylmzYLttad40AM1Buvfll5E3zssw4l1FgglTAPMTvMcatfy+USqWZBigce0E3fQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 26 Nov 2021 09:18:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.11.2021 07:55, Juergen Gross wrote:
> Today RING_HAS_UNCONSUMED_*() macros are returning the number of
> unconsumed requests or responses instead of a boolean as the name of
> the macros would imply.
> 
> As this "feature" is already being used, rename the macros to
> RING_NR_UNCONSUMED_*() and define the RING_HAS_UNCONSUMED_*() macros
> by using the new RING_NR_UNCONSUMED_*() macros. In order to avoid
> future misuse let RING_HAS_UNCONSUMED_*() really return a boolean.

I don't think we can go this far; consumers of our headers may choose
to do so, but anyone taking the headers verbatim would be at risk of
getting screwed if they had any instance of abuse in their trees. IOW
I think the original-name macros ought to be direct aliases of the
new-name ones, and only in Linux'es clone you could then go further.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.