[ovs-dev] [PATCH] ofproto: Send OFPT_PORT_STATUS messages to primary slave controllers.

Ben Pfaff blp at nicira.com
Wed Nov 24 21:23:14 UTC 2010


Thanks, I pushed this one.

On Wed, Nov 24, 2010 at 01:14:24PM -0800, Justin Pettit wrote:
> Looks good.
> 
> --Justin
> 
> 
> On Nov 24, 2010, at 12:51 PM, Ben Pfaff wrote:
> 
> > Requested-by: Jeremy Stribling <strib at nicira.com>
> > CC: Jeremy Stribling <strib at nicira.com>
> > ---
> > include/openflow/nicira-ext.h |    4 ++--
> > ofproto/ofproto.c             |    5 ++++-
> > 2 files changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h
> > index d87915e..1a59d3b 100644
> > --- a/include/openflow/nicira-ext.h
> > +++ b/include/openflow/nicira-ext.h
> > @@ -205,8 +205,8 @@ OFP_ASSERT(sizeof(struct nxt_tun_id_cookie) == 24);
> >  *      OpenFlow features.  In particular attempts to modify the flow table
> >  *      will be rejected with an OFPBRC_EPERM error.
> >  *
> > - *      Slave controllers also do not receive asynchronous messages
> > - *      (OFPT_PACKET_IN, OFPT_FLOW_REMOVED, OFPT_PORT_STATUS).
> > + *      Slave controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED
> > + *      messages, but they do receive OFPT_PORT_STATUS messages.
> >  */
> > struct nx_role_request {
> >     struct nicira_header nxh;
> > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> > index c2b38b2..9a4702e 100644
> > --- a/ofproto/ofproto.c
> > +++ b/ofproto/ofproto.c
> > @@ -1515,7 +1515,10 @@ send_port_status(struct ofproto *p, const struct ofport *ofport,
> >         struct ofp_port_status *ops;
> >         struct ofpbuf *b;
> > 
> > -        if (!ofconn_receives_async_msgs(ofconn)) {
> > +        /* Primary controllers, even slaves, should always get port status
> > +           updates.  Otherwise obey ofconn_receives_async_msgs(). */
> > +        if (ofconn->type != OFCONN_PRIMARY
> > +            && !ofconn_receives_async_msgs(ofconn)) {
> >             continue;
> >         }
> > 
> > -- 
> > 1.7.1
> > 
> > 
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
> 




More information about the dev mailing list