qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Issues around TYPE_INTERFACE


From: Markus Armbruster
Subject: Re: [Qemu-devel] Issues around TYPE_INTERFACE
Date: Mon, 01 Apr 2019 10:28:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> On 29/03/19 19:11, Markus Armbruster wrote:
>>>>>> Yet they're used for less than half of the interface names:
>>>>>>
>>>>>>     TYPE_ISADMA
>>>>>>     TYPE_MEMORY_DEVICE
>>>>>>     TYPE_NMI
>
> Could be renamed to TYPE_NMI_MONITOR_HANDLER.
>
>>>>>>     TYPE_NVRAM
>>>>>>     TYPE_PPC_VIRTUAL_HYPERVISOR
>>>>>>     TYPE_STREAM_SLAVE
>>>>>>     TYPE_USER_CREATABLE
>>>>>>     TYPE_XICS_FABRIC
>>>>>>     TYPE_XIVE_NOTIFIER
>>>>>>
>>>>>> Can we agree on one naming convention, and enforce it?
>>>
>>> I tend to like interface names that express an ability ("foo-er",
>>> "foo-able").  Anything else should use a *_IF or *_IFACE suffix.
>> 
>> I like the _IFACE suffix.
>> 
>> Does eliding the _IFACE suffix for names ending with ER or ABLE improve
>> readability?
>> 
>> "foo-er" interface types:
>> 
>>     INTERFACE_RDMA_PROVIDER
>>     TYPE_FW_PATH_PROVIDER
>>     TYPE_HOTPLUG_HANDLER
>>     TYPE_INTERRUPT_STATS_PROVIDER
>>     TYPE_XIVE_NOTIFIER
>> 
>> "foo-er" non-interface types:
>
> Leaving out those where grammar threw a curve ball, or things that
> aren't QOM types, only the following remain (some of which could be
> debated further):
>
>>     TYPE_EXYNOS4210_COMBINER
>>     TYPE_FILTER_REWRITER
>>     TYPE_GENERIC_LOADER
>>     TYPE_PC_SPEAKER
>>     TYPE_PR_MANAGER
>>     TYPE_PR_MANAGER_HELPER
>>     TYPE_QIO_DNS_RESOLVER
>>     TYPE_QIO_NET_LISTENER
>>     TYPE_XIVE_ROUTER

As long as grep doesn't understand grammar, further debate seems not
without merit :)

>> "foo-able" interface types:
>> 
>>     TYPE_USER_CREATABLE
>> 
>> "foo-able" non-interface types:
>> 
>>     TYPE_SPAPR_TCE_TABLE
>
> Same here, doesn't really count.
>
> Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]