From: Jiri Pirko <jiri@resnulli•us>
To: Simon Horman <simon.horman@netronome•com>
Cc: David Miller <davem@davemloft•net>,
Dinan Gunawardena <dinan.gunawardena@netronome•com>,
netdev@vger•kernel.org, oss-drivers@netronome•com
Subject: Re: [PATCH/RFC net-next 1/2] flow dissector: ND support
Date: Fri, 10 Mar 2017 15:27:32 +0100 [thread overview]
Message-ID: <20170310142732.GA1850@nanopsycho.lan> (raw)
In-Reply-To: <20170310141912.GA5184@penelope.horms.nl>
Fri, Mar 10, 2017 at 03:19:13PM CET, simon.horman@netronome•com wrote:
>On Tue, Feb 21, 2017 at 04:28:10PM +0100, Jiri Pirko wrote:
>> Thu, Feb 02, 2017 at 11:37:34AM CET, simon.horman@netronome•com wrote:
>> >Allow dissection of Neighbour Discovery target IP, and source and
>> >destination link-layer addresses for neighbour solicitation and
>> >advertisement messages.
>> >
>> >Signed-off-by: Simon Horman <simon.horman@netronome•com>
>> >---
>>
>> [...]
>>
>> >@@ -633,6 +702,18 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
>> > FLOW_DISSECTOR_KEY_ICMP,
>> > target_container);
>> > key_icmp->icmp = skb_flow_get_be16(skb, nhoff, data, hlen);
>> >+
>> >+ if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ND) &&
>> >+ ip_proto == IPPROTO_IPV6 && key_icmp->code == 0 &&
>>
>> IPPROTO_IPV6 say "IPv6-in-IPv4 tunnelling". Please use "NEXTHDR_IPV6"
>> instead.
>
>Thanks, will do.
>
>> >+ (key_icmp->type == NDISC_NEIGHBOUR_SOLICITATION ||
>> >+ key_icmp->type == NDISC_NEIGHBOUR_ADVERTISEMENT)) {
>> >+ key_nd = skb_flow_dissector_target(flow_dissector,
>> >+ FLOW_DISSECTOR_KEY_ND,
>> >+ target_container);
>> >+ if (!(skb_flow_dissect_nd(skb, key_nd, data, nhoff,
>> >+ hlen, ipv6_payload_len)))
>> >+ goto out_bad;
>> >+ }
>>
>> You should put this under "switch (ip_proto) {"
>
>I see that makes sense in terms of the check against ip_proto.
>But I added it here to allow checking against key_icmp->code
>and key_icmp->type as well.
Sure. Just add under "switch (ip_proto) {" and call a wrapper nd
function from there. In that function, you check dissector_uses_key and
other needed things.
next prev parent reply other threads:[~2017-03-10 14:27 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 10:37 [PATCH/RFC net-next 0/2] net/sched: cls_flower: Support matching on ND Simon Horman
2017-02-02 10:37 ` [PATCH/RFC net-next 1/2] flow dissector: ND support Simon Horman
2017-02-02 12:31 ` Eric Dumazet
2017-02-02 15:58 ` Simon Horman
2017-02-02 17:24 ` Tom Herbert
2017-02-02 17:48 ` Jiri Pirko
2017-02-02 18:36 ` Tom Herbert
2017-02-02 18:56 ` Eric Dumazet
2017-02-02 19:19 ` Tom Herbert
2017-02-06 9:12 ` [oss-drivers] " Simon Horman
2017-02-07 17:36 ` Tom Herbert
2017-02-07 17:38 ` David Miller
2017-02-08 9:28 ` Simon Horman
2017-02-08 16:43 ` Simon Horman
2017-02-08 18:33 ` [oss-drivers] " Tom Herbert
2017-02-08 18:54 ` David Miller
2017-02-08 19:10 ` Tom Herbert
2017-02-08 20:12 ` Jiri Pirko
2017-02-08 20:33 ` Tom Herbert
2017-02-08 20:09 ` Jiri Pirko
2017-02-09 8:25 ` Simon Horman
2017-02-21 14:31 ` Jiri Pirko
2017-02-21 14:33 ` [patch net-next RFC 1/2] flow_dissecror: Move ARP dissection into a separate function Jiri Pirko
2017-02-21 14:33 ` [patch net-next RFC 2/2] flow_dissecror: Move MPLS " Jiri Pirko
2017-02-22 8:34 ` Simon Horman
2017-02-21 18:32 ` [patch net-next RFC 1/2] flow_dissecror: Move ARP " David Miller
2017-02-22 8:36 ` Simon Horman
2017-02-21 18:50 ` Tom Herbert
2017-02-21 21:21 ` Jiri Pirko
2017-03-06 15:49 ` Jiri Pirko
2017-02-22 8:12 ` Simon Horman
2017-02-21 15:28 ` [PATCH/RFC net-next 1/2] flow dissector: ND support Jiri Pirko
2017-03-10 14:19 ` Simon Horman
2017-03-10 14:27 ` Jiri Pirko [this message]
2017-03-10 15:20 ` Simon Horman
2017-03-10 15:26 ` Jiri Pirko
2017-03-13 13:50 ` Simon Horman
2017-03-13 13:53 ` Jiri Pirko
2017-02-02 10:37 ` [PATCH/RFC net-next 2/2] net/sched: cls_flower: Support matching on ND Simon Horman
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=20170310142732.GA1850@nanopsycho.lan \
--to=jiri@resnulli$(echo .)us \
--cc=davem@davemloft$(echo .)net \
--cc=dinan.gunawardena@netronome$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oss-drivers@netronome$(echo .)com \
--cc=simon.horman@netronome$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox