LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"abrestic@chromium.org" <abrestic@chromium.org>,
	f.fainelli@gmail.com
Subject: Re: [PATCH] net: Linn Ethernet Packet Sniffer driver
Date: Tue, 27 Jan 2015 15:46:53 +0100	[thread overview]
Message-ID: <54C7A4DD.7030109@redhat.com> (raw)
In-Reply-To: <54C7736C.8090704@linn.co.uk>

Hi Stathis,

On 01/27/2015 12:15 PM, Stathis Voukelatos wrote:
> On 26/01/15 10:10, Daniel Borkmann wrote:
>>> Hello Daniel. Thank you for your feedback.
>>> Packet sockets could also be used for the driver interface to
>>> user space, however I think that both approaches would require the same
>>> amount of maintenance. We need to maintain a protocol consisting of
>>> a set of messages or commands that user space can use to communicate
>>> with the driver in order to configure the H/W and retrieve results.
>>> We could use packet sockets to send those messages  too, but I thought
>>> netlink already provides a message exchange framework that we could
>>> make use of.
>>
>> When using packet sockets and your driver as a backend feeding them,
>> users can see that there's an extra capturing/monitoring netdev present,
>> all libpcap-based tools such as tcpdump et al would work out of the box
>> w/o adapting any code, and as an admin you can also see what users/tools
>> are making of use of the device through packet sockets. I couldn't parse
>> the exact motivation from the commit message of why avoiding all this is
>> better?
>
> Just wanted to clarify some implementation details for your approach.
> - The driver would need to create and register two net_device instances.
> One for sniffing Ethernet TX packets and one for RX.

Hm, I would represent the whole device as a single monitoring-only netdev.
I'm somehow still missing the big advantage of all this as compared to
using packet sockets on the normal netdev? I couldn't parse that from your
commit message.

> - Would the control interface for the sniffer in that case need to be
> through private socket ioctls (ie SIOCDEVPRIVATE + x ioctl ids)?

Nope, please have a look at Documentation/networking/packet_mmap.txt.

  reply	other threads:[~2015-01-27 14:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 10:07 Stathis Voukelatos
2015-01-23 10:21 ` Arnd Bergmann
2015-01-26 11:23   ` Stathis Voukelatos
2015-01-23 10:51 ` Mark Rutland
2015-01-26 10:16   ` Stathis Voukelatos
2015-01-27 10:53     ` Mark Rutland
2015-01-23 11:20 ` Daniel Borkmann
2015-01-26  9:49   ` Stathis Voukelatos
2015-01-26 10:10     ` Daniel Borkmann
2015-01-27 11:15       ` Stathis Voukelatos
2015-01-27 14:46         ` Daniel Borkmann [this message]
2015-01-27 17:22           ` Stathis Voukelatos
2015-01-23 18:12 ` James Hogan
2015-01-26 11:05   ` Stathis Voukelatos
2015-01-24 21:37 ` Joe Perches
2015-01-26 11:11   ` Stathis Voukelatos
2015-01-26 19:39     ` Joe Perches
2015-01-27  9:52       ` Stathis Voukelatos
2015-01-26 22:30 ` Florian Fainelli
2015-01-27 10:51   ` Stathis Voukelatos

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=54C7A4DD.7030109@redhat.com \
    --to=dborkman@redhat.com \
    --cc=abrestic@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stathis.voukelatos@linn.co.uk \
    --subject='Re: [PATCH] net: 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).