Files
kernel/kernel-modules/bnxt_en
Jiping Ma 1f0f8289b9 bnxt_re: Fix the version compatibility issue
We meet the version compatibility issue after upgrading mlnx-ofa_kernel
to 5.9. mlnx-ofa_kernel-5.5 is based on linux kernel 5.13-rc4.
mlnx-ofa_kernel-5.9 is based on linux kernel v6.0-rc5. We adapt bnxt_re
to mlnx-ofa_kernel-5.9 by referring to the following two upstream
commits and the bnxt_re-227.0.130.0 source code.

The definition of create_qp() was changed with the following commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15-rc6&id=514aee660df493cd673154a6ba6bab745ec47b8c

IB_DEVICE_LOCAL_DMA_LKEY was removed with the following commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.0.y&id=e945c653c8e972d1b81a88e474d79f801b60213a

bnxt_re-220.0.12.0/main.c:1340:16: error: initialization of int \
  (*)(struct ib_qp *, struct ib_qp_init_attr *, struct ib_udata *) \
  from incompatible pointer type struct ib_qp * (*)(struct ib_pd *,\
  struct ib_qp_init_attr *, struct ib_udata *) \
  [-Werror=incompatible-pointer-types]
    1340 |  .create_qp  = bnxt_re_create_qp,
         |                ^~~~~~~~~~~~~~~~~
bnxt_re-220.0.12.0/ib_verbs.c:160:11: error: IB_DEVICE_LOCAL_DMA_LKEY \
  undeclared (first use in this function); did you mean \
  IBK_LOCAL_DMA_LKEY?
    160 |         | IB_DEVICE_LOCAL_DMA_LKEY
        |           ^~~~~~~~~~~~~~~~~~~~~~~~

Note: The dependency mlnx-ofed-kernel-dev package's name in debian/rules
and debian/control files was updated to have a @KERNEL_TYPE@ suffix, to
accommodate a similar change in the packaging of the Mellanox drivers.

Verification:
- Build module success for kernel-std/kernel-rt.
- Installation of the ISO image is successful with standard and
  low-latency profiles.
- Physical function interfaces are up and pass packets for rt and std.
- Create vfs, ensure that the interface can come up and pass packets.
- RDMA/Infiniband over Ethernet functionalities of the Broadcom adapters
  were successfully tested using the Linux RDMA community's perftest
  package.

Story: 2010958
Task: 49057

Depends-On: https://review.opendev.org/c/starlingx/kernel/+/900742

Change-Id: Ib2e597811f9289c7840fcef662d44ca6dbf26270
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
2023-11-16 13:53:54 +00:00
..
2022-04-07 15:48:17 -04:00