[ovs-dev] [PATCH v2 1/4] Replace direct use of POLLXXX macros with OVS_POLLXXX

Anton Ivanov anton.ivanov at cambridgegreys.com
Fri Feb 14 21:19:01 UTC 2020


On 14/02/2020 20:43, Ben Pfaff wrote:
> On Fri, Feb 14, 2020 at 05:54:26PM +0000, anton.ivanov at cambridgegreys.com wrote:
>> From: Anton Ivanov <anton.ivanov at cambridgegreys.com>
>>
>> In order to allow switching between poll and epoll we need to
>> switch from the direct use of POLLXXX macros to OVS_POLLXXX which
>> can be either POLLXXX or EPOLLXXX depending on the actual backend.
>>
>> Signed-off-by: Anton Ivanov <anton.ivanov at cambridgegreys.com>
> I'm not sure that this level of abstraction is useful or needed,
> especially since POLL* and EPOLL* appear to actually have the same
> values.  It might be easier to just add some BUILD_ASSERT checks that
> this is the case.

Possible. I will give it a thought.

This was a first approximation -  I was not 100% sure that the "common" 
part will stay within the bits which are common and will not stray into 
the differences (NVAL, RDHUP, etc).

-- 

Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/



More information about the dev mailing list