[ewg] Compat-rdma compile error

Vladimir Sokolovsky vlad at dev.mellanox.co.il
Thu Aug 2 14:42:55 PDT 2018


On 08/02/2018 01:53 AM, Adit Ranadive wrote:
> On 8/1/18, 2:25 PM, "Vladimir Sokolovsky" <vlad at dev.mellanox.co.il> wrote:
>> On 08/01/2018 10:35 PM, Adit Ranadive wrote:
>>> On 8/1/18, 7:52 AM, "Vladimir Sokolovsky" <vlad at dev.mellanox.co.il> wrote:
>>>>      Hi Adit,
>>>>      I added missing headers and created a new build: OFED-4.17-20180801-0747.tgz
>>> Thanks! That got me past the earlier error, I'm still facing an issue below:
>>>
>>> CC [M]  /var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/compat/compat-3.11.o
>>> In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cmd.c:48:0:
>>> /var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h:96:2: error: unknown type name ‘refcount_t’
>>>     refcount_t refcnt;
>>>     ^
>>> /var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h:177:2: error: unknown type name ‘refcount_t’
>>>     refcount_t refcnt;
>>>     ^
>>> /var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h:199:2: error: unknown type name ‘refcount_t’
>>>     refcount_t refcnt;
>>>     ^
>>> make[5]: *** [/var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cmd.o] Error 1
>>> make[4]: *** [/var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw/vmw_pvrdma] Error 2
>>> make[3]: *** [/var/tmp/OFED_topdir/BUILD/compat-rdma-4.17/drivers/infiniband/hw] Error 2
>>>
>>> It looks like the refcount.h exists in compat-rdma. Do I need to include any config defines for pvrdma to pick up the header?
>>>
>>> Thanks,
>>> Adit
>>>     
>>>       
>>>       
>> You should add "#include <linux/refcount.h>" in pvrdma.h
> I guess that will be a backport patch for RHEL 7.4. I don't think this 
> is a problem for RHEL 7.5. After fixing that there seems to be a build 
> issue with mlx5 pertaining to PCI_IRQ_MSIX below (also with 
> vmw_pvrdma): 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c: 
> In function ‘mlx5_alloc_irq_vectors’: 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:337:2: 
> error: implicit declaration of function ‘pci_alloc_irq_vectors’ 
> [-Werror=implicit-function-declaration] nvec = 
> pci_alloc_irq_vectors(dev->pdev, ^ 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:339:4: 
> error: ‘PCI_IRQ_MSIX’ undeclared (first use in this function) 
> PCI_IRQ_MSIX); ^ 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:339:4: 
> note: each undeclared identifier is reported only once for each 
> function it appears in 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c: 
> In function ‘mlx5_free_irq_vectors’: 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:358:2: 
> error: implicit declaration of function ‘pci_free_irq_vectors’ 
> [-Werror=implicit-function-declaration] 
> pci_free_irq_vectors(dev->pdev); ^ 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c: 
> In function ‘mlx5_irq_set_affinity_hint’: 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:638:2: 
> error: implicit declaration of function ‘pci_irq_vector’ 
> [-Werror=implicit-function-declaration] int irq = 
> pci_irq_vector(mdev->pdev, MLX5_EQ_VEC_COMP_BASE + i); ^ 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c: 
> At top level: 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:1347:2: 
> error: unknown field ‘eswitch_encap_mode_set’ specified in initializer 
> .eswitch_encap_mode_set = mlx5_devlink_eswitch_encap_mode_set, ^ 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:1348:2: 
> error: unknown field ‘eswitch_encap_mode_get’ specified in initializer 
> .eswitch_encap_mode_get = mlx5_devlink_eswitch_encap_mode_get, ^ 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:1348:2: 
> warning: excess elements in struct initializer [enabled by default] 
> /root/rpmbuild/SOURCES/compat-rdma-4.17/drivers/net/ethernet/mellanox/mlx5/core/main.c:1348:2: 
> warning: (near initialization for ‘mlx5_devlink_ops’) [enabled by 
> default] Thanks, Adit

MLX5 compilation should work on RHEL7.4 with the latest daily build.

Regards,
Vladimir


More information about the ewg mailing list