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

Ben Pfaff blp at ovn.org
Wed Dec 2 04:16:02 UTC 2015


On Tue, Nov 24, 2015 at 04:49:00PM +0530, bschanmu at 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 at 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 --git a/AUTHORS b/AUTHORS
index 02f7f1a..7d9ea90 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -26,6 +26,7 @@ Ariel Tubaltsev         atubaltsev at vmware.com
 Arun Sharma             arun.sharma at calsoftinc.com
 Aryan TaheriMonfared    aryan.taherimonfared at uis.no
 Ashwin Swaminathan      ashwinds at arista.com
+Babu Shanmugam          bschanmu at redhat.com
 Ben Pfaff               blp at ovn.org
 Bert Vermeulen          bert at biot.com
 Billy O'Mahony          billy.o.mahony at 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) {



More information about the dev mailing list