[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/9] qapi: Generalize struct member policy checking
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v2 5/9] qapi: Generalize struct member policy checking |
Date: |
Fri, 29 Oct 2021 15:22:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Juan Quintela <quintela@redhat.com> writes:
> Markus Armbruster <armbru@redhat.com> wrote:
>> The generated visitor functions call visit_deprecated_accept() and
>> visit_deprecated() when visiting a struct member with special feature
>> flag 'deprecated'. This makes the feature flag visible to the actual
>> visitors. I want to make feature flag 'unstable' visible there as
>> well, so I can add policy for it.
>>
>> To let me make it visible, replace these functions by
>> visit_policy_reject() and visit_policy_skip(), which take the member's
>> special features as an argument. Note that the new functions have the
>> opposite sense, i.e. the return value flips.
>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> Reviewed-by: Juan Quintela <quintela@redhat.com>
>
> Reversing accept/reject make things "interesting" for a review point of view.
Sorry about that.
>> + * @special_features is the member's special features encoded as a
>> + * bitset of QapiSpecialFeature.
>
> Just to nitty pick, if you rename the variable to features, does the
> sentece is clearer?
Not to me, I'm afraid...
Thanks!
- [PATCH v2 0/9] Configurable policy for handling unstable interfaces, Markus Armbruster, 2021/10/28
- [PATCH v2 4/9] qapi: Tools for sets of special feature flags in generated code, Markus Armbruster, 2021/10/28
- [PATCH v2 3/9] qapi: Eliminate QCO_NO_OPTIONS for a slight simplification, Markus Armbruster, 2021/10/28
- [PATCH v2 7/9] qapi: Generalize enum member policy checking, Markus Armbruster, 2021/10/28
- [PATCH v2 5/9] qapi: Generalize struct member policy checking, Markus Armbruster, 2021/10/28
- Re: [PATCH v2 5/9] qapi: Generalize struct member policy checking, Eric Blake, 2021/10/29
[PATCH v2 1/9] qapi: New special feature flag "unstable", Markus Armbruster, 2021/10/28
[PATCH v2 2/9] qapi: Mark unstable QMP parts with feature 'unstable', Markus Armbruster, 2021/10/28
[PATCH v2 6/9] qapi: Generalize command policy checking, Markus Armbruster, 2021/10/28