On Tue, Sep 12, 2017 at 02:31:07PM -0700, Greg Rose wrote:
> On 09/07/2017 06:51 PM, Duan Jiong wrote:
> > From ba48275f8bb30ed2888c16426726ee9cb3407cd1 Mon Sep 17 00:00:00 2001
> >From: Duan Jiong <djduanji...@gmail.com>
> >Date: Fri, 8 Sep 2017 09:48:59 +0800
> >Subject: [PATCH] put bundle_lookup ahead to simplify the code
> >
> >Signed-off-by: Duan Jiong <djduanji...@gmail.com>
> >---
> >  ofproto/ofproto-dpif.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> >diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> >index 1a8e829..293780f 100644
> >--- a/ofproto/ofproto-dpif.c
> >+++ b/ofproto/ofproto-dpif.c
> >@@ -3011,15 +3011,16 @@ bundle_set(struct ofproto *ofproto_, void *aux,
> >      size_t i;
> >      bool ok;
> >
> >+    bundle = bundle_lookup(ofproto, aux);
> >+
> >      if (!s) {
> >-        bundle_destroy(bundle_lookup(ofproto, aux));
> >+        bundle_destroy(bundle);
> >          return 0;
> >      }
> >
> >      ovs_assert(s->n_slaves == 1 || s->bond != NULL);
> >      ovs_assert((s->lacp != NULL) == (s->lacp_slaves != NULL));
> >
> >-    bundle = bundle_lookup(ofproto, aux);
> >      if (!bundle) {
> >          bundle = xmalloc(sizeof *bundle);
> >
> 
> Makes sense...
> 
> Reviewed-by: Greg Rose <gvrose8...@gmail.com>

I applied this to master.  Thanks, Duan and Greg.

(Again, I apologize for the delay.)
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to