From patchwork Mon Jul 18 08:39:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 649723 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 3rtX5Z0ZYPz9s9G for ; Tue, 19 Jul 2016 04:39:29 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id F287A10A2C; Mon, 18 Jul 2016 11:39:27 -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 8ACCB10A04 for ; Mon, 18 Jul 2016 11:39:26 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 2191D163187 for ; Mon, 18 Jul 2016 12:39:26 -0600 (MDT) X-ASG-Debug-ID: 1468867165-0b32371c87158c0001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar6.cudamail.com with ESMTP id renOmnoqS7y9xtf2 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Jul 2016 12:39:25 -0600 (MDT) X-Barracuda-Envelope-From: guru.ovn@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mail-pa0-f66.google.com) (209.85.220.66) by mx3-pf2.cudamail.com with ESMTPS (AES128-SHA encrypted); 18 Jul 2016 18:39:25 -0000 Received-SPF: pass (mx3-pf2.cudamail.com: SPF record at _netblocks.google.com designates 209.85.220.66 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.220.66 X-Barracuda-RBL-IP: 209.85.220.66 Received: by mail-pa0-f66.google.com with SMTP id hh10so10951621pac.1 for ; Mon, 18 Jul 2016 11:39:25 -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:subject:date:message-id; bh=ZY6JB5NCK7D3fDR8xww60PnaXgBRcvyHFL9L/A36Sow=; b=PojWZv3Pg0c6ci3ZaMDOgNyQQ+dof1j/99CPUStX6pbRUQ0IM8mrCF4UpLUY0hsad/ phlm17w6uxR4CxLidAdvj3g557rywvv0EaExXmceu82UR+fGew5xln0bJEi5fBNVVAM1 49YxDlk44BzGfNqKZef9OJwx5161AG3AfKoGfU4Z4EcA5QB5cK9uJGvuTWM55rJCdoLx E3Pw9Ro+26DLezBxppcd5Y+RtfQZbZgtwtBZfezYOPY48fJetY5MHaQr9HtpJBFusKRP GiJnpFJE06eNeeYSH7oi4YnBp46eDqo4QBInIctOqk/87PyjLofCYI+kCN2KCT2PRD9a oC1A== X-Gm-Message-State: ALyK8tLv4MyDN4PqMTdjd7GPlrL3WE0PhPT05E9UAAHLhByAr+wpy1BSEDRU4UawQ+mO4g== X-Received: by 10.66.233.38 with SMTP id tt6mr57666334pac.99.1468867164763; Mon, 18 Jul 2016 11:39:24 -0700 (PDT) Received: from ubuntu.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id ps2sm3479894pab.10.2016.07.18.11.39.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jul 2016 11:39:23 -0700 (PDT) X-CudaMail-Envelope-Sender: guru.ovn@gmail.com From: Gurucharan Shetty To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-717034805 X-CudaMail-DTE: 071816 X-CudaMail-Originating-IP: 209.85.220.66 Date: Mon, 18 Jul 2016 01:39:56 -0700 X-ASG-Orig-Subj: [##CM-V2-717034805##][PATCH] ovn-northd: Warn when the peer of a router port is a switch port. Message-Id: <1468831196-16268-1-git-send-email-guru@ovn.org> X-Mailer: git-send-email 1.9.1 X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1468867165 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH] ovn-northd: Warn when the peer of a router port is a switch port. 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" Signed-off-by: Gurucharan Shetty Acked-by: Ryan Moats --- ovn/northd/ovn-northd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 7ce509d..0a093c7 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -2603,6 +2603,14 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports, continue; } + if (peer->nbs) { + static struct vlog_rate_limit rl = + VLOG_RATE_LIMIT_INIT(5, 1); + VLOG_WARN_RL(&rl, "Bad configuration: The peer of router " + "port %s is a switch port", op->key); + continue; + } + ds_clear(&match); ds_put_format(&match, "outport == %s && reg0 == ", peer->json_key);