Re: T10 PI offloading seems to be broken in iser/isert in 4.5/4.6-rc

Nicholas A. Bellinger
2016-04-09T02:36:14Z

On Fri, 2016-04-08 at 17:14 -0700, Christoph Hellwig wrote:
> On Fri, Apr 08, 2016 at 04:48:10PM -0700, Nicholas A. Bellinger wrote:
> > It looks like the isert_set_dif_domain() assignments of
> > ib_sig_domain->sig.dif.* from dev->dev_attrib.block_size + friends is
> > being zeroed before making it into mlx5_ib_post_send() ->
> > IB_WR_REG_SIG_MR -> set_sig_umr_wr() -> set_sig_data_segment().
>
> From my limited understanding that's not the case, even if the weird
> printk about the bad block size might suggest it.
>
> I think what we have is the TARGET_PROT_DIN_INSERT /
> TARGET_PROT_DOUT_STRIP case (probably the first), and thus
> sig_attrs->mem.sig_type is set to IB_SIG_TYPE_NONE, but for some
> reason the prot pointer is set, which will lead to this misleading
> printk.

Ah, yes. However, TARGET_PROT_DIN_INSERT / TARGET_PROT_DOUT_STRIP
will only be happening in sbc_set_prot_op_checks() if fabric_prot = true
for a backend that does not support PI.

Eg: fabric_prot is for the special case where the fabric supports PI,
but the backend does not, and the normal feature bits a device would
expose for PI are emulated based upon the fabric protection features.

Since your backend does support PI, cmd->prot_op should always be
TARGET_PROT_*_PASS regardless.

The other thing to check is that isert_get_sup_prot_ops() is returning
TARGET_PROT_ALL when tpg->tpg_attrib.t10_pi = true.

>
> Does anyone know a recent working version of T10 PI in isert? There
> aren't any recent-ish changes that look related.

Sagi..?