LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org
Cc: abrestic@chromium.org, richardcochran@gmail.com
Subject: Re: [PATCH v2 2/3] Packet sniffer core framework
Date: Wed, 18 Feb 2015 16:42:06 +0100	[thread overview]
Message-ID: <54E4B2CE.2090104@iogearbox.net> (raw)
In-Reply-To: <9202ff9a629935ada672415bf071a1cf31ac09b6.1424181053.git.stathis.voukelatos@linn.co.uk>

On 02/17/2015 03:03 PM, Stathis Voukelatos wrote:
> The framework registers each backend sniffer channel as a netdev,
> which can be accessed from user space through a raw packet socket.
> Packets received from user space are treated as a command string
> configuration. Each match event from the backend driver will
> generate a packet with the matching bytes plus an optional
> timestamp, if configured by the command string.
>
> Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
> ---
>   MAINTAINERS                             |   6 +
>   drivers/net/Kconfig                     |   2 +
>   drivers/net/Makefile                    |   2 +
>   drivers/net/pkt-sniffer/Kconfig         |   8 +
>   drivers/net/pkt-sniffer/Makefile        |   3 +
>   drivers/net/pkt-sniffer/core/module.c   |  37 +++++
>   drivers/net/pkt-sniffer/core/netdev.c   | 254 ++++++++++++++++++++++++++++++++
>   drivers/net/pkt-sniffer/core/snf_core.h |  60 ++++++++
>   include/uapi/linux/pkt_sniffer.h        |  33 +++++
>   9 files changed, 405 insertions(+)
>   create mode 100644 drivers/net/pkt-sniffer/Kconfig
>   create mode 100644 drivers/net/pkt-sniffer/Makefile
>   create mode 100644 drivers/net/pkt-sniffer/core/module.c
>   create mode 100644 drivers/net/pkt-sniffer/core/netdev.c
>   create mode 100644 drivers/net/pkt-sniffer/core/snf_core.h
>   create mode 100644 include/uapi/linux/pkt_sniffer.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index aaa039d..7d882de 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -5754,6 +5754,12 @@ M:	Sasha Levin <sasha.levin@oracle.com>
>   S:	Maintained
>   F:	tools/lib/lockdep/
>
> +LINN PACKET SNIFFER DRIVER
> +M: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
> +S: Maintained
> +F: drivers/net/pkt-sniffer/
> +F: Documentation/devicetree/bindings/net/linn-ether-packet-sniffer.txt

This whole framework really looks like only tailored to your specific
driver, I have no idea who else should reuse that?! So, I don't think
putting this under drivers/net/pkt-sniffer/ is a good idea.

Also it looks slightly confusing as if I understand you correctly, your
module's purpose is to pass down some "packet pattern" to the hardware
and match that in order to get a precise timestamp in return?

Might perhaps be better to have everything vendor-specific under something
like drivers/net/ethernet/linn/ and have the framework squashed into the
driver itself (if parts cannot be generalized in net/packet/).

It would be good if you can also avoid the extra uapi export. Perhaps
it's possible to reuse at least some of the existing timestamping
infrastructure?

  reply	other threads:[~2015-02-18 16:25 UTC|newest]

Thread overview: 20+ 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 ` [PATCH v2 1/3] Ethernet packet sniffer: Device tree binding and vendor prefix 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: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-17 14:03 ` [PATCH v2 2/3] Packet sniffer core framework Stathis Voukelatos
2015-02-18 15:42   ` Daniel Borkmann [this message]
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-18 21:08 ` [PATCH v2 0/3] net: Linn Ethernet Packet Sniffer driver Richard Cochran
2015-02-23  9:37   ` Stathis Voukelatos
2015-02-25  9:50     ` Richard Cochran
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=54E4B2CE.2090104@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=abrestic@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=stathis.voukelatos@linn.co.uk \
    --subject='Re: [PATCH v2 2/3] Packet sniffer core framework' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).