Re: [PATCH] iscsi_iser: Re-enable 'iser_pi_guard' module parameter

Jason Gunthorpe
2018-01-10T23:02:40Z

On Wed, Jan 10, 2018 at 10:07:36AM +0100, Hannes Reinecke wrote:
> The module parameter 'iser_pi_guard' has been disabled by commit
> 5bb6e543d2a7d58 ("IB/iser: DIX update"), but the functionality
> to select the guard algorithm is still required.

Commit should explain why it is still required? What is the actual bug here?

Someone who understands this is going to have to Ack it for it to go
through the rdma tree..

> Fixes: 5bb6e543d2a7d58 ("IB/iser: DIX update")
> Signed-off-by: Hannes Reinecke <hare-IBi9RG/b67k@public.gmane.org>
> Cc: Steve Schremmer <sschremm-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
> drivers/infiniband/ulp/iser/iscsi_iser.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
> index 19624e0..34c4d0a 100644
> +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
> @@ -649,8 +649,10 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task)
> u32 sig_caps = ib_conn->device->ib_device->attrs.sig_prot_cap;
>
> scsi_host_set_prot(shost, iser_dif_prot_caps(sig_caps));
> - scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP |
> - SHOST_DIX_GUARD_CRC);
> + if (iser_pi_guard)
> + scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP);
> + else
> + scsi_host_set_guard(shost, SHOST_DIX_GUARD_CRC);
> }
>
> if (iscsi_host_add(shost,