Message ID | 1521756461-3870-23-git-send-email-gvrose8192@gmail.com |
---|---|
State | RFC |
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="nl1pNVbN"; 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 406gxQ0jG6z9s0y for <incoming@patchwork.ozlabs.org>; Fri, 23 Mar 2018 09:16:26 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 85118F7F; Thu, 22 Mar 2018 22:08:24 +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 25624F71 for <dev@openvswitch.org>; Thu, 22 Mar 2018 22:08:21 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D36EF5D3 for <dev@openvswitch.org>; Thu, 22 Mar 2018 22:08:20 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id g12so3816900pgs.0 for <dev@openvswitch.org>; Thu, 22 Mar 2018 15:08:20 -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=N41w9QB+HOdw8ZcCMOOioYRR7ktjmnzkQCImEF7jX8k=; b=nl1pNVbNGP+zh52yRK+THCeLZ8b2pEDRUubATpb5FE5fe1ES/62VD+zA9pHrB5AL1x +Ar02CPwd4DgUK1A1GiN37LUIjCICr834p7jI1pRNufs13BABtFquSZGBA2MRE+Vs+5r r1ZtBwNqvz7KvaoeYc17LZ+GRgf0UUKxTA1dMbXgRaAyXXY39ur/gXJqoYqFy7tsIRVC Ey73ddmY7TxVERJPhFHd2LnCgVJupfH71D65KWrraG2yIp/ZXsRUYXJyGgxlnAgebP9t oT+JOe8eHF+ak/vEwXX8EHWoJDRelbcfoHmiu60Hfm+iB/2CDSXt/ki+NY+d4H/FkiHs wzJQ== 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=N41w9QB+HOdw8ZcCMOOioYRR7ktjmnzkQCImEF7jX8k=; b=k/GhqmlmqCBWi+Ta97aHLc3NNKdC5qbcgTl/RZae2asY+RgyRM7EeJqdKlSjqWjV17 zZlQRoDtxXDHCYGo0tjh+bCRrkWLS71HtAGOST30ZxH0sKsZSgDeLfxkETRFLIrjCXuK YNW8/td8+YdMMU9fnkyZ+Ld+EiHVK/vpy9mFJNM4tSDIJbUOLWGNkL1GKiTlUbHTxQUx gCkSygSyyDgfDuaQHd/cpuUqNHPf1qNY0BGfE5uhWDuA9cWPEkb4EYMOIVu96ttuvBsS Ox6K6eDSek7ThfKAmB06imxSWLAFdZP8CddbPON4+I5TfdgOMAhIbZvb4oRDz9ayI4+z 7V4A== X-Gm-Message-State: AElRT7GmPkxLHwetUzViZaGUcsAvMSEUahabj/I5iR41w/kicsqazPTk OEmxkgJdEC9da4zuaQOJnpeRLA== X-Google-Smtp-Source: AG47ELtDsB02iCt3d33M70K8rkS3uaOeaI8c+JtcEXG3v4wsP7eW+WLLu7cFA2OORo0vjNPmK2pMdg== X-Received: by 10.98.49.135 with SMTP id x129mr21748540pfx.75.1521756500056; Thu, 22 Mar 2018 15:08:20 -0700 (PDT) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id 4sm2280775pfn.32.2018.03.22.15.08.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 15:08:19 -0700 (PDT) From: Greg Rose <gvrose8192@gmail.com> To: dev@openvswitch.org Date: Thu, 22 Mar 2018 15:07:38 -0700 Message-Id: <1521756461-3870-23-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521756461-3870-1-git-send-email-gvrose8192@gmail.com> References: <1521756461-3870-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] [ERSPAN RFC 22/25] net: erspan: fix metadata extraction 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 |
Introduce ERSPAN for OVS
|
expand
|
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index f99ef1b..5ebbdb5 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -119,6 +119,7 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi, struct ip_tunnel_net *itn; struct ip_tunnel *tunnel; const struct iphdr *iph; + struct erspan_md2 *md2; int ver; int len; @@ -169,8 +170,10 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi, tun_id, sizeof(*md)); md = ip_tunnel_info_opts(&tun_dst->u.tun_info); - memcpy(md, pkt_md, sizeof(*md)); md->version = ver; + md2 = &md->u.md2; + memcpy(md2, pkt_md, ver == 1 ? ERSPAN_V1_MDSIZE : + ERSPAN_V2_MDSIZE); info = &tun_dst->u.tun_info; info->key.tun_flags |= TUNNEL_ERSPAN_OPT;