From patchwork Fri Jun 10 23:54:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 634008 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 3rRJtR5KHrz9ssM for ; Sat, 11 Jun 2016 09:54:23 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 032D422C44A; Fri, 10 Jun 2016 16:54:23 -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 2864522C447 for ; Fri, 10 Jun 2016 16:54:22 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 97FC11621E8 for ; Fri, 10 Jun 2016 17:54:21 -0600 (MDT) X-ASG-Debug-ID: 1465602860-0b3237369271760001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id zsFyjQYhOOmIeXch (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 10 Jun 2016 17:54:20 -0600 (MDT) X-Barracuda-Envelope-From: jpettit@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO relay3-d.mail.gandi.net) (217.70.183.195) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 10 Jun 2016 23:54:19 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.195 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.195 X-Barracuda-RBL-IP: 217.70.183.195 Received: from mfilter25-d.gandi.net (mfilter25-d.gandi.net [217.70.178.153]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 918B0A80C2; Sat, 11 Jun 2016 01:54:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter25-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter25-d.gandi.net (mfilter25-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id uLz1k-KzUwPL; Sat, 11 Jun 2016 01:54:16 +0200 (CEST) X-Originating-IP: 98.234.50.139 Received: from [10.0.1.24] (unknown [98.234.50.139]) (Authenticated sender: jpettit@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 677EEA80C6; Sat, 11 Jun 2016 01:54:15 +0200 (CEST) Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-609054227 X-CudaMail-DTE: 061016 X-CudaMail-Originating-IP: 217.70.183.195 X-CudaMail-Envelope-Sender: jpettit@ovn.org X-ASG-Orig-Subj: [##CM-V1-609054227##]Re: [ovs-dev] [PATCH 7/8] ovn-nbctl: Update logical switch port commands. From: Justin Pettit In-Reply-To: <20160609222858.GI10021@ovn.org> Date: Fri, 10 Jun 2016 16:54:13 -0700 Message-Id: <18D4F5FE-99E1-4333-82EA-EA1FB238DBD0@ovn.org> References: <1465456362-58140-1-git-send-email-jpettit@ovn.org> <1465456362-58140-8-git-send-email-jpettit@ovn.org> <20160609222858.GI10021@ovn.org> To: Ben Pfaff X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1465602860 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 Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH 7/8] ovn-nbctl: Update logical switch port commands. 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: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" > On Jun 9, 2016, at 3:28 PM, Ben Pfaff wrote: > > On Thu, Jun 09, 2016 at 12:12:41AM -0700, Justin Pettit wrote: >> A few minor changes related to logical switch port commands: >> >> - Use "lsp" instead of "lport" to be more consistent with later >> changes. >> - Use commands where possible in ovn unit tests. >> - Update references from "lport" to "lsp" (code) or "port" (user). >> >> Signed-off-by: Justin Pettit > > I get these "sparse" warnings. Maybe they were there for previous > patches and I missed them. > > ../ovn/utilities/ovn-nbctl.c:1603:23: warning: restricted ovs_be32 degrades to integer > ../ovn/utilities/ovn-nbctl.c:1603:39: warning: restricted ovs_be32 degrades to integer > > I barely skimmed this patch, so take my ack with that in mind Whoops. That actually caught an endian bug in my sorting algorithm for listing routes. Here's an incremental on that patch to fix the issue: > Acked-by: Ben Pfaff Thanks! --Justin diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 8656e10..a8e4294 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -1703,7 +1703,7 @@ ipv4_route_cmp(const void *route1_, const void *route2_) if (route1p->plen != route2p->plen) { return route1p->plen > route2p->plen ? -1 : 1; } else if (route1p->addr != route2p->addr) { - return route1p->addr < route2p->addr ? -1 : 1; + return ntohl(route1p->addr) < ntohl(route2p->addr) ? -1 : 1; } else { return 0; }