diff mbox

[ovs-dev,v4,1/4] ovn: Dedicated connection handler for packet-ins

Message ID 20151202041602.GD25760@ovn.org
State Not Applicable
Headers show

Commit Message

Ben Pfaff Dec. 2, 2015, 4:16 a.m. UTC
On Tue, Nov 24, 2015 at 04:49:00PM +0530, bschanmu@redhat.com wrote:
> This patch opens and maintains a new connection that is dedicated
> to monitor the packet-ins for br-int.
> 
> Signed-off-by: Babu Shanmugam <bschanmu@redhat.com>

I don't think it makes sense for OVN to work with old versions of
OpenFlow, so I changed this file to require OpenFlow 1.3 instead of
allowing OpenFlow 1.0.  This meant that the "set packet-in format"
message wasn't needed anymore, so I removed that.

With those changes (see incremental diff below), I applied this to
master.  Thank you!
diff mbox

Patch

diff --git a/AUTHORS b/AUTHORS
index 02f7f1a..7d9ea90 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -26,6 +26,7 @@  Ariel Tubaltsev         atubaltsev@vmware.com
 Arun Sharma             arun.sharma@calsoftinc.com
 Aryan TaheriMonfared    aryan.taherimonfared@uis.no
 Ashwin Swaminathan      ashwinds@arista.com
+Babu Shanmugam          bschanmu@redhat.com
 Ben Pfaff               blp@ovn.org
 Bert Vermeulen          bert@biot.com
 Billy O'Mahony          billy.o.mahony@intel.com
diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c
index 7b7fe49..8c53c19 100644
--- a/ovn/controller/pinctrl.c
+++ b/ovn/controller/pinctrl.c
@@ -37,7 +37,7 @@  static unsigned int conn_seq_no;
 void
 pinctrl_init(void)
 {
-    swconn = rconn_create(5, 0, DSCP_DEFAULT, 0xF);
+    swconn = rconn_create(5, 0, DSCP_DEFAULT, 1 << OFP13_VERSION);
     conn_seq_no = 0;
 }
 
@@ -97,7 +97,6 @@  pinctrl_recv(struct controller_ctx *ctx, const struct ofp_header *oh,
         queue_msg(make_echo_reply(oh));
     } else if (type == OFPTYPE_GET_CONFIG_REPLY) {
         struct ofpbuf rq_buf;
-        struct ofpbuf *spif;
         struct ofp_switch_config *config_, config;
 
         ofpbuf_use_const(&rq_buf, oh, ntohs(oh->length));
@@ -105,9 +104,6 @@  pinctrl_recv(struct controller_ctx *ctx, const struct ofp_header *oh,
         config = *config_;
         config.miss_send_len = htons(UINT16_MAX);
         set_switch_config(swconn, &config);
-        spif = ofputil_make_set_packet_in_format(rconn_get_version(swconn),
-                                                 NXPIF_NXM);
-        queue_msg(spif);
     } else if (type == OFPTYPE_PACKET_IN) {
         process_packet_in(ctx, oh);
     } else if (type != OFPTYPE_ECHO_REPLY && type != OFPTYPE_BARRIER_REPLY) {