From patchwork Wed Feb 19 23:14:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 3683391 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 43BFA9F1EE for ; Wed, 19 Feb 2014 23:11:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 27252201D5 for ; Wed, 19 Feb 2014 23:11:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FBBC201DE for ; Wed, 19 Feb 2014 23:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751283AbaBSXLp (ORCPT ); Wed, 19 Feb 2014 18:11:45 -0500 Received: from mail.linux-iscsi.org ([67.23.28.174]:54335 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbaBSXLo (ORCPT ); Wed, 19 Feb 2014 18:11:44 -0500 Received: from [172.18.0.146] (unknown [157.22.22.146]) (using SSLv3 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nab) by linux-iscsi.org (Postfix) with ESMTPSA id 97D7322D9DD; Wed, 19 Feb 2014 22:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=linux-iscsi.org; s=default.private; t=1392850210; bh=dlOXQEgtLOuxhbN2M+x1wQ2YT8D236r fMoU+5Z6SvYE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To: References:Content-Type:Mime-Version:Content-Transfer-Encoding; b=JAWL5UCvZn8pztMgy+7+m0AN/UgV/mZZNfHhcCC7DJyZRBQdtu8TAMutX1xZac+IQ f7cj1BZSvLNwgMXq69olX38lZCNxbl6IKPCRiRIeXEPTNuzJ9tmgk+CePAXfzK1TtST xE2Z4KvWQ+HOFqMA+IxGPyZrBwoB357iJUgAOqA= Message-ID: <1392851690.22195.7.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH v2 00/12] T10-DIF Initial support for iSER target From: "Nicholas A. Bellinger" To: Sagi Grimberg Cc: target-devel@vger.kernel.org, roland@kernel.org, linux-rdma@vger.kernel.org, oren@mellanox.com, martin.petersen@oracle.com Date: Wed, 19 Feb 2014 15:14:50 -0800 In-Reply-To: <1392825025-29943-1-git-send-email-sagig@mellanox.com> References: <1392825025-29943-1-git-send-email-sagig@mellanox.com> X-Mailer: Evolution 3.4.4-1 Mime-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 2014-02-19 at 17:50 +0200, Sagi Grimberg wrote: > Hey Nic, > > I addressed your comments in the this set. I'll try to send the > initiator code for review in the next couple of days. > > This patchset introduces target side T10-PI offload support over > RDMA. Currently the implementation is for iSER transport but can > be easily extended to SRP (or FCoE in the future). > > Should mention that this patchset depends on RDMA signature > verbs making it for inclusion which will hopefully happen in > near future. > > This code was tested against iSER legacy initiator, and also > initiator that uses T10-PI offload as well. I'll clean up the > initiator code in the following days and submit that as well. > > This code works under medium loads using backstores: > - FileIO with DIF emulation. > - RD with DIF emulation. > - iBLOCK (scsi_debug with DIF support). > > Chnages from v1: > - Rebased rdma_dif (3.14-rc2) > - Target core: > - Pass zero_flag=true to alloc_sgl for protection buffers > - Removed Unneeded inline function rwprotect > - Pass is_write bool to sbc_set_prot_op_checks > - Send failure response for absence of protection buffers > when needed. > - iSER: > - Removed unneeded assignments in isert_set_sig_attrs > > Chnages from v0: > - Rebased from for-next > - Target core: > - Don't minor fixes for check_prot - to support transports > that doesn't use submit_map_sgls. > - file format - use escape values. > - Removed redundant prot_handover. > - Added protection checks and operation set. > - iSER: > - Added preperation routines for mapping/unmapping buffers > to ease the amount of code in isert_reg_rdma. > - Fixed print of DIF error (sector instead of offset). > - Fix RDMA length for protection on wire domain. > - Refactored reg_sig_mr to use helper routines. > Hey Sagi, FYI, this series did not compile: drivers/infiniband/ulp/isert/ib_isert.c: In function ‘isert_reg_sig_mr’: drivers/infiniband/ulp/isert/ib_isert.c:2531:2: error: expected ‘;’ before ‘ret’ drivers/infiniband/ulp/isert/ib_isert.c: In function ‘isert_reg_rdma’: drivers/infiniband/ulp/isert/ib_isert.c:2611:24: warning: comparison between ‘enum target_prot_type’ and ‘enum target_prot_op’ [-Wenum-compare] drivers/infiniband/ulp/isert/ib_isert.c:2625:24: warning: comparison between ‘enum target_prot_type’ and ‘enum target_prot_op’ [-Wenum-compare] drivers/infiniband/ulp/isert/ib_isert.c:2667:43: warning: comparison between ‘enum target_prot_type’ and ‘enum target_prot_op’ [-Wenum-compare] drivers/infiniband/ulp/isert/ib_isert.c: In function ‘isert_put_datain’: drivers/infiniband/ulp/isert/ib_isert.c:2711:24: warning: comparison between ‘enum target_prot_type’ and ‘enum target_prot_op’ [-Wenum-compare] drivers/infiniband/ulp/isert/ib_isert.c:2732:24: warning: comparison between ‘enum target_prot_type’ and ‘enum target_prot_op’ [-Wenum-compare] drivers/infiniband/ulp/isert/ib_isert.c: At top level: drivers/infiniband/ulp/isert/ib_isert.c:2468:1: warning: ‘isert_set_sig_attrs’ defined but not used [-Wunused-function] drivers/target/target_core_transport.c: In function ‘transport_generic_new_cmd’: drivers/target/target_core_transport.c:2221:22: warning: comparison between ‘enum target_prot_type’ and ‘enum target_prot_op’ [-Wenum-compare] Squashing the following patch(es) into your original series, and applied to target-pending/rdma-dif. Thank you, --nab --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert. index 04bdd79..b7c8cd7 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -2527,7 +2527,7 @@ isert_reg_sig_mr(struct isert_conn *isert_conn, struct se_cmd *se_cmd, int ret; u32 key; - memset(&sig_attrs, 0, sizeof(sig_attrs)) + memset(&sig_attrs, 0, sizeof(sig_attrs)); ret = isert_set_sig_attrs(se_cmd, &sig_attrs); if (ret) goto err; @@ -2608,7 +2608,7 @@ isert_reg_rdma(struct iscsi_conn *conn, struct iscsi_cmd *cmd, return ret; if (wr->data.dma_nents != 1 || - se_cmd->prot_type != TARGET_PROT_NORMAL) { + se_cmd->prot_op != TARGET_PROT_NORMAL) { spin_lock_irqsave(&isert_conn->conn_lock, flags); fr_desc = list_first_entry(&isert_conn->conn_fr_pool, struct fast_reg_descriptor, list); @@ -2622,7 +2622,7 @@ isert_reg_rdma(struct iscsi_conn *conn, struct iscsi_cmd *cmd, if (ret) goto unmap_cmd; - if (se_cmd->prot_type != TARGET_PROT_NORMAL) { + if (se_cmd->prot_op != TARGET_PROT_NORMAL) { struct ib_sge prot_sge, sig_sge; if (se_cmd->t_prot_sg) { @@ -2664,7 +2664,7 @@ isert_reg_rdma(struct iscsi_conn *conn, struct iscsi_cmd *cmd, send_wr->opcode = IB_WR_RDMA_WRITE; send_wr->wr.rdma.remote_addr = isert_cmd->read_va; send_wr->wr.rdma.rkey = isert_cmd->read_stag; - send_wr->send_flags = se_cmd->prot_type == TARGET_PROT_NORMAL ? + send_wr->send_flags = se_cmd->prot_op == TARGET_PROT_NORMAL ? 0 : IB_SEND_SIGNALED; } else { send_wr->opcode = IB_WR_RDMA_READ; @@ -2708,7 +2708,7 @@ isert_put_datain(struct iscsi_conn *conn, struct iscsi_cmd *cmd) return rc; } - if (se_cmd->prot_type == TARGET_PROT_NORMAL) { + if (se_cmd->prot_op == TARGET_PROT_NORMAL) { /* * Build isert_conn->tx_desc for iSCSI response PDU and attach */ @@ -2729,7 +2729,7 @@ isert_put_datain(struct iscsi_conn *conn, struct iscsi_cmd *cmd) atomic_dec(&isert_conn->post_send_buf_count); } - if (se_cmd->prot_type == TARGET_PROT_NORMAL) + if (se_cmd->prot_op == TARGET_PROT_NORMAL) pr_debug("Cmd: %p posted RDMA_WRITE + Response for iSER Data " "READ\n", isert_cmd); else diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index a45d628..954e7ed 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2218,7 +2218,7 @@ transport_generic_new_cmd(struct se_cmd *cmd) return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; } - if (cmd->prot_type != TARGET_PROT_NORMAL) { + if (cmd->prot_op != TARGET_PROT_NORMAL) { ret = target_alloc_sgl(&cmd->t_prot_sg, &cmd->t_prot_nents, cmd->prot_length, true);