From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [iproute] rdma broken on 32 bit Date: Mon, 10 Dec 2018 14:10:20 -0800 Message-ID: <20181210141020.535f042a@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: netdev@vger.kernel.org To: Leon Romanovsky , David Ahern Return-path: Received: from mail-pg1-f178.google.com ([209.85.215.178]:43749 "EHLO mail-pg1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727515AbeLJWKX (ORCPT ); Mon, 10 Dec 2018 17:10:23 -0500 Received: by mail-pg1-f178.google.com with SMTP id v28so5611994pgk.10 for ; Mon, 10 Dec 2018 14:10:22 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: It appears that RDMA is broken on 32 bit platforms. Sure you don't run on 32bit, but iproute2 needs to build everywhere. The issue is that you are assuming a C enum can hold 64 bits. The standard says enum only has to hold "int" values. So it breaks on 32bit. The issue is deeper than just a trivial fix. Please either change iproute config script to not build RDMA if sizeof(enum) < 64 or fix the code to use a safe value like uint64_t. rdma CC rdma.o CC utils.o CC dev.o CC link.o In file included from rdma.h:26:0, from dev.c:12: dev.c: In function =E2=80=98dev_caps_to_str=E2=80=99: ../include/utils.h:269:38: warning: left shift count >=3D width of type [-W= shift-count-overflow] #define BIT(nr) (1UL << (nr)) ^ rdma.h:32:61: note: in expansion of macro =E2=80=98BIT=E2=80=99 #define RDMA_BITMAP_ENUM(name, bit_no) RDMA_BITMAP_##name =3D BIT(bit_no), ^~~ If you wade through the macro swamp: dev.c #define RDMA_DEV_FLAGS(x) \ x(SG_GAPS_REG, 32) \ enum { RDMA_DEV_FLAGS(RDMA_BITMAP_ENUM) }; Expands to: enum { RDMA_BITMAP_SG_GAPS_REG =3D (1UL << (32)), }; =09