From: Daniel Borkmann <daniel@iogearbox.net>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
willemb@google.com, davem@davemloft.net, shuah@kernel.org
Subject: Re: [PATCH v3 net-next 1/2] tools: psock_lib: tighten conditions checked in sock_setfilter
Date: Wed, 04 Jan 2017 23:26:26 +0100 [thread overview]
Message-ID: <586D7692.4000604@iogearbox.net> (raw)
In-Reply-To: <20170104222224.GA31756@oracle.com>
On 01/04/2017 11:22 PM, Sowmini Varadhan wrote:
> On (01/04/17 23:16), Daniel Borkmann wrote:
>>
>> Just reading up on the thread, sorry to jump in late. Can't you just
>> use the generated code from bpf_asm (tools/net/) and add the asm program
>> as a comment above? Something like we do in net/core/ptp_classifier.c +13.
>
> I was actually using the example from the BSD bpf(4) man page,
> and expanding on that one..
> https://www.freebsd.org/cgi/man.cgi?query=bpf&sektion=4&manpath=FreeBSD+4.7-RELEASE
> (I could not find the equivalent linux man page).
>
> It was a lot easier to parse than the existing code .
cBPF with its tooling is all documented here:
Documentation/networking/filter.txt
>> As it stands it makes it a bit harder to parse / less readable with macros
>> actually. Rest seems fine, thanks.
>
> You think the earlier code was readable? I had to use
> gcc -E, with help from the bpf(4) page, to make sense of it.
>
> --Sowmini
>
>
next prev parent reply other threads:[~2017-01-04 22:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 18:45 [PATCH v3 net-next 0/2] tools: psock_tpacket bug fixes Sowmini Varadhan
2017-01-04 18:45 ` [PATCH v3 net-next 1/2] tools: psock_lib: tighten conditions checked in sock_setfilter Sowmini Varadhan
2017-01-04 22:16 ` Daniel Borkmann
2017-01-04 22:22 ` Sowmini Varadhan
2017-01-04 22:26 ` Daniel Borkmann [this message]
2017-01-04 22:48 ` Sowmini Varadhan
2017-01-04 22:59 ` Daniel Borkmann
2017-01-04 22:37 ` Shuah Khan
2017-01-04 22:49 ` Sowmini Varadhan
2017-01-04 22:55 ` Sowmini Varadhan
2017-01-04 23:26 ` Shuah Khan
2017-01-05 15:54 ` Sowmini Varadhan
2017-01-05 18:46 ` Shuah Khan
2017-01-04 18:45 ` [PATCH v3 net-next 2/2] tools: psock_tpacket: block Rx until socket filter has been added and socket has been bound to loopback Sowmini Varadhan
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=586D7692.4000604@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=sowmini.varadhan@oracle.com \
--cc=willemb@google.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.