From patchwork Fri Jan 5 17:52:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 856131 Return-Path: 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=) 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 3zCsr413j6z9sBZ for ; Sat, 6 Jan 2018 04:59:32 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7D5FB9F0; Fri, 5 Jan 2018 17:52:21 +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 45046989 for ; Fri, 5 Jan 2018 17:52:20 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C3B51A7 for ; Fri, 5 Jan 2018 17:52:19 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id 64so3857677wme.3 for ; Fri, 05 Jan 2018 09:52:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=qc0TcqXvQbfRfoFS+PcNPIdUxjeZlwL1J3LjUvxvLpo=; b=BFwpVrzFRPsSdS+pxuFp2x3IPjBawj7M7M2RCbiJCr0oebJFP/akfmRYjiAuAohBcZ Lj8qkTzZ/9eUQlA1GKJwYwWsYSW+anliepPf8YftdJnCcXgmJaq7ieM7SB5tctueW1g4 4H9EpII49AA1gZ9mydnZdqz9xWtjvIw10j93SVj85MwopQ+BtubxcdgomdAVIod/75j1 Ua/kFqcO6dKnwqThNs4FSadrcBmlB4BvTX5FLfV1cOSJI1NqfzwOEK4G//01NNQvGtXl YPcvDPCL+kVgRbJVIkaOPK0ng3Pq+gQs8EoYjAhLisCxZUeaMeenVFReocQVDnumW8TA KWzg== X-Gm-Message-State: AKGB3mLOXlU94IOnAM+X+VomRyweL2cXKSGRHckTn4QgPk3nn2leljB/ vYfJcceuwZzZqWuC2Mx4v42yEE/5B1o= X-Google-Smtp-Source: ACJfBosTA0JxrJIrJx/DScx7+n59ezKQpsPOtrsJmmcW6IUw4A1Kd98r4I7L9iccc+rrQ2e8hX68MA== X-Received: by 10.80.177.253 with SMTP id n58mr5296279edd.94.1515174738118; Fri, 05 Jan 2018 09:52:18 -0800 (PST) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id v20sm4176626edm.10.2018.01.05.09.52.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jan 2018 09:52:17 -0800 (PST) From: Lorenzo Bianconi To: dev@openvswitch.org Date: Fri, 5 Jan 2018 18:52:00 +0100 Message-Id: <9fee0ad1a1302ceb9569b0cdb12cb622c6cda11d.1515173721.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] OVN: remove useless ds_clear() on actions ds X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Remove ds_clear() on actions dynamic string in build_acls() since they have just been initialized to DS_EMPTY_INITIALIZER Signed-off-by: Lorenzo Bianconi --- ovn/northd/ovn-northd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index e3ddc1fd9..63ed97efb 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -3272,7 +3272,6 @@ build_acls(struct ovn_datapath *od, struct hmap *lflows) "(!ct.est || (ct.est && ct_label.blocked == 1)) " "&& (%s)", acl->match); - ds_clear(&actions); build_acl_log(&actions, acl); ds_put_cstr(&actions, "/* drop */"); ovn_lflow_add_with_hint(lflows, od, stage, @@ -3307,7 +3306,6 @@ build_acls(struct ovn_datapath *od, struct hmap *lflows) /* There are no stateful ACLs in use on this datapath, * so a "drop" ACL is simply the "drop" logical flow action * in all cases. */ - ds_clear(&actions); build_acl_log(&actions, acl); ds_put_cstr(&actions, "/* drop */"); ovn_lflow_add_with_hint(lflows, od, stage,