From owner-svn-src-all@freebsd.org Mon Oct 24 20:53:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FC86C1FB9D; Mon, 24 Oct 2016 20:53:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47CB9F1C; Mon, 24 Oct 2016 20:53:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9OKriEN009551; Mon, 24 Oct 2016 20:53:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OKriuB009550; Mon, 24 Oct 2016 20:53:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201610242053.u9OKriuB009550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 24 Oct 2016 20:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307881 - head/sys/contrib/rdma/krping X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 20:53:45 -0000 Author: np Date: Mon Oct 24 20:53:44 2016 New Revision: 307881 URL: https://svnweb.freebsd.org/changeset/base/307881 Log: krping: Allow the underlying ib_device to handle DMA mappings. Submitted by: Vijay Singh @ Netapp Modified: head/sys/contrib/rdma/krping/krping.c Modified: head/sys/contrib/rdma/krping/krping.c ============================================================================== --- head/sys/contrib/rdma/krping/krping.c Mon Oct 24 20:47:46 2016 (r307880) +++ head/sys/contrib/rdma/krping/krping.c Mon Oct 24 20:53:44 2016 (r307881) @@ -548,11 +548,11 @@ static int krping_setup_buffers(struct k DEBUG_LOG(cb, "krping_setup_buffers called on cb %p\n", cb); - cb->recv_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->recv_dma_addr = ib_dma_map_single(cb->pd->device, &cb->recv_buf, sizeof(cb->recv_buf), DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, recv_mapping, cb->recv_dma_addr); - cb->send_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->send_dma_addr = ib_dma_map_single(cb->pd->device, &cb->send_buf, sizeof(cb->send_buf), DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, send_mapping, cb->send_dma_addr); @@ -606,7 +606,7 @@ static int krping_setup_buffers(struct k goto bail; } - cb->rdma_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->rdma_dma_addr = ib_dma_map_single(cb->pd->device, cb->rdma_buf, cb->size, DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, rdma_mapping, cb->rdma_dma_addr); @@ -676,7 +676,7 @@ static int krping_setup_buffers(struct k goto bail; } - cb->start_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->start_dma_addr = ib_dma_map_single(cb->pd->device, cb->start_buf, cb->size, DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, start_mapping, cb->start_dma_addr); @@ -1707,7 +1707,7 @@ static void krping_fr_test5(struct krpin goto err2; } DEBUG_LOG(cb, "%s buf[%u] %p\n", __func__, scnt, buf[scnt]); - dma_addr[scnt] = dma_map_single(cb->pd->device->dma_device, + dma_addr[scnt] = ib_dma_map_single(cb->pd->device, buf[scnt], cb->size, DMA_BIDIRECTIONAL); if (dma_mapping_error(cb->pd->device->dma_device, @@ -2032,7 +2032,7 @@ static void krping_fr_test6(struct krpin goto err2; } DEBUG_LOG(cb, "%s buf[%u] %p\n", __func__, scnt, buf[scnt]); - dma_addr[scnt] = dma_map_single(cb->pd->device->dma_device, + dma_addr[scnt] = ib_dma_map_single(cb->pd->device, buf[scnt], cb->size, DMA_BIDIRECTIONAL); if (dma_mapping_error(cb->pd->device->dma_device,