Re: [PATCH v5 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 22, 2019 at 09:40:11AM -0700, Greg KH wrote:
> 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 <suwan.kim027@xxxxxxxxx>
> 
> 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.

I just sent v6 patch. And I discarded patch1 and patch1 is no longer
needed because vhci doesn't set set HCD_DMA flag that is introduced
by Christoph's patch.
So I sent only patch 2 as v6.

Regards
Suwan Kim



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux