Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1446502ybl; Thu, 22 Aug 2019 14:55:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxRg0Qze7EuZWliTyXzRijLgW/JJTwE2+T7ZA6KMtQ4s8Un4Ku2IW8clj6jkxdlVjtlMWv X-Received: by 2002:a17:90a:17c4:: with SMTP id q62mr1782954pja.135.1566510922257; Thu, 22 Aug 2019 14:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566510922; cv=none; d=google.com; s=arc-20160816; b=BYpOh4xNnlLfj0ssIdAlwQ/J4y0hJ9wB6O0Xa3l0mj/GFsDjsXVU1oFM50a6I5yyF6 4YWguPW9EUdNfUCeEo7DU1b6r5WrVQUqoGc3TfgCFzZZaVjJZq4vIvfI71K2TB+3kF0Q MLtqpCiwqqRKyxlDvCf2D18JPHrtGQhRIAJhjkMipCrSu2jS7h71hbhOhr+nLu2ulX9Z bXmwEfkVpTILor4O4pwEXZ5Cb5XANBbYygM3oReywTggaMyjB0hsKj8YzkxB4dfGgkwB P+WKEFwsdr7Ah+ObI46whAWLJOs9lU31pbJe0iNzB5Ojq5L9kFksZNw431ly3yYDmdfN 6cHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xrDdTEJR2lL4zb9JJbEztUmoLd011iduj8xX384WSHI=; b=gL6BbGnQ8e1qlg2k7zlCmYH9P6/Grmaj0j/bw5WDqnLRQbauV65EDfxX4pUb1J4FqN R0oDlZtlZXu8cCmorl/ALgQsBPBzRHV/7E9LOYWBYR4XaCWd1s3wiNWHxXhJs4hMksWb ohuXX0/wpqtYgm80phSin00EswBaS15+WKDHv6RPHZHnUBHGmmYb0MhcZuQDA3907pAp t2Y3mXhtoF1EGsuJyqv9toP3yBui/UYNoTSs9PrC05ZOQhC+Rv3cbqr1mEdptw0VLNwA bnHpGmXV3eBdNH+LLB2HOvXjNMmsBcMIuITxRaYu78UzlLoh0phktZ7KZYegm59qPFpm LvRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TUV+6Uj4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si743474pfi.34.2019.08.22.14.55.06; Thu, 22 Aug 2019 14:55:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TUV+6Uj4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390101AbfHVQkN (ORCPT + 99 others); Thu, 22 Aug 2019 12:40:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:49502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732772AbfHVQkM (ORCPT ); Thu, 22 Aug 2019 12:40:12 -0400 Received: from localhost (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A39C1206B7; Thu, 22 Aug 2019 16:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566492011; bh=NmcRQzXeQSbMpgliwymS2P//ES1g91LD3PV54eKVOck=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TUV+6Uj4D0IeJqx1y1qFnCWyJLvcZTRD/Mk5bj3Virrc6Mzwts+0y749MBjMzEh/F 0kjsQBd2PVEODqxUxtW/Abj1jUcbA3Hr2OB6IKQC2/FRpKBXHpzF683/oqEF/kL6Eq D3rb0uqSr+n6VzByHAQZ6sqg3MuFWYIkEeenp8kI= Date: Thu, 22 Aug 2019 09:40:11 -0700 From: Greg KH To: Suwan Kim Cc: shuah@kernel.org, valentina.manea.m@gmail.com, stern@rowland.harvard.edu, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci Message-ID: <20190822164011.GA7093@kroah.com> References: <20190808155435.10050-1-suwan.kim027@gmail.com> <20190808155435.10050-2-suwan.kim027@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190808155435.10050-2-suwan.kim027@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 09, 2019 at 12:54:34AM +0900, Suwan Kim wrote: > vhci doesn’t do DMA for remote device. Actually, the real DMA > operation is done by network card driver. vhci just passes virtual > address of the buffer to the network stack, so vhci doesn’t use and > need dma address of the buffer of the URB. > > But HCD provides DMA mapping and unmapping function by default. > Moreover, it causes unnecessary DMA mapping and unmapping which > will be done again at the NIC driver and it wastes CPU cycles. > So, implement map_urb_for_dma and unmap_urb_for_dma function for > vhci in order to skip the DMA mapping and unmapping procedure. > > When it comes to supporting SG for vhci, it is useful to use native > SG list (urb->num_sgs) instead of mapped SG list because DMA mapping > fnuction can adjust the number of SG list (urb->num_mapped_sgs). > And vhci_map_urb_for_dma() prevents isoc pipe from using SG as > hcd_map_urb_for_dma() does. > > Signed-off-by: Suwan Kim Can you please redo this patch based on my usb-next branch that has Christoph's DMA changes in it? It should make your change much simpler and smaller. Please do that and resend the whole series. thanks, greg k-h