From patchwork Mon Jul 4 13:53:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandra S Vejendla X-Patchwork-Id: 644190 Return-Path: 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 3rjpQg6FSNz9sCY for ; Mon, 4 Jul 2016 23:54:03 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id E2CBB1023D; Mon, 4 Jul 2016 06:54:01 -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 322EA10159 for ; Mon, 4 Jul 2016 06:54:01 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id A1FAF1630A2 for ; Mon, 4 Jul 2016 07:54:00 -0600 (MDT) X-ASG-Debug-ID: 1467640440-0b32373f7e2de590001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar6.cudamail.com with ESMTP id uyqUL2zl6bMcIGZB (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 04 Jul 2016 07:54:00 -0600 (MDT) X-Barracuda-Envelope-From: chandra@Jarvis.local X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by mx3-pf2.cudamail.com with ESMTPS (AES256-SHA encrypted); 4 Jul 2016 13:53:59 -0000 Received-SPF: none (mx3-pf2.cudamail.com: domain at Jarvis.local does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 148.163.158.5 X-Barracuda-RBL-IP: 148.163.158.5 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u64DrsMl136895 for ; Mon, 4 Jul 2016 09:53:58 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0a-001b2d01.pphosted.com with ESMTP id 23x9mcx8fq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 04 Jul 2016 09:53:58 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Jul 2016 07:53:56 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 4 Jul 2016 07:53:55 -0600 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: chandra@Jarvis.local Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 74FD23E40047 for ; Mon, 4 Jul 2016 07:53:54 -0600 (MDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u64Drsct46333978 for ; Mon, 4 Jul 2016 06:53:54 -0700 Received: from d03av01.boulder.ibm.com (localhost [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u64DrsSM003862 for ; Mon, 4 Jul 2016 07:53:54 -0600 Received: from Jarvis.local ([9.80.220.229]) by d03av01.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u64DrrLj003835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Jul 2016 07:53:54 -0600 Received: by Jarvis.local (Postfix, from userid 501) id 23B211194632; Mon, 4 Jul 2016 06:53:51 -0700 (PDT) X-CudaMail-Envelope-Sender: chandra@jarvis.local From: Chandra S Vejendla To: dev@openvswitch.org X-CudaMail-MID: CM-V2-703008168 X-CudaMail-DTE: 070416 X-CudaMail-Originating-IP: 148.163.158.5 Date: Mon, 4 Jul 2016 06:53:48 -0700 X-ASG-Orig-Subj: [##CM-V2-703008168##][PATCH] OVN: Fix ARP request flow in router ingress table X-Mailer: git-send-email 2.6.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16070413-0008-0000-0000-000004F97BC2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16070413-0009-0000-0000-0000390090F5 Message-Id: <1467640428-60389-1-git-send-email-csvejend@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-07-04_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607040129 X-GBUdb-Analysis: 0, 148.163.158.5, Ugly c=0.339637 p=-0.111111 Source Normal X-MessageSniffer-Rules: 0-0-0-6238-c X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1467640440 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.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31004 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH] OVN: Fix ARP request flow in router ingress table X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" TPA in arp requests generated for unknown MAC-to-IP bindings is currently set to DST_IP of the original packet. These arps will not be resolved when the DST_IP is rechable via the default gateway. This patch fixes the issue by setting the TPA to reg0. In routing stage reg0 is set to IP of the default gateway when the packet has to go through the default gateway, otherwise reg0 is set to the DST_IP of the original packet. Signed-off-by: Chandra Sekhar Vejendla --- ovn/northd/ovn-northd.8.xml | 1 + ovn/northd/ovn-northd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml index 6bc83ea..0a49b11 100644 --- a/ovn/northd/ovn-northd.8.xml +++ b/ovn/northd/ovn-northd.8.xml @@ -1011,6 +1011,7 @@ icmp4 { arp { eth.dst = ff:ff:ff:ff:ff:ff; arp.spa = reg1; + arp.tpa = reg0; arp.op = 1; /* ARP request. */ output; }; diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index f4b4435..afcd7fd 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -2693,6 +2693,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports, "arp { " "eth.dst = ff:ff:ff:ff:ff:ff; " "arp.spa = reg1; " + "arp.tpa = reg0; " "arp.op = 1; " /* ARP request */ "output; " "};");