python-rdma icon indicating copy to clipboard operation
python-rdma copied to clipboard

union ibv_gid::raw must be defined as "unsigned char"

Open alex-zadara opened this issue 5 years ago • 0 comments

diff --git a/rdma/libibverbs.pxd b/rdma/libibverbs.pxd
index 055a6d1..3ff90b1 100644
--- a/rdma/libibverbs.pxd
+++ b/rdma/libibverbs.pxd
@@ -6,7 +6,7 @@ include 'libibverbs_enums.pxd'
 cdef extern from 'infiniband/verbs.h':

     union ibv_gid:
-        char raw[16]
+        unsigned char raw[16]

This is how it is defined in verbs.h (OFED 4.4):

union ibv_gid {
	uint8_t			raw[16];
	struct {
		uint64_t	subnet_prefix;
		uint64_t	interface_id;
	} global;
};

alex-zadara avatar Jan 30 '20 09:01 alex-zadara