All of lore.kernel.org
 help / color / mirror / Atom feed
* USB CDC performance test
@ 2022-03-04 10:57 Mithran B
  2022-03-04 14:18 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Mithran B @ 2022-03-04 10:57 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 330 bytes --]

Hello,

In Host and Gadget systems, enabled the USB CDC drivers.
Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
Then opened the nodes and write and read back the data.
It is working.

I want to test the performance of this interface and drivers.
Do we have any utility for this?
How to do the performance test?

-Thanks.

[-- Attachment #1.2: Type: text/html, Size: 480 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-04 10:57 USB CDC performance test Mithran B
@ 2022-03-04 14:18 ` Greg KH
  2022-03-04 14:36   ` Mithran B
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2022-03-04 14:18 UTC (permalink / raw)
  To: Mithran B; +Cc: kernelnewbies

On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
> Hello,
> 
> In Host and Gadget systems, enabled the USB CDC drivers.
> Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
> Then opened the nodes and write and read back the data.
> It is working.
> 
> I want to test the performance of this interface and drivers.
> Do we have any utility for this?
> How to do the performance test?

What exactly do you want to measure?  Determine that first before trying
to find a test for that.  Without knowing what you want to measure, it's
hard to tell you how to measure it :)

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-04 14:18 ` Greg KH
@ 2022-03-04 14:36   ` Mithran B
  2022-03-04 15:01     ` Greg KH
  2022-03-04 16:13     ` Jeffrey Walton
  0 siblings, 2 replies; 8+ messages in thread
From: Mithran B @ 2022-03-04 14:36 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

On Fri, 4 Mar 2022 at 19:48, Greg KH <greg@kroah.com> wrote:

> On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
> > Hello,
> >
> > In Host and Gadget systems, enabled the USB CDC drivers.
> > Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
> > Then opened the nodes and write and read back the data.
> > It is working.
> >
> > I want to test the performance of this interface and drivers.
> > Do we have any utility for this?
> > How to do the performance test?
>
> What exactly do you want to measure?  Determine that first before trying
> to find a test for that.  Without knowing what you want to measure, it's
> hard to tell you how to measure it :)
>
> good luck!
>
> greg k-h
>

Thank you.
I want to send the data at the rate of 5mbps from Host device to target
device using USB CDC - ACM.
In termios functions, how to configure this 5mbps as baud rate and USB
payload size, i.e. packet
size to be in 2K bytes.

How to achieve this?

-Thanks.

[-- Attachment #1.2: Type: text/html, Size: 1506 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-04 14:36   ` Mithran B
@ 2022-03-04 15:01     ` Greg KH
  2022-03-07  7:38       ` Mithran B
  2022-03-04 16:13     ` Jeffrey Walton
  1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2022-03-04 15:01 UTC (permalink / raw)
  To: Mithran B; +Cc: kernelnewbies

On Fri, Mar 04, 2022 at 08:06:55PM +0530, Mithran B wrote:
> On Fri, 4 Mar 2022 at 19:48, Greg KH <greg@kroah.com> wrote:
> 
> > On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
> > > Hello,
> > >
> > > In Host and Gadget systems, enabled the USB CDC drivers.
> > > Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
> > > Then opened the nodes and write and read back the data.
> > > It is working.
> > >
> > > I want to test the performance of this interface and drivers.
> > > Do we have any utility for this?
> > > How to do the performance test?
> >
> > What exactly do you want to measure?  Determine that first before trying
> > to find a test for that.  Without knowing what you want to measure, it's
> > hard to tell you how to measure it :)
> >
> > good luck!
> >
> > greg k-h
> >
> 
> Thank you.
> I want to send the data at the rate of 5mbps from Host device to target
> device using USB CDC - ACM.
> In termios functions, how to configure this 5mbps as baud rate and USB
> payload size, i.e. packet
> size to be in 2K bytes.

There is no "baud rate" for usb cdc devices, really, as you have tried
this already, right?

Just send the data as fast as you can, with the largest chunks of data
that you have (do not send it byte by byte to the kernel), and you
should be fine.

Are you sure that your device can handle that type of data rate?  That's
almost always the limiting factor.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-04 14:36   ` Mithran B
  2022-03-04 15:01     ` Greg KH
@ 2022-03-04 16:13     ` Jeffrey Walton
  1 sibling, 0 replies; 8+ messages in thread
From: Jeffrey Walton @ 2022-03-04 16:13 UTC (permalink / raw)
  To: Mithran B; +Cc: kernelnewbies

On Fri, Mar 4, 2022 at 9:37 AM Mithran B <mithranb22@gmail.com> wrote:
>
> On Fri, 4 Mar 2022 at 19:48, Greg KH <greg@kroah.com> wrote:
>>
>> On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
>> > Hello,
>> >
>> > In Host and Gadget systems, enabled the USB CDC drivers.
>> > Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
>> > Then opened the nodes and write and read back the data.
>> > It is working.
>> >
>> > I want to test the performance of this interface and drivers.
>> > Do we have any utility for this?
>> > How to do the performance test?
>>
>> What exactly do you want to measure?  Determine that first before trying
>> to find a test for that.  Without knowing what you want to measure, it's
>> hard to tell you how to measure it :)
>>
> I want to send the data at the rate of 5mbps from Host device to target device using USB CDC - ACM.
> In termios functions, how to configure this 5mbps as baud rate and USB payload size, i.e. packet
> size to be in 2K bytes.
>
> How to achieve this?

It seems like dd with a sync could be a good choice. You need the sync
to ensure the writes are flushed.

Maybe something like:

    $ su -
    <password>
    # dd if=/dev/zero of=<dev> bs=512 count=1M && sync

Also see the dd(1) man page.

Jeff

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-04 15:01     ` Greg KH
@ 2022-03-07  7:38       ` Mithran B
  2022-03-07  7:50         ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Mithran B @ 2022-03-07  7:38 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1830 bytes --]

On Fri, 4 Mar 2022 at 20:31, Greg KH <greg@kroah.com> wrote:

> On Fri, Mar 04, 2022 at 08:06:55PM +0530, Mithran B wrote:
> > On Fri, 4 Mar 2022 at 19:48, Greg KH <greg@kroah.com> wrote:
> >
> > > On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
> > > > Hello,
> > > >
> > > > In Host and Gadget systems, enabled the USB CDC drivers.
> > > > Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
> > > > Then opened the nodes and write and read back the data.
> > > > It is working.
> > > >
> > > > I want to test the performance of this interface and drivers.
> > > > Do we have any utility for this?
> > > > How to do the performance test?
> > >
> > > What exactly do you want to measure?  Determine that first before
> trying
> > > to find a test for that.  Without knowing what you want to measure,
> it's
> > > hard to tell you how to measure it :)
> > >
> > > good luck!
> > >
> > > greg k-h
> > >
> >
> > Thank you.
> > I want to send the data at the rate of 5mbps from Host device to target
> > device using USB CDC - ACM.
> > In termios functions, how to configure this 5mbps as baud rate and USB
> > payload size, i.e. packet
> > size to be in 2K bytes.
>
> There is no "baud rate" for usb cdc devices, really, as you have tried
> this already, right?
>
> Just send the data as fast as you can, with the largest chunks of data
> that you have (do not send it byte by byte to the kernel), and you
> should be fine.
>
> Are you sure that your device can handle that type of data rate?  That's
> almost always the limiting factor.
>
> good luck!
>
> greg k-h
>

In USB CDC, any software flow control mechanism is implemented?
Any hardware flow control mechanism there?
How to enable this software flow control mechanism in kernel device drivers?
Any other information related to this is good for us.

-Thanks.

[-- Attachment #1.2: Type: text/html, Size: 2605 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-07  7:38       ` Mithran B
@ 2022-03-07  7:50         ` Greg KH
  2022-03-07 13:41           ` Mithran B
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2022-03-07  7:50 UTC (permalink / raw)
  To: Mithran B; +Cc: kernelnewbies

On Mon, Mar 07, 2022 at 01:08:28PM +0530, Mithran B wrote:
> On Fri, 4 Mar 2022 at 20:31, Greg KH <greg@kroah.com> wrote:
> 
> > On Fri, Mar 04, 2022 at 08:06:55PM +0530, Mithran B wrote:
> > > On Fri, 4 Mar 2022 at 19:48, Greg KH <greg@kroah.com> wrote:
> > >
> > > > On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
> > > > > Hello,
> > > > >
> > > > > In Host and Gadget systems, enabled the USB CDC drivers.
> > > > > Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
> > > > > Then opened the nodes and write and read back the data.
> > > > > It is working.
> > > > >
> > > > > I want to test the performance of this interface and drivers.
> > > > > Do we have any utility for this?
> > > > > How to do the performance test?
> > > >
> > > > What exactly do you want to measure?  Determine that first before
> > trying
> > > > to find a test for that.  Without knowing what you want to measure,
> > it's
> > > > hard to tell you how to measure it :)
> > > >
> > > > good luck!
> > > >
> > > > greg k-h
> > > >
> > >
> > > Thank you.
> > > I want to send the data at the rate of 5mbps from Host device to target
> > > device using USB CDC - ACM.
> > > In termios functions, how to configure this 5mbps as baud rate and USB
> > > payload size, i.e. packet
> > > size to be in 2K bytes.
> >
> > There is no "baud rate" for usb cdc devices, really, as you have tried
> > this already, right?
> >
> > Just send the data as fast as you can, with the largest chunks of data
> > that you have (do not send it byte by byte to the kernel), and you
> > should be fine.
> >
> > Are you sure that your device can handle that type of data rate?  That's
> > almost always the limiting factor.
> >
> > good luck!
> >
> > greg k-h
> >
> 
> In USB CDC, any software flow control mechanism is implemented?

The specification is public on the usb.org web site, if you are curious.
There is no need for "flow control" like you are used to for older
serial connections with USB, the way USB works handles it automatically
(the host drives the connection, if the device is full, it tells the
host to wait automatically).

> Any hardware flow control mechanism there?

Other than the normal USB flow control mechanism?  No, why would there
be?

> How to enable this software flow control mechanism in kernel device drivers?

what software flow control?

> Any other information related to this is good for us.

For whom?  What exactly have you tried and what were the results?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: USB CDC performance test
  2022-03-07  7:50         ` Greg KH
@ 2022-03-07 13:41           ` Mithran B
  0 siblings, 0 replies; 8+ messages in thread
From: Mithran B @ 2022-03-07 13:41 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 2733 bytes --]

On Mon, 7 Mar 2022 at 13:20, Greg KH <greg@kroah.com> wrote:

> On Mon, Mar 07, 2022 at 01:08:28PM +0530, Mithran B wrote:
> > On Fri, 4 Mar 2022 at 20:31, Greg KH <greg@kroah.com> wrote:
> >
> > > On Fri, Mar 04, 2022 at 08:06:55PM +0530, Mithran B wrote:
> > > > On Fri, 4 Mar 2022 at 19:48, Greg KH <greg@kroah.com> wrote:
> > > >
> > > > > On Fri, Mar 04, 2022 at 04:27:50PM +0530, Mithran B wrote:
> > > > > > Hello,
> > > > > >
> > > > > > In Host and Gadget systems, enabled the USB CDC drivers.
> > > > > > Then nodes are created as /dev/ttyAcm0 and /dev/ttyGs0.
> > > > > > Then opened the nodes and write and read back the data.
> > > > > > It is working.
> > > > > >
> > > > > > I want to test the performance of this interface and drivers.
> > > > > > Do we have any utility for this?
> > > > > > How to do the performance test?
> > > > >
> > > > > What exactly do you want to measure?  Determine that first before
> > > trying
> > > > > to find a test for that.  Without knowing what you want to measure,
> > > it's
> > > > > hard to tell you how to measure it :)
> > > > >
> > > > > good luck!
> > > > >
> > > > > greg k-h
> > > > >
> > > >
> > > > Thank you.
> > > > I want to send the data at the rate of 5mbps from Host device to
> target
> > > > device using USB CDC - ACM.
> > > > In termios functions, how to configure this 5mbps as baud rate and
> USB
> > > > payload size, i.e. packet
> > > > size to be in 2K bytes.
> > >
> > > There is no "baud rate" for usb cdc devices, really, as you have tried
> > > this already, right?
> > >
> > > Just send the data as fast as you can, with the largest chunks of data
> > > that you have (do not send it byte by byte to the kernel), and you
> > > should be fine.
> > >
> > > Are you sure that your device can handle that type of data rate?
> That's
> > > almost always the limiting factor.
> > >
> > > good luck!
> > >
> > > greg k-h
> > >
> >
> > In USB CDC, any software flow control mechanism is implemented?
>
> The specification is public on the usb.org web site, if you are curious.
> There is no need for "flow control" like you are used to for older
> serial connections with USB, the way USB works handles it automatically
> (the host drives the connection, if the device is full, it tells the
> host to wait automatically).
>
> > Any hardware flow control mechanism there?
>
> Other than the normal USB flow control mechanism?  No, why would there
> be?
>
> > How to enable this software flow control mechanism in kernel device
> drivers?
>
> what software flow control?
>
> > Any other information related to this is good for us.
>
> For whom?  What exactly have you tried and what were the results?
>
> thanks,
>
> greg k-h
>

Thank you. I got the details.

[-- Attachment #1.2: Type: text/html, Size: 4015 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-07 13:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 10:57 USB CDC performance test Mithran B
2022-03-04 14:18 ` Greg KH
2022-03-04 14:36   ` Mithran B
2022-03-04 15:01     ` Greg KH
2022-03-07  7:38       ` Mithran B
2022-03-07  7:50         ` Greg KH
2022-03-07 13:41           ` Mithran B
2022-03-04 16:13     ` Jeffrey Walton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.