Re: [linux-usb-devel] USB statistics
On Mon, 14 Nov 2005, Aras Vaichas wrote: I think they meant raw = bit errors, net = data did not arrive at all (within some timeout period). Bit errors would be reported somewhere and other errors would be handle by my test application at the highest level. The test department want to be able to zap the USB cable/plugs/sockets with a high voltage surge and then be able to see how the system copes with electrical discharges in the form of error statistics. These statistics then form the test results for the ESD immunity documentation. Something like that. Bit errors (actually packet or protocol errors) are not currently recorded anywhere, although they could be. Net errors would have to be determined by your test program, not by the kernel. Too true. I prefer to report that the data was either a) sent, b) not sent within a certain time. Much easier to perform from a shell script. Thank you for the thorough answers. It has helped greatly. You're welcome. Alan Stern --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] USB statistics
Greg KH wrote: On Fri, Nov 11, 2005 at 03:14:02PM +1100, Aras Vaichas wrote: Hi, my test department tells me that they need to perform immunity tests on the hardware and therefore I will need to collect statistics on the USB data being transferred. What is immunity tests? ESD (ElectroStatic Discharge) immunity tests which we apparantly need for the European market. Sorry, I wasn't very specific. Basically we need to zap the device and see if either: a) nothing happens, b) it registers a glitch but keeps working, c) the system reboots and recovers, or d) the system catches fire. regards, Aras --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] USB statistics
David Brownell wrote: On Thursday 10 November 2005 8:14 pm, Aras Vaichas wrote: *(h) For production testing, we would want to send a fixed amount of data, and check the raw and net error rates. Can you please add a 'raw and net bit error count' monitoring output. This will allow monitoring of the errors on a second by second basis Nope. - Dave haha, don't worry *I* wasn't asking, that was what my test department were asking *me* to do! Thanks for the good answers, my test department were basically treating the USB connection like good old RS-232 serial and were applying the same sort of test regime to it. I had a talk to them and they have relaxed their requirements a little after I sent them this little quote: section 8.7 of the USB2.0 spec (a 650 page document): 8.7 Error Detection and Recovery The USB permits reliable end-to-end communication in the presence of errors on the physical signaling layer. This includes the ability to reliably detect the vast majority of possible errors and to recover from errors on a transaction-type basis. Control transactions, for example, require a high degree of data reliability; they support end-to-end data integrity using error detection and retry. regards, Aras Vaichas --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] USB statistics
Alan Stern wrote: On Fri, 11 Nov 2005, Aras Vaichas wrote: Hi, my test department tells me that they need to perform immunity tests on the hardware and therefore I will need to collect statistics on the USB data being transferred. ... SNIP ... *(h) For production testing, we would want to send a fixed amount of data, and check the raw and net error rates. Send the data where? Do you have a fixed testing device in mind? The embedded board we are building has a 1x USB device port and 2x USB host ports. I use a USB A-to-B cable to use it to test itself. Can you please add a 'raw and net bit error count' monitoring output. This will allow monitoring of the errors on a second by second basis I don't understand the difference between raw and net errors. And like I said, bit error counts are not available, only packet errors. And not all of those. I think they meant raw = bit errors, net = data did not arrive at all (within some timeout period). Bit errors would be reported somewhere and other errors would be handle by my test application at the highest level. The test department want to be able to zap the USB cable/plugs/sockets with a high voltage surge and then be able to see how the system copes with electrical discharges in the form of error statistics. These statistics then form the test results for the ESD immunity documentation. Something like that. It's not always clear which category an event should fall into. If a data transfer is refused and delayed because the peripheral device isn't ready, should that count as an error, a error that was retried, or a success? Too true. I prefer to report that the data was either a) sent, b) not sent within a certain time. Much easier to perform from a shell script. Thank you for the thorough answers. It has helped greatly. regards, Aras Vaichas --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] USB statistics
On Fri, Nov 11, 2005 at 03:14:02PM +1100, Aras Vaichas wrote: Hi, my test department tells me that they need to perform immunity tests on the hardware and therefore I will need to collect statistics on the USB data being transferred. What is immunity tests? Can this be done? Do the USB drivers export these sorts of statistics to /sys like ethernet does? Here is the request from my test department: --- SNIP --- 1. Check that data can be transferred in and out of each port at the rate specified by the interface spec. 2. Monitor the data transfer to check if: (a) data is transferred with no errors; (b) data is transferred with errors, but then data is re-sent successfully; (c) data is lost. Monitoring should include: ... (iii) raw and net bit error rates ... *(vii) operation of the device reset detect bit of circuitry on the device port, and detection of that by the host. (g) For immunity testing, we would require the test to run continuously, but be able to identify errors within one second of their occurrence. *(h) For production testing, we would want to send a fixed amount of data, and check the raw and net error rates. Can you please add a 'raw and net bit error count' monitoring output. This will allow monitoring of the errors on a second by second basis --- SNAP --- No, for USB this information is not all availble, sorry. But you can buy some nice hardware analizers that will capture all of this information and save it for you if you wish. Good luck, greg k-h --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] USB statistics
On Thursday 10 November 2005 8:14 pm, Aras Vaichas wrote: 2. Monitor the data transfer to check if: (a) data is transferred with no errors; (b) data is transferred with errors, but then data is re-sent successfully; (c) data is lost. For (a) plus the re-sent part of (b), that's basic integrity testing that's hidden from userspace ... as a rule, it's implemented by host side USB controller hardware, not visible even to the kernel. You could modify some of the HCDs to notice whether re-sends were needed. As for (c), that would as a rule be a driver error. You omitted the obvious case where data could _not_ be successfully transferred, and that was reported properly to the driver. Monitoring should include: ... (iii) raw and net bit error rates See above ... ... *(vii) operation of the device reset detect bit of circuitry on the device port, and detection of that by the host. With CONFIG_USB_DEBUG you'll at least get syslog messages when devices are reset. You could filter out the ones related to the root hub ports. (g) For immunity testing, we would require the test to run continuously, but be able to identify errors within one second of their occurrence. What's immunity testing, and how is it different from normal stress testing? *(h) For production testing, we would want to send a fixed amount of data, and check the raw and net error rates. Can you please add a 'raw and net bit error count' monitoring output. This will allow monitoring of the errors on a second by second basis Nope. - Dave --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] USB statistics
On Fri, 11 Nov 2005, Aras Vaichas wrote: Hi, my test department tells me that they need to perform immunity tests on the hardware and therefore I will need to collect statistics on the USB data being transferred. Can this be done? Do the USB drivers export these sorts of statistics to /sys like ethernet does? They do not, although some statistics could always be added. Here is the request from my test department: My impression is that these requirements are not very well thought out. USB is not like Ethernet, and metrics that are appropriate for one are not appropriate for the other. For instance, unlike Ethernet, USB has upper- and lower-level drivers. With Ethernet this division isn't necessary, because all devices attached to an ethernet are network interfaces. With USB, many different kinds of devices can be attached to a bus. So are you interested in the low-level statistics or the high-level statistics? Or both? --- SNIP --- 1. Check that data can be transferred in and out of each port at the rate specified by the interface spec. There is no fixed data rate in the interface spec. The formulas include fudge factors to allow for system- and implementation-specific delays, and in any case the data rate will depend on the speed of the device you are communicating with. I have never seen an example where data could be transferred at the theoretical maximum rate. It's pretty safe to assume that you won't either. 2. Monitor the data transfer to check if: (a) data is transferred with no errors; (b) data is transferred with errors, but then data is re-sent successfully; (c) data is lost. Here you will get different numbers depending on whether you measure the low-level transfers or the upper-level transfers. For example, if an error occurs at the low level and the transfer is retried, at the upper level the transfer will appear to have succeeded. In addition, with some types of transfer (Isochronous) USB provides no way at all to tell whether a transfer succeeded. Monitoring should include: ... (iii) raw and net bit error rates Again, error rates depend on where you measure them. Also, USB does not detect individual bit errors. Data is transferred in packets, and errors anywhere in a packet will cause the entire transfer to fail. ... *(vii) operation of the device reset detect bit of circuitry on the device port, and detection of that by the host. What is the device reset detect bit? How is the host supposed to tell when a device has been reset? (g) For immunity testing, we would require the test to run continuously, but be able to identify errors within one second of their occurrence. That's a function of your test program, not of the kernel's statistical reporting. *(h) For production testing, we would want to send a fixed amount of data, and check the raw and net error rates. Send the data where? Do you have a fixed testing device in mind? Can you please add a 'raw and net bit error count' monitoring output. This will allow monitoring of the errors on a second by second basis I don't understand the difference between raw and net errors. And like I said, bit error counts are not available, only packet errors. And not all of those. It's not always clear which category an event should fall into. If a data transfer is refused and delayed because the peripheral device isn't ready, should that count as an error, a error that was retried, or a success? Alan Stern --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel