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

Leon Romanovsky
2026-04-13T19:08:15Z

On Mon, Apr 13, 2026 at 09:21:30AM +0000, Yonatan Nachum wrote:
> On Mon, Apr 13, 2026 at 11:35:15AM +0300, Leon Romanovsky wrote:
> > 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
>
> The minimum required API version for the driver to load remains 0.1
> (EFA_MIN_ADMIN_API_VERSION_MINOR). The CRC16 checksum validation is only
> enabled when the device reports API version >= 0.2. Devices running
> firmware 0.1 will continue to work — they just won't have checksum
> validation on admin responses.

Ahh, yes, I missed the addition of _MIN_ in the name.

Thanks

>