Re: [linux-usb-devel] usbmon, next round

2006-11-24 Thread Pete Zaitcev
On Fri, 24 Nov 2006 09:52:46 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote: > Before returning the mutex 'fetch_lock' is hold, shouldn't it be > released ?!? Thanks, I fixed this by factoring the waiting. I am getting sloppy with the haste, sorry. -- Pete ---

Re: [linux-usb-devel] usbmon, next round

2006-11-24 Thread Paolo Abeni
Hello, I think there is a possible issue in the mon_get_event and mon_read functions: On Tue, 2006-11-21 at 22:56 -0800, Pete Zaitcev wrote: [...] > + mutex_lock(&rp->fetch_lock); > + > + add_wait_queue(&rp->b_wait, &waita); > + set_current_state(TASK_INTERRUPTIBLE); > + > + spin_

Re: [linux-usb-devel] usbmon, next round

2006-11-23 Thread Pete Zaitcev
On Thu, 23 Nov 2006 04:37:59 -0500, Ben Gamari <[EMAIL PROTECTED]> wrote: > Isn't copy_from_buf supposed to return "an error code, not an offset"? > Look at line 232 (return off;). I think it should probably return > 0. Addiionally, I don't think that the while loop in mon_bin_read > (line 636)

Re: [linux-usb-devel] usbmon, next round

2006-11-23 Thread Ben Gamari
Isn't copy_from_buf supposed to return "an error code, not an offset"? Look at line 232 (return off;). I think it should probably return 0. Addiionally, I don't think that the while loop in mon_bin_read (line 636) is supposed to be negated. I have also merged the patch with 2.6.19-rc6. Most of t

Re: [linux-usb-devel] usbmon, next round

2006-11-23 Thread Pete Zaitcev
On Thu, 23 Nov 2006 09:06:41 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote: > On Wed, 2006-11-22 at 16:46 -0800, Pete Zaitcev wrote: > > I'm thinking if I should add a "force O_NONBLOCK" flag somehow, > > in case someone wants to flush all events. If you find an application > > which can make an in

Re: [linux-usb-devel] usbmon, next round

2006-11-23 Thread Pete Zaitcev
On Thu, 23 Nov 2006 11:32:26 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > Is there any thought toward implementing some sort of packet-filtering > capability? I think it wouldn't be a bad idea, especially since we (I and Paolo) were unable to create a zero-copy path. But I just don't hav

Re: [linux-usb-devel] usbmon, next round

2006-11-23 Thread Alan Stern
On Wed, 22 Nov 2006, Pete Zaitcev wrote: > On Wed, 22 Nov 2006 22:00:32 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> > wrote: > > On Wed, 22 Nov 2006, Pete Zaitcev wrote: > > > Don't feel any need to reply or explain -- this is meant mainly to > > illustrate that eavesdropping sometimes doesn't p

Re: [linux-usb-devel] usbmon, next round

2006-11-23 Thread Paolo Abeni
On Wed, 2006-11-22 at 16:46 -0800, Pete Zaitcev wrote: > I'm thinking if I should add a "force O_NONBLOCK" flag somehow, > in case someone wants to flush all events. If you find an application > which can make an intelligent use of it, please let me know. At least in libpcap this should be useful.

Re: [linux-usb-devel] usbmon, next round

2006-11-22 Thread Pete Zaitcev
On Wed, 22 Nov 2006 22:00:32 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > On Wed, 22 Nov 2006, Pete Zaitcev wrote: > Don't feel any need to reply or explain -- this is meant mainly to > illustrate that eavesdropping sometimes doesn't provide much useful > information... I'll be brief, I k

Re: [linux-usb-devel] usbmon, next round

2006-11-22 Thread Alan Stern
On Wed, 22 Nov 2006, Pete Zaitcev wrote: > On Wed, 22 Nov 2006 11:45:52 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote: > > BTW, I'm putting the cc: back. See, Marcel already replied. We ought > to keep people in the loop. Although generally others are interested > in patches only, it's good to hav

Re: [linux-usb-devel] usbmon, next round

2006-11-22 Thread Pete Zaitcev
On Wed, 22 Nov 2006 11:45:52 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote: BTW, I'm putting the cc: back. See, Marcel already replied. We ought to keep people in the loop. Although generally others are interested in patches only, it's good to have a record of the design process. > One possible so

Re: [linux-usb-devel] usbmon, next round

2006-11-22 Thread Marcel Holtmann
Hi Pete, > Here's what I have right now. It pretty much takes shape, only mmap is > remaining to be done. I'm basically going to copy your code there, only > change it from 4-space to 1-tab formatting. you don't have by any chance a version that applies cleanly against the latest 2.6.19-rc tree f