From patchwork Fri Mar 11 21:06:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Moats X-Patchwork-Id: 596495 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 7D0631402BC for ; Sat, 12 Mar 2016 08:06:34 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 74DC610B29; Fri, 11 Mar 2016 13:06:33 -0800 (PST) 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 D3EC110B23 for ; Fri, 11 Mar 2016 13:06:31 -0800 (PST) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 320151615FD for ; Fri, 11 Mar 2016 14:06:30 -0700 (MST) X-ASG-Debug-ID: 1457730389-0b323722bde8250001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar6.cudamail.com with ESMTP id MQERlVCw2kuZQ9ST (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Mar 2016 14:06:29 -0700 (MST) X-Barracuda-Envelope-From: rmoats@oc7146733065.ibm.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO eastrmfepo102.cox.net) (68.230.241.214) by mx3-pf2.cudamail.com with SMTP; 11 Mar 2016 21:06:29 -0000 Received-SPF: none (mx3-pf2.cudamail.com: domain at oc7146733065.ibm.com does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 68.230.241.214 X-Barracuda-RBL-IP: 68.230.241.214 Received: from eastrmimpo305.cox.net ([68.230.241.237]) by eastrmfepo102.cox.net (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP id <20160311210628.YRPD8634.eastrmfepo102.cox.net@eastrmimpo305.cox.net> for ; Fri, 11 Mar 2016 16:06:28 -0500 Received: from oc7146733065.ibm.com ([68.13.99.247]) by eastrmimpo305.cox.net with cox id Ul6T1s00E5LF6cs01l6TYC; Fri, 11 Mar 2016 16:06:28 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020201.56E33354.0108, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.1 cv=bqfCBSqi c=1 sm=1 tr=0 a=Jmqd6mthTashISSy/JkQqg==:117 a=Jmqd6mthTashISSy/JkQqg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=7OsogOcEt9IA:10 a=VnNF1IyMAAAA:8 a=j7DQfpv4D0CcnUNa87gA:9 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: by oc7146733065.ibm.com (Postfix, from userid 500) id 2A4C618804AD; Fri, 11 Mar 2016 15:06:27 -0600 (CST) X-CudaMail-Envelope-Sender: rmoats@oc7146733065.ibm.com From: Ryan Moats To: dev@openvswitch.org X-CudaMail-MID: CM-V2-310053640 X-CudaMail-DTE: 031116 X-CudaMail-Originating-IP: 68.230.241.214 Date: Fri, 11 Mar 2016 15:06:17 -0600 X-ASG-Orig-Subj: [##CM-V2-310053640##][PATCH v9 02/10] Present tracked changes in increasing change number order Message-Id: <1457730385-28923-3-git-send-email-rmoats@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1457730385-28923-1-git-send-email-rmoats@us.ibm.com> References: <1457730385-28923-1-git-send-email-rmoats@us.ibm.com> X-GBUdb-Analysis: 0, 68.230.241.214, Ugly c=0.237282 p=-0.4 Source Normal X-MessageSniffer-Rules: 0-0-0-5306-c X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1457730389 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: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_RULE_7582B, BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.27767 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B 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 v9 02/10] Present tracked changes in increasing change number order 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" From: RYAN D. MOATS Currently changes are added to the front of the track list, so they are looped through in LIFO order. Incremental processing is more efficient with a FIFO presentation, so (1) add new changes to the back of the track list, and (2) move updated changes to the back of the track list Signed-off-by: RYAN D. MOATS Acked-by: Shad Ansari --- lib/ovsdb-idl.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 4cb1c81..5dc8565 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1350,10 +1350,11 @@ ovsdb_idl_row_change__(struct ovsdb_idl_row *row, const struct json *row_json, = row->table->change_seqno[change] = row->table->idl->change_seqno + 1; if (table->modes[column_idx] & OVSDB_IDL_TRACK) { - if (list_is_empty(&row->track_node)) { - list_push_front(&row->table->track_list, - &row->track_node); + if (!list_is_empty(&row->track_node)) { + list_remove(&row->track_node); } + list_push_back(&row->table->track_list, + &row->track_node); if (!row->updated) { row->updated = bitmap_allocate(class->n_columns); } @@ -1572,7 +1573,7 @@ ovsdb_idl_row_destroy(struct ovsdb_idl_row *row) = row->table->idl->change_seqno + 1; } if (list_is_empty(&row->track_node)) { - list_push_front(&row->table->track_list, &row->track_node); + list_push_back(&row->table->track_list, &row->track_node); } } }