From patchwork Wed Oct 1 07:55:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 395449 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 426441400DD for ; Wed, 1 Oct 2014 17:55:09 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751579AbaJAHzD (ORCPT ); Wed, 1 Oct 2014 03:55:03 -0400 Received: from na3sys009aog121.obsmtp.com ([74.125.149.145]:59928 "HELO na3sys009aog121.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750981AbaJAHy7 (ORCPT ); Wed, 1 Oct 2014 03:54:59 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]) (using TLSv1) by na3sys009aob121.postini.com ([74.125.148.12]) with SMTP ID DSNKVCuzU3ovrD76Hn443m0dUCw1/dg9l/s2@postini.com; Wed, 01 Oct 2014 00:54:59 PDT Received: by mail-pd0-f173.google.com with SMTP id g10so316702pdj.4 for ; Wed, 01 Oct 2014 00:54:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mDgoLOiIo1cAE4D2miq3bHzRdwK4s5eOPtjY/AhgsD8=; b=c4MhwI4yBJA0DPy7Xhny+VyyjNeYews6NwAJtuR5B71DLAFKbH74j27O8wusBdoY12 sZu+PlpdLAHnKP6Rq5gSJCYX8KK85VrqTbwaeXoSZkvFQh3GVCOMFNRQmPHenjeogK8c 7wL5BzfcH/w5yNh/NPKEl9+5kNVvnYR/3LpJkW36AHa6y/ZxW7NvBiHBATVT4h2RcnVn M09c1mi7TUrZ/KlLOe4MemzYcc/f4aozarhkMdcC4mjrrYZww0Yjvt+STdG+fiv52XBq DFl+1MgdvipaO064j2vU3aV0XtCCAgodAgB/Vk4PdFZvLIqFvzdvp1x0H5oNa8FZFJsV IM1A== X-Gm-Message-State: ALoCoQkXh8bglLSTOCuSyE6yJXAwoDRW/XKO3lraCXB0cp9fa0fAZY2nxnHWjhh1h84RwNUHE6ptjCK/xF+/V4v0+lWl39eElvM9TbXoHA1UUki8T+rN28jJ58eifniUcwy3fsFsF0yQFCBTeN0Fw3wxp4d+9Xqokw== X-Received: by 10.68.221.36 with SMTP id qb4mr21364110pbc.159.1412150099090; Wed, 01 Oct 2014 00:54:59 -0700 (PDT) X-Received: by 10.68.221.36 with SMTP id qb4mr21364102pbc.159.1412150099038; Wed, 01 Oct 2014 00:54:59 -0700 (PDT) Received: from ubuntu.eng.vmware.com ([208.91.1.14]) by mx.google.com with ESMTPSA id ix8sm252285pac.32.2014.10.01.00.54.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Oct 2014 00:54:58 -0700 (PDT) From: Andy Zhou To: davem@davemloft.net Cc: netdev@vger.kernel.org, Andy Zhou Subject: [datapath minor fixes 3/3] datapath: serializing GENEVE options based on flow key's tun_flags Date: Wed, 1 Oct 2014 00:55:48 -0700 Message-Id: <1412150148-9991-4-git-send-email-azhou@nicira.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412150148-9991-1-git-send-email-azhou@nicira.com> References: <1412150148-9991-1-git-send-email-azhou@nicira.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org TUNNEL_OPTIONS_PRESENT should always be checked against the tun_flgs bits in a flow key, for both flow and mask serialization. Signed-off-by: Andy Zhou --- datapath/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index a3f34f1..35feedc 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -1122,7 +1122,7 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, if ((swkey->tun_key.ipv4_dst || is_mask)) { const struct geneve_opt *opts = NULL; - if (output->tun_key.tun_flags & TUNNEL_OPTIONS_PRESENT) + if (swkey->tun_key.tun_flags & TUNNEL_OPTIONS_PRESENT) opts = GENEVE_OPTS(output, swkey->tun_opts_len); if (ipv4_tun_to_nlattr(skb, &output->tun_key, opts,