From patchwork Wed Jul 22 06:55:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 6840061 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1FFC9F38B for ; Wed, 22 Jul 2015 06:57:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB1FE2071C for ; Wed, 22 Jul 2015 06:57:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 007C6206F8 for ; Wed, 22 Jul 2015 06:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932464AbbGVG5T (ORCPT ); Wed, 22 Jul 2015 02:57:19 -0400 Received: from [193.47.165.129] ([193.47.165.129]:48168 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932482AbbGVG5S (ORCPT ); Wed, 22 Jul 2015 02:57:18 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from sagig@mellanox.com) with ESMTPS (AES256-SHA encrypted); 22 Jul 2015 09:55:59 +0300 Received: from r-vnc05.mtr.labs.mlnx (r-vnc05.mtr.labs.mlnx [10.208.0.115]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id t6M6txLf010168; Wed, 22 Jul 2015 09:55:59 +0300 Received: from r-vnc05.mtr.labs.mlnx (localhost [127.0.0.1]) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4) with ESMTP id t6M6txtW025093; Wed, 22 Jul 2015 09:55:59 +0300 Received: (from sagig@localhost) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id t6M6txo1025092; Wed, 22 Jul 2015 09:55:59 +0300 From: Sagi Grimberg To: linux-rdma@vger.kernel.org Cc: Liran Liss , Oren Duer Subject: [PATCH WIP 43/43] iser: Move unaligned counter increment Date: Wed, 22 Jul 2015 09:55:43 +0300 Message-Id: <1437548143-24893-44-git-send-email-sagig@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1437548143-24893-1-git-send-email-sagig@mellanox.com> References: <1437548143-24893-1-git-send-email-sagig@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 We don't always use bounce buffers, still we update this counter. Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 690f840..4d3dc1c 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -487,11 +487,8 @@ static int fall_to_bounce_buf(struct iscsi_iser_task *iser_task, struct iser_data_buf *mem, enum iser_data_dir cmd_dir) { - struct iscsi_conn *iscsi_conn = iser_task->iser_conn->iscsi_conn; struct iser_device *device = iser_task->iser_conn->ib_conn.device; - iscsi_conn->fmr_unalign_cnt++; - if (iser_debug_level > 0) iser_data_buf_dump(mem, device->ib_device); @@ -781,6 +778,7 @@ iser_handle_unaligned_buf(struct iscsi_iser_task *task, aligned_len = iser_data_buf_aligned_len(mem, device->ib_device, iser_conn->scsi_sg_tablesize); if (aligned_len != mem->dma_nents) { + iser_conn->iscsi_conn->fmr_unalign_cnt++; if (device->dev_attr.device_cap_flags & IB_DEVICE_MAP_ARB_SG) /* Arbitrary sg support, no need to bounce :) */ return 0;