lkml.org 
[lkml]   [2015]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] Packet sniffer core framework
Hi Daniel,

On 18/02/15 15:42, Daniel Borkmann wrote:
>
> 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.
>

Yes, it is not necessarilly expected to be used by other 3rd party
drivers. The reason of splitting out the framework code is to account of
the fact the we may develop in the future othersimilar sniffer H/W for
non-ethernet interfaces (eg. wifi).
I can move the code under drivers/net/ethernet/linn as you mention
below, although that may not account for non-ethernet backends in the
future.

> 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?
>

Yes, this point can be slightly confusing. A write to a packet socket
bound to the interface is done to supply the command string to the
sniffer H/W, while reads would return matched packet bytes + timestamps
(throuch cmsg). Is there any other way to supply the command string
except of a proprietary ioctl?

> 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/).
>

Answered above.

> 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?

I can remove that. The header file only contains the list of commands.
They can be documented. The driver does use the existing timestamping
infrastructure to return timestamps to user space.

Thank you,
Stathis


\
 
 \ /
  Last update: 2015-02-18 18:01    [W:0.067 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site