> On Jun 9, 2016, at 3:28 PM, Ben Pfaff <b...@ovn.org> 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 <jpet...@ovn.org>
> 
> 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:

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;
     }

> Acked-by: Ben Pfaff <b...@ovn.org>

Thanks!

--Justin


_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to