Message ID | 1526608674-12702-16-git-send-email-gvrose8192@gmail.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mUvtHlN1"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40nBPD3NP0z9s19 for <incoming@patchwork.ozlabs.org>; Fri, 18 May 2018 12:06:40 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B74D010D0; Fri, 18 May 2018 01:58:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8D78810A3 for <dev@openvswitch.org>; Fri, 18 May 2018 01:58:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3F7936DB for <dev@openvswitch.org>; Fri, 18 May 2018 01:58:38 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id a14-v6so2966165pfi.1 for <dev@openvswitch.org>; Thu, 17 May 2018 18:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HZK7C8YNQRG2Iqi/YKxcnbsTb2OFcwVj0I4V6oqEb7s=; b=mUvtHlN1nm4qMu8v+wZFofI8fpoMjuEJkvffv+x2tw+mRyKj9oLFNaI09biSIT5djw LXplEtwOMXqW4yMjcONV1I6GCZiogcKRXAtfRdZTkYqWVuH+6HXa9qqJMeZmPYZ1q4uf kQXH8L9bGu1lxhXKGpogv10wB0/RiIBpM9R2ItuMr64820KmPR1dJftKkniJ61Z/9+Xd 9E2IlSeOCbvxDRGcxlp5/iNOd7MKpL+pj19TyQWsUhzAQS/lzYnVmEoS3qli6aweIqt9 QOKSCBCNqxopkhgI8os11btf2xk05H86pLDEJkXwNk7Ro/N5A7fhodbcye73rR1ILd6A rd9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HZK7C8YNQRG2Iqi/YKxcnbsTb2OFcwVj0I4V6oqEb7s=; b=lybST7GwCGJoTRRxHZB6Qp1Si/AF37r/k+L3tmdNzJ0P6KKjxtVX6Cnz6FkZ4wmAdP XJbJz6AbX/tEKwk8xKO3efwoSLSN+5FREYGDMynAN/RrIxXRvTp88AFgXJ5SOkMBLz2N ex8wpNtxl90t26r04h4R4p7tln+M1w1tPQDlK+hMCssv2hARBXx28PpM5hXT2djsAo8i 2yu6vIPdnrpFOgH0ycV+v6r2nGXUn2ntLh6NjJ86MVX92NvB9l7ZPBDmiJyJR1VrfcXO X1HKyw60cdRlC+PMQcPcRWFMCEbHZl6ROIZHygIWQNoiBZtxgr+fugpvh5wYdQ91QWy9 wM5w== X-Gm-Message-State: ALKqPweb9Q28gLCupJ4LZpFazuT+JdCS7+OBDL+RZ6V1MLeAIcXxhOsZ /0M41NODEUsb+1DYg+gg7PBfyQ== X-Google-Smtp-Source: AB8JxZr2LCm/sLVSnjw4Cph23u5P8xeTDhRew5LHEnovsK7o6419kNB0OLDEfzylxPTCS4byceDDHA== X-Received: by 2002:a65:51cd:: with SMTP id i13-v6mr4765031pgq.359.1526608717590; Thu, 17 May 2018 18:58:37 -0700 (PDT) Received: from gizo.domain (97-115-125-157.ptld.qwest.net. [97.115.125.157]) by smtp.gmail.com with ESMTPSA id d15-v6sm10564908pfh.97.2018.05.17.18.58.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 18:58:37 -0700 (PDT) From: Greg Rose <gvrose8192@gmail.com> To: dev@openvswitch.org Date: Thu, 17 May 2018 18:57:28 -0700 Message-Id: <1526608674-12702-16-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1526608674-12702-1-git-send-email-gvrose8192@gmail.com> References: <1526608674-12702-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 15/41] compat: Move function to header X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: <ovs-dev.openvswitch.org> List-Unsubscribe: <https://mail.openvswitch.org/mailman/options/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://mail.openvswitch.org/pipermail/ovs-dev/> List-Post: <mailto:ovs-dev@openvswitch.org> List-Help: <mailto:ovs-dev-request@openvswitch.org?subject=help> List-Subscribe: <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org |
Series |
Add ERSPAN support
|
expand
|
diff --git a/datapath/linux/compat/include/net/gre.h b/datapath/linux/compat/include/net/gre.h index ead86f6..e2473f2 100644 --- a/datapath/linux/compat/include/net/gre.h +++ b/datapath/linux/compat/include/net/gre.h @@ -30,6 +30,29 @@ static inline struct net_device *rpl_gretap_fb_dev_create( #else #include_next <net/gre.h> +#define tnl_flags_to_gre_flags rpl_tnl_flags_to_gre_flags +static inline __be16 tnl_flags_to_gre_flags(__be16 tflags) +{ + __be16 flags = 0; + + if (tflags & TUNNEL_CSUM) + flags |= GRE_CSUM; + if (tflags & TUNNEL_ROUTING) + flags |= GRE_ROUTING; + if (tflags & TUNNEL_KEY) + flags |= GRE_KEY; + if (tflags & TUNNEL_SEQ) + flags |= GRE_SEQ; + if (tflags & TUNNEL_STRICT) + flags |= GRE_STRICT; + if (tflags & TUNNEL_REC) + flags |= GRE_REC; + if (tflags & TUNNEL_VERSION) + flags |= GRE_VERSION; + + return flags; +} + #ifndef HAVE_GRE_CISCO_REGISTER /* GRE demux not available, implement our own demux. */
tnl_flags_to_gre_flags is also needed in both ip_gre.c and gre.c on some kernels. Move it from ip_gre.c to the common header. Signed-off-by: Greg Rose <gvrose8192@gmail.com> --- datapath/linux/compat/include/net/gre.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)