Re: [PATCH for-next] RDMA/efa: Add checksum support for admin responses

Leon Romanovsky
2026-04-13T08:35:21Z

On Thu, Apr 09, 2026 at 07:49:05AM +0000, Yonatan Nachum wrote:
> EFA devices added support for CRC16 checksum on admin responses and to
> expose it to the driver the API version increased to 0.2. Add a check
> for support on device init and if supported validate the checksum on
> each admin response the driver receives. If the checksum validation
> failed, drop the CQE.
>
> Add the CRC16 module to Kconfig to have the in-tree dependency.
>
> Reviewed-by: Firas Jahjah <firasj@amazon.com>
> Reviewed-by: Michael Margolin <mrgolin@amazon.com>
> Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
> ---
> drivers/infiniband/hw/efa/Kconfig | 3 +-
> .../infiniband/hw/efa/efa_admin_cmds_defs.h | 3 --
> drivers/infiniband/hw/efa/efa_admin_defs.h | 15 +++---
> drivers/infiniband/hw/efa/efa_com.c | 50 ++++++++++++++++---
> drivers/infiniband/hw/efa/efa_com.h | 4 +-
> 5 files changed, 55 insertions(+), 20 deletions(-)

<...>

> -#define EFA_ADMIN_API_VERSION_MAJOR 0
> -#define EFA_ADMIN_API_VERSION_MINOR 1

<...>

> +#define EFA_ADMIN_API_VERSION_MAJOR 0
> +#define EFA_ADMIN_API_VERSION_MINOR 2

<...>

> @@ -954,16 +990,16 @@ int efa_com_validate_version(struct efa_com_dev *edev)
> EFA_GET(&ver, EFA_REGS_VERSION_MAJOR_VERSION),
> EFA_GET(&ver, EFA_REGS_VERSION_MINOR_VERSION));
>
> - EFA_SET(&min_ver, EFA_REGS_VERSION_MAJOR_VERSION,
> - EFA_ADMIN_API_VERSION_MAJOR);
> - EFA_SET(&min_ver, EFA_REGS_VERSION_MINOR_VERSION,
> - EFA_ADMIN_API_VERSION_MINOR);
> + EFA_SET(&min_ver, EFA_REGS_VERSION_MAJOR_VERSION, EFA_MIN_ADMIN_API_VERSION_MAJOR);
> + EFA_SET(&min_ver, EFA_REGS_VERSION_MINOR_VERSION, EFA_MIN_ADMIN_API_VERSION_MINOR);
> if (ver < min_ver) {
> ibdev_err(edev->efa_dev,
> "EFA version is lower than the minimal version the driver supports\n");
> return -EOPNOTSUPP;
> }

This change breaks all backward compatibility. Are you certain that every EFA
device is running the correct firmware, including those currently deployed and
used by customers? If not, they will stop to work after random kernel update.

Thanks