All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
To: Richard Cochran <richardcochran@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<netdev@vger.kernel.org>, <abrestic@chromium.org>
Subject: Re: [PATCH v2 0/3] net: Linn Ethernet Packet Sniffer driver
Date: Mon, 23 Feb 2015 09:37:24 +0000	[thread overview]
Message-ID: <54EAF4D4.4090505@linn.co.uk> (raw)
In-Reply-To: <20150218210830.GA7778@localhost.localdomain>

Hi Richard,

On 18/02/15 21:08, Richard Cochran wrote:
> On Tue, Feb 17, 2015 at 02:03:30PM +0000, Stathis Voukelatos wrote:
>> The command string for packet matching is stored in module RAM
>> and consists of a sequence of 16-bit entries. Each entry includes
>> an 8-bit command code and and 8-bit data value. Valid command
>> codes are:
>> 0 - Don't care
>> 1 - Match: packet data must match command string byte
>> 2 - Copy: packet data will be copied to FIFO
>> 3 - Match/Stamp: if packet data matches string byte, a timestamp
>>                   is copied into the FIFO
>> 4 - Copy/Done: packet data will be copied into the FIFO.
>>                 This command terminates the command string.
>
> Why do you need to expose this interface to user space at all?  Why
> not just time stamp every frame?

To put this into context with an example, the use case this H/W module 
was originally developed for was to allow multiple audio receivers to 
synchronize with a single transmitter, eg. multi-room synchronised audio.
The interface needs to be public so that a user-space application can 
program a command string that will match packets that belong to the 
audio stream of interest, for this example.
In addition returning just a timestamp would not be enough in many 
cases. In the audio streaming use case mentioned above some additional
bytes from the packet payload need to be returned (with Copy commands) 
in order to associate the timestamp with a certain point in the audio 
stream.

>
> How does the "Match" command work?  The frame must have one particular
> byte?  That can't be right.  Please explain.

Actually, that is how the H/W works. Each Match command is followed by
a data value which must match the packet data byte at the corresponding
location. If there is no match processing of the packet stops.

>
> Thanks,
> Richard
>

Thank you,
Stathis

WARNING: multiple messages have this Message-ID (diff)
From: Stathis Voukelatos <stathis.voukelatos-zgcZaY4qg+21Qrn1Bg8BZw@public.gmane.org>
To: Richard Cochran <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH v2 0/3] net: Linn Ethernet Packet Sniffer driver
Date: Mon, 23 Feb 2015 09:37:24 +0000	[thread overview]
Message-ID: <54EAF4D4.4090505@linn.co.uk> (raw)
In-Reply-To: <20150218210830.GA7778-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Hi Richard,

On 18/02/15 21:08, Richard Cochran wrote:
> On Tue, Feb 17, 2015 at 02:03:30PM +0000, Stathis Voukelatos wrote:
>> The command string for packet matching is stored in module RAM
>> and consists of a sequence of 16-bit entries. Each entry includes
>> an 8-bit command code and and 8-bit data value. Valid command
>> codes are:
>> 0 - Don't care
>> 1 - Match: packet data must match command string byte
>> 2 - Copy: packet data will be copied to FIFO
>> 3 - Match/Stamp: if packet data matches string byte, a timestamp
>>                   is copied into the FIFO
>> 4 - Copy/Done: packet data will be copied into the FIFO.
>>                 This command terminates the command string.
>
> Why do you need to expose this interface to user space at all?  Why
> not just time stamp every frame?

To put this into context with an example, the use case this H/W module 
was originally developed for was to allow multiple audio receivers to 
synchronize with a single transmitter, eg. multi-room synchronised audio.
The interface needs to be public so that a user-space application can 
program a command string that will match packets that belong to the 
audio stream of interest, for this example.
In addition returning just a timestamp would not be enough in many 
cases. In the audio streaming use case mentioned above some additional
bytes from the packet payload need to be returned (with Copy commands) 
in order to associate the timestamp with a certain point in the audio 
stream.

>
> How does the "Match" command work?  The frame must have one particular
> byte?  That can't be right.  Please explain.

Actually, that is how the H/W works. Each Match command is followed by
a data value which must match the packet data byte at the corresponding
location. If there is no match processing of the packet stops.

>
> Thanks,
> Richard
>

Thank you,
Stathis
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Stathis Voukelatos <stathis.voukelatos-zgcZaY4qg+21Qrn1Bg8BZw@public.gmane.org>
To: Richard Cochran <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: Re: [PATCH v2 0/3] net: Linn Ethernet Packet Sniffer driver
Date: Mon, 23 Feb 2015 09:37:24 +0000	[thread overview]
Message-ID: <54EAF4D4.4090505@linn.co.uk> (raw)
In-Reply-To: <20150218210830.GA7778-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Hi Richard,

On 18/02/15 21:08, Richard Cochran wrote:
> On Tue, Feb 17, 2015 at 02:03:30PM +0000, Stathis Voukelatos wrote:
>> The command string for packet matching is stored in module RAM
>> and consists of a sequence of 16-bit entries. Each entry includes
>> an 8-bit command code and and 8-bit data value. Valid command
>> codes are:
>> 0 - Don't care
>> 1 - Match: packet data must match command string byte
>> 2 - Copy: packet data will be copied to FIFO
>> 3 - Match/Stamp: if packet data matches string byte, a timestamp
>>                   is copied into the FIFO
>> 4 - Copy/Done: packet data will be copied into the FIFO.
>>                 This command terminates the command string.
>
> Why do you need to expose this interface to user space at all?  Why
> not just time stamp every frame?

To put this into context with an example, the use case this H/W module 
was originally developed for was to allow multiple audio receivers to 
synchronize with a single transmitter, eg. multi-room synchronised audio.
The interface needs to be public so that a user-space application can 
program a command string that will match packets that belong to the 
audio stream of interest, for this example.
In addition returning just a timestamp would not be enough in many 
cases. In the audio streaming use case mentioned above some additional
bytes from the packet payload need to be returned (with Copy commands) 
in order to associate the timestamp with a certain point in the audio 
stream.

>
> How does the "Match" command work?  The frame must have one particular
> byte?  That can't be right.  Please explain.

Actually, that is how the H/W works. Each Match command is followed by
a data value which must match the packet data byte at the corresponding
location. If there is no match processing of the packet stops.

>
> Thanks,
> Richard
>

Thank you,
Stathis
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-02-23  9:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 14:03 [PATCH v2 0/3] net: Linn Ethernet Packet Sniffer driver Stathis Voukelatos
2015-02-17 14:03 ` Stathis Voukelatos
2015-02-17 14:03 ` Stathis Voukelatos
2015-02-17 14:03 ` [PATCH v2 1/3] Ethernet packet sniffer: Device tree binding and vendor prefix Stathis Voukelatos
2015-02-17 14:03   ` Stathis Voukelatos
2015-02-17 14:16   ` Sergei Shtylyov
2015-02-17 14:51   ` Mark Rutland
2015-02-17 16:22     ` Stathis Voukelatos
2015-02-17 16:35       ` Mark Rutland
2015-02-17 17:13         ` Stathis Voukelatos
2015-02-17 17:13           ` Stathis Voukelatos
2015-02-17 17:30           ` Mark Rutland
2015-02-18  9:40             ` Stathis Voukelatos
2015-02-18 12:11               ` Mark Rutland
2015-02-18 13:56                 ` Stathis Voukelatos
2015-02-18 13:56                   ` Stathis Voukelatos
2015-02-17 14:03 ` [PATCH v2 2/3] Packet sniffer core framework Stathis Voukelatos
2015-02-17 14:03   ` Stathis Voukelatos
2015-02-18 15:42   ` Daniel Borkmann
2015-02-18 16:44     ` Stathis Voukelatos
2015-02-18 16:44       ` Stathis Voukelatos
2015-02-18 16:44       ` Stathis Voukelatos
2015-02-17 14:03 ` [PATCH v2 3/3] Linn Ethernet packet sniffer driver Stathis Voukelatos
2015-02-17 14:03   ` Stathis Voukelatos
2015-02-17 14:03   ` Stathis Voukelatos
2015-02-18 21:08 ` [PATCH v2 0/3] net: Linn Ethernet Packet Sniffer driver Richard Cochran
2015-02-18 21:08   ` Richard Cochran
2015-02-23  9:37   ` Stathis Voukelatos [this message]
2015-02-23  9:37     ` Stathis Voukelatos
2015-02-23  9:37     ` Stathis Voukelatos
2015-02-25  9:50     ` Richard Cochran
2015-02-25 10:53       ` Stathis Voukelatos
2015-02-25 10:53         ` Stathis Voukelatos
2015-02-25 14:21         ` Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54EAF4D4.4090505@linn.co.uk \
    --to=stathis.voukelatos@linn.co.uk \
    --cc=abrestic@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.