public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Yi-Hung Wei <yihung.wei@gmail.com>
Cc: Joe Stringer <joe@ovn.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] openvswitch: Fix ovs_flow_key_update()
Date: Thu, 30 Mar 2017 20:47:06 +0200	[thread overview]
Message-ID: <20170330204706.64616842@griffin> (raw)
In-Reply-To: <CAG1aQhJwShZWAJO_jGEQ_5TaHxpKpfjL0rkpYQSWfn_b9Ua-yg@mail.gmail.com>

On Thu, 30 Mar 2017 11:39:35 -0700, Yi-Hung Wei wrote:
> If we invalidate a flow key of a L3 packet, the flow's mac_proto is like this
> (MAC_PROTO_NONE | SW_FLOW_KEY_INVALID), then key_extract() will
> process the link layer of this L3 packet since mac_proto !=MAC_PROTO_NONE?
> 
> In this case, shall we update key_extract() like this
> static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
> 
>         /* Link layer. */
>         clear_vlan(key);
> -       if (key->mac_proto == MAC_PROTO_NONE) {
> +       if (key->mac_proto & MAC_PROTO_NONE) {

Use ovs_key_mac_proto(key) == MAC_PROTO_NONE.

 Jiri

      reply	other threads:[~2017-03-30 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  0:14 [PATCH net] openvswitch: Fix ovs_flow_key_update() Yi-Hung Wei
2017-03-30 13:22 ` Jiri Benc
2017-03-30 18:39   ` Yi-Hung Wei
2017-03-30 18:47     ` Jiri Benc [this message]

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=20170330204706.64616842@griffin \
    --to=jbenc@redhat.com \
    --cc=joe@ovn.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yihung.wei@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox