aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-08-13 12:54:35 -0400
committerRoland Dreier <roland@purestorage.com>2014-10-09 03:10:53 -0400
commit78eda2bb6542057b214af3bc1cae09c63e65d1d1 (patch)
treeed63e7b3396c33ee16b33cf815210fdd2a354396 /include/rdma/ib_verbs.h
parent3d73cf1a2a05cca7b43f7a0c16d1077065b38385 (diff)
IB/mlx5, iser, isert: Add Signature API additions
Expose more signature setting parameters. We modify the signature API to allow usage of some new execution parameters relevant to data integrity feature. This patch modifies ib_sig_domain structure by: - Deprecate DIF type in signature API (operation will be determined by the parameters alone, no DIF type awareness) - Add APPTAG check bitmask (for input domain) - Add REFTAG remap (increment) flag for each domain - Add APPTAG/REFTAG escape options for each domain The mlx5 driver is modified to follow the new parameters in HW signature setup. At the moment the callers (iser/isert) hard-code new parameters (by DIF type). In the future, callers will retrieve them from the scsi command structure. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h32
1 files changed, 14 insertions, 18 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index ed44cc07a7b3..470a011d6fa4 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -491,20 +491,14 @@ struct ib_mr_init_attr {
491 u32 flags; 491 u32 flags;
492}; 492};
493 493
494enum ib_signature_type {
495 IB_SIG_TYPE_T10_DIF,
496};
497
498/** 494/**
499 * T10-DIF Signature types 495 * Signature types
500 * T10-DIF types are defined by SCSI 496 * IB_SIG_TYPE_NONE: Unprotected.
501 * specifications. 497 * IB_SIG_TYPE_T10_DIF: Type T10-DIF
502 */ 498 */
503enum ib_t10_dif_type { 499enum ib_signature_type {
504 IB_T10DIF_NONE, 500 IB_SIG_TYPE_NONE,
505 IB_T10DIF_TYPE1, 501 IB_SIG_TYPE_T10_DIF,
506 IB_T10DIF_TYPE2,
507 IB_T10DIF_TYPE3
508}; 502};
509 503
510/** 504/**
@@ -520,24 +514,26 @@ enum ib_t10_dif_bg_type {
520/** 514/**
521 * struct ib_t10_dif_domain - Parameters specific for T10-DIF 515 * struct ib_t10_dif_domain - Parameters specific for T10-DIF
522 * domain. 516 * domain.
523 * @type: T10-DIF type (0|1|2|3)
524 * @bg_type: T10-DIF block guard type (CRC|CSUM) 517 * @bg_type: T10-DIF block guard type (CRC|CSUM)
525 * @pi_interval: protection information interval. 518 * @pi_interval: protection information interval.
526 * @bg: seed of guard computation. 519 * @bg: seed of guard computation.
527 * @app_tag: application tag of guard block 520 * @app_tag: application tag of guard block
528 * @ref_tag: initial guard block reference tag. 521 * @ref_tag: initial guard block reference tag.
529 * @type3_inc_reftag: T10-DIF type 3 does not state 522 * @ref_remap: Indicate wethear the reftag increments each block
530 * about the reference tag, it is the user 523 * @app_escape: Indicate to skip block check if apptag=0xffff
531 * choice to increment it or not. 524 * @ref_escape: Indicate to skip block check if reftag=0xffffffff
525 * @apptag_check_mask: check bitmask of application tag.
532 */ 526 */
533struct ib_t10_dif_domain { 527struct ib_t10_dif_domain {
534 enum ib_t10_dif_type type;
535 enum ib_t10_dif_bg_type bg_type; 528 enum ib_t10_dif_bg_type bg_type;
536 u16 pi_interval; 529 u16 pi_interval;
537 u16 bg; 530 u16 bg;
538 u16 app_tag; 531 u16 app_tag;
539 u32 ref_tag; 532 u32 ref_tag;
540 bool type3_inc_reftag; 533 bool ref_remap;
534 bool app_escape;
535 bool ref_escape;
536 u16 apptag_check_mask;
541}; 537};
542 538
543/** 539/**