Re: [PATCH 046/144] usbmon: correct length for isochronous

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

 



On Fri, 7 Jan 2011 10:29:02 -0500 (EST)
Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> > One easy way to fix this is to use urb->transfer_buffer_length,
> > but this often transfers a whole lot of unused data, so we find
> > how much was actually used instead.
> 
> This is the patch I mentioned yesterday.  It changes an established
> kernel/userspace ABI, so I recommend that it be reverted and replaced 
> by the patch posted in
> 
> 	http://marc.info/?l=linux-usb&m=129424577426130&w=2

I'm sorry, but I disagree. I do not understand in what way the patch in
question changes the ABI. All it does is truncating the returned buffer
so that just enough data is returned. Such action on the part of usbmon
always was allowed and/or expected. We could have coalesced the fragments
without changing the ABI, but I thought it would be too bug-prone, which
is why Marton and I came up with the simple compromise that does not change
the layout of the buffer (previously returned by 'S' event).

In other words, I would like to see an application that breaks with this.
I admit, our communication with libpcap people is not the best, and I
relied on Marton to settle this with them. Guy Harris was in on this.
It's possible that I miss something here, but I think your ABI concern
is not well-founded.

> In effect, don't worry about transferring a whole lot of unused data, 
> since that's what userspace has learned to expect.  Just do it.

That is exactly what we do, over the objections of William P Morrow.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux