<infiniband/verbs.h> & ICC

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

 



Hi Jason,

Trying to compile <infiniband/verbs.h> with ICC (Intel's C/C++ Compiler)
leads to the following error:

--------%<--------%<--------%<--------%<--------
error: enumeration value is out of "int" range
         IBV_RX_HASH_INNER = (1UL << 31),
--------%<--------%<--------%<--------%<--------

IMO, ICC is correct here, because according to ISO-C99:
--------%<--------%<--------%<--------%<--------%<--------
6.4.4.3  Enumeration constants
 Semantics
  identifier declared as an enumeration constant has type int
--------%<--------%<--------%<--------%<--------%<--------

Since "int" is signed, it can't hold the unsigned value of 1UL<<31
on target platforms with sizeof(int) <= 4.

(In other words: that would be the sign-bit on two's complement machines).

The line causing this was introduced by:
--------%<--------%<--------%<--------%<--------%<--------
commit 3a4e353e9030a7d066e6f39f4f561f7b3f01a857
Author: Maor Gottlieb <maorg@xxxxxxxxxxxx>
Date:   Thu Aug 17 15:00:05 2017 +0300

    verbs: Add support in RSS of the inner packet
    
    Some user space application would like to do RSS on the inner packet
    fields instead of the outer. When user will set the IBV_RX_HASH_INNER
    bit with one of the other hash fields, then the RSS will be on the inner
    packet.
    
    Signed-off-by: Maor Gottlieb <maorg@xxxxxxxxxxxx>
    Reviewed-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
--------%<--------%<--------%<--------%<--------%<--------


Can you shed some light on whether or not verbs.h is supposed
to compile with ICC (i.e. if it's supported), and what the level
of appetite is to make this work?

It's trivial to fix this, but there's benefit in making this part
of a regression test suite (e.g. Travis).


Thanks,

  Gerd



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux