LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<devicetree@vger.kernel.org>
Cc: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
Subject: [PATCH net-next v4 0/3] Linn Ethernet Packet Sniffer driver
Date: Tue, 24 Feb 2015 16:48:08 +0000 [thread overview]
Message-ID: <cover.1424796018.git.stathis.voukelatos@linn.co.uk> (raw)
This patch adds support for the Ethernet Packet Sniffer H/W module
developed by Linn Products Ltd and found in the IMG Pistachio SoC.
The module allows Ethernet packets to be parsed, matched against
a user-defined pattern and timestamped. It sits between a 100M
Ethernet MAC and PHY and is completely passive with respect to
Ethernet frames.
Selected packet bytes from matched packets and timestamp values are
returned through a H/W FIFO. Timestamps are provided to the module
through an externally generated Gray-encoded counter.
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.
The driver consists of two modules:
- Core: it provides a common framework for managing backend packet
sniffer implementations. Each backend channel is registered
by the core as a netdev, which can be accessed from user
space through AF_PACKET sockets.
- Ethernet Packet Sniffer backend: provides the driver for the
Linn Ethernet Packet Sniffer H/W modules.
The split between a core and backend modules allows for other
implementations to be added in the future apart of the Ethernet
packet sniffer presented in this patch set.
Changelog:
v4:
* More detailed documentation on driver usage (in snf_core.c) and
H/W operation (in platform.c)
* Some source file renaming in the core module.
* Rebased against linux-net-next
v3:
* Code moved into vendor specific directory
* Device tree binding updated and streamlined. Cyclecounter params
are now calculated dynamically.
v2:
* Complete redesign of core framework to use netdev instead of
the generic netlink framework
* Updated device tree binding
* A number of minor code improvements suggested by code review
Stathis Voukelatos (3):
Linn Ethernet packet sniffer: device tree binding and vendor prefix
Linn packet sniffer core framework
Linn Ethernet packet sniffer driver
.../bindings/net/linn-ether-packet-sniffer.txt | 39 ++
.../devicetree/bindings/vendor-prefixes.txt | 1 +
MAINTAINERS | 6 +
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/linn/Kconfig | 36 ++
drivers/net/ethernet/linn/Makefile | 20 +
.../linn/pkt-sniffer/backends/ether/Makefile | 20 +
.../linn/pkt-sniffer/backends/ether/channel.c | 444 +++++++++++++++++++++
.../linn/pkt-sniffer/backends/ether/channel.h | 80 ++++
.../ethernet/linn/pkt-sniffer/backends/ether/hw.h | 46 +++
.../linn/pkt-sniffer/backends/ether/platform.c | 318 +++++++++++++++
.../net/ethernet/linn/pkt-sniffer/core/Makefile | 19 +
.../net/ethernet/linn/pkt-sniffer/core/snf_core.c | 344 ++++++++++++++++
.../net/ethernet/linn/pkt-sniffer/core/snf_core.h | 60 +++
15 files changed, 1435 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/linn-ether-packet-sniffer.txt
create mode 100644 drivers/net/ethernet/linn/Kconfig
create mode 100644 drivers/net/ethernet/linn/Makefile
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/backends/ether/Makefile
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/backends/ether/channel.c
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/backends/ether/channel.h
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/backends/ether/hw.h
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/backends/ether/platform.c
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/core/Makefile
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/core/snf_core.c
create mode 100644 drivers/net/ethernet/linn/pkt-sniffer/core/snf_core.h
--
1.9.1
next reply other threads:[~2015-02-24 16:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 16:48 Stathis Voukelatos [this message]
2015-02-24 16:48 ` [PATCH net-next v4 1/3] Linn Ethernet packet sniffer: device tree binding and vendor prefix Stathis Voukelatos
2015-02-24 16:48 ` [PATCH net-next v4 2/3] Linn packet sniffer core framework Stathis Voukelatos
2015-02-24 16:48 ` [PATCH net-next v4 3/3] Linn Ethernet packet sniffer driver Stathis Voukelatos
2015-02-25 15:19 ` [PATCH net-next v4 0/3] Linn Ethernet Packet Sniffer driver Richard Cochran
2015-02-25 17:01 ` Richard Cochran
2015-02-25 17:12 ` Stathis Voukelatos
2015-02-25 17:30 ` Richard Cochran
2015-02-27 17:22 ` Stathis Voukelatos
[not found] ` <54F0A4C4.3020407@linn.co.uk>
2015-02-27 18:14 ` Richard Cochran
2015-03-06 13:45 ` Stathis Voukelatos
2015-03-06 15:24 ` Richard Cochran
[not found] ` <54F98660.5070805@linn.co.uk>
2015-03-06 15:22 ` Richard Cochran
2015-03-11 11:20 ` Stathis Voukelatos
2015-03-11 15:03 ` 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=cover.1424796018.git.stathis.voukelatos@linn.co.uk \
--to=stathis.voukelatos@linn.co.uk \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--subject='Re: [PATCH net-next v4 0/3] Linn Ethernet Packet Sniffer driver' \
/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).