Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A0B3A200C1E for ; Fri, 17 Feb 2017 14:41:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9F3BB160B3F; Fri, 17 Feb 2017 13:41:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E98AC160B6D for ; Fri, 17 Feb 2017 14:41:45 +0100 (CET) Received: (qmail 163 invoked by uid 500); 17 Feb 2017 13:41:45 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 154 invoked by uid 500); 17 Feb 2017 13:41:45 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 151 invoked by uid 99); 17 Feb 2017 13:41:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2017 13:41:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B6EB1C27CD for ; Fri, 17 Feb 2017 13:41:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id wHuk8-CszVKs for ; Fri, 17 Feb 2017 13:41:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 122015F47D for ; Fri, 17 Feb 2017 13:41:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4EFB0E07E7 for ; Fri, 17 Feb 2017 13:41:43 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C85722412B for ; Fri, 17 Feb 2017 13:41:41 +0000 (UTC) Date: Fri, 17 Feb 2017 13:41:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9793) Unnecessary conversion from IPNetwork to list causes router slowdown when processing static Nat rules MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 17 Feb 2017 13:41:46 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15871868#comment-15871868 ] ASF GitHub Bot commented on CLOUDSTACK-9793: -------------------------------------------- Github user borisstoyanov commented on the issue: https://github.com/apache/cloudstack/pull/1948 Thanks, @ProjectMoon I cannot run tests against it since we don't have an automated way to build the systemVM. > Unnecessary conversion from IPNetwork to list causes router slowdown when processing static Nat rules > ----------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-9793 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9793 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Virtual Router > Affects Versions: 4.7.0, 4.8.0, 4.9.0 > Reporter: Stefania Bergljot Stefansdottir > Fix For: 4.10.0.0 > > Original Estimate: 2h > Remaining Estimate: 2h > > In the CsInterface class in CsAddress.py on the virtual router there's a function > {code:java} > def ip_in_subnet(self, ip): > ipo = IPAddress(ip) > net = IPNetwork("%s/%s" % (self.get_ip(), self.get_size())) > return ipo in list(net) > {code} > Skipping the list conversion and using "return ipo in net" is much faster and the functionality is the same. It can prevent a router timeout when attaching or detaching multiple IPs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)