Message ID | 20160506043304.GA9342@penelope.isobedori.kobe.vergenet.net |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <dev-bounces@openvswitch.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3r1Jn0221Qz9t3s for <incoming@patchwork.ozlabs.org>; Fri, 6 May 2016 14:33:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b=t4wjEeh3; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 89470109B1; Thu, 5 May 2016 21:33:20 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 952B4109B0 for <dev@openvswitch.org>; Thu, 5 May 2016 21:33:19 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 25A3016238D for <dev@openvswitch.org>; Thu, 5 May 2016 22:33:18 -0600 (MDT) X-ASG-Debug-ID: 1462509195-0b32377bf8e98e0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id RWeNlwb0LjyAKa8R (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <dev@openvswitch.org>; Thu, 05 May 2016 22:33:15 -0600 (MDT) X-Barracuda-Envelope-From: simon.horman@netronome.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mail-pa0-f52.google.com) (209.85.220.52) by mx3-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 6 May 2016 04:33:15 -0000 Received-SPF: neutral (mx3-pf1.cudamail.com: 209.85.220.52 is neither permitted nor denied by SPF record at spf.mandrillapp.com) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.52 Received: by mail-pa0-f52.google.com with SMTP id iv1so43123035pac.2 for <dev@openvswitch.org>; Thu, 05 May 2016 21:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9eQcDSTRNrNYrzEjRX0O6ZexAFjU64y29BLMXv20My4=; b=t4wjEeh3mKU1No3nULJMR0aj/LPvia5W5aE5JdemGZ8HcjFZMPKEBJ49CnCeEmav8r k6De8pEU7JjA3rdTMCQxe/LrzutYsMyhw+p//yuoOfcEzqiwHqZKPROkCM+/GDqUpUQ5 NFbm9uPIBnyOaP8NSHvKvPbKm0MkR43a1rj8rvB0wF4jVCo3cAUid5q2+NSQ/ExTaXCy PAF8dN5Ju35YwVy13VRSIYnvhsOKnRZ8zGP4PrkDfXR9Mm44VogEABlfvDs2o2qhPj2/ /z2KwE82c4SJGM6YeGoNAHplQ497pvrleVJnqGAwssytwOYRfrXnYIyF/S3qnwGI2AH6 l0HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9eQcDSTRNrNYrzEjRX0O6ZexAFjU64y29BLMXv20My4=; b=Fe+C+RzO1iBFXkatZegsCuugFT6KB5nGBiWzHpYqy8WT/SX/QQVJ14Rd+ztuSfSNPR HgrMU5UlTozkHOnzLDtCQjDcXEbR7uZ085VIpRl6im+B+HiHi6r/MqbtZOdR/Tyt8T44 jBJ10Y5kRHZ3H4Pr4QdhVwYCd6cyrti7DtgDDYaWZrD792+X7stJjSNEw8fHK6dlOig3 bPCr2hu2vagDSAUJ0rGps9f4qA+fAWzI+ZZ8mFY9gQ9SMTQYOufmGmAh663HQ5smXX4G v5T52Utht3a7E9C9c4vnr6iV2R0pGAchWc5bC5zIiR8r3vE099iXa6bqseCQWeDQfqC8 pa+g== X-Gm-Message-State: AOPr4FUpW4yVy2u+amA4bDUw2Ox33ZmaK4fGmYTMgDLxoXQdQ0VlcxUX1QJsboE9bGpYcM6U X-Received: by 10.66.41.43 with SMTP id c11mr25895836pal.96.1462509195004; Thu, 05 May 2016 21:33:15 -0700 (PDT) Received: from penelope.isobedori.kobe.vergenet.net (penelope-musen.kanocho.kobe.vergenet.net. [2001:470:f44f:404:c685:8ff:fe7c:9971]) by smtp.gmail.com with ESMTPSA id x89sm17105631pfa.87.2016.05.05.21.33.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 May 2016 21:33:14 -0700 (PDT) Date: Fri, 6 May 2016 13:33:06 +0900 X-Barracuda-Apparent-Source-IP: 2001:470:f44f:404:c685:8ff:fe7c:9971 X-CudaMail-Envelope-Sender: simon.horman@netronome.com From: Simon Horman <simon.horman@netronome.com> To: pravin shelar <pshelar@ovn.org> X-CudaMail-MID: CM-V1-504070250 X-CudaMail-DTE: 050516 X-CudaMail-Originating-IP: 209.85.220.52 Message-ID: <20160506043304.GA9342@penelope.isobedori.kobe.vergenet.net> X-ASG-Orig-Subj: [##CM-V1-504070250##]Re: [PATCH v9 net-next 3/7] openvswitch: add support to push and pop mpls for layer3 packets References: <1462347393-22354-1-git-send-email-simon.horman@netronome.com> <1462347393-22354-4-git-send-email-simon.horman@netronome.com> <CAOrHB_A__kJiHOTRNd3Vj4sF2dcEw5w33_PpJLR_hosvbKG52A@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <CAOrHB_A__kJiHOTRNd3Vj4sF2dcEw5w33_PpJLR_hosvbKG52A@mail.gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-GBUdb-Analysis: 0, 209.85.220.52, Ugly c=0.382685 p=-0.414634 Source Normal X-MessageSniffer-Rules: 0-0-0-8149-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1462509195 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC0_MISMATCH_TO, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.29342 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Cc: ovs dev <dev@openvswitch.org>, Linux Kernel Network Developers <netdev@vger.kernel.org> Subject: Re: [ovs-dev] [PATCH v9 net-next 3/7] openvswitch: add support to push and pop mpls for layer3 packets X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: <dev.openvswitch.org> List-Unsubscribe: <http://openvswitch.org/mailman/options/dev>, <mailto:dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://openvswitch.org/pipermail/dev> List-Post: <mailto:dev@openvswitch.org> List-Help: <mailto:dev-request@openvswitch.org?subject=help> List-Subscribe: <http://openvswitch.org/mailman/listinfo/dev>, <mailto:dev-request@openvswitch.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dev-bounces@openvswitch.org Sender: "dev" <dev-bounces@openvswitch.org> |
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 63d29263d51a..89ad0027420a 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -161,6 +160,14 @@ static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key, struct ethhdr *hdr; hdr = eth_hdr(skb); + + if (skb->ip_summed == CHECKSUM_COMPLETE) { + __be16 diff[] = { ~(hdr->h_proto), mpls->mpls_ethertype }; + + skb->csum = ~csum_partial((char *)diff, sizeof(diff), + ~skb->csum); + } + hdr->h_proto = mpls->mpls_ethertype; }