X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fconnmgr.c;h=f5bef59db59c9bdc80ce2229a75b7e6bacb1be30;hb=d38a3c7b8eb5d341c9e27b74b4a459dee284f770;hp=bd6e934f9d6364efbaa41194597027603463add5;hpb=f11c7538ba3d4d9fbaabd66457f1c20e95467b1c;p=sliver-openvswitch.git diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index bd6e934f9..f5bef59db 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -1521,7 +1521,7 @@ schedule_packet_in(struct ofconn *ofconn, struct ofproto_packet_in pin) pin.up.total_len = pin.up.packet_len; if (pin.up.reason == OFPR_ACTION) { - controller_max_len = pin.up.send_len; /* max_len */ + controller_max_len = pin.send_len; /* max_len */ } else { controller_max_len = ofconn->miss_send_len; } @@ -1544,10 +1544,9 @@ schedule_packet_in(struct ofconn *ofconn, struct ofproto_packet_in pin) /* Figure out how much of the packet to send. * If not buffered, send the entire packet. Otherwise, depending on * the reason of packet-in, send what requested by the controller. */ - if (pin.up.buffer_id == UINT32_MAX) { - pin.up.send_len = pin.up.packet_len; - } else { - pin.up.send_len = MIN(pin.up.packet_len, controller_max_len); + if (pin.up.buffer_id != UINT32_MAX + && controller_max_len < pin.up.packet_len) { + pin.up.packet_len = controller_max_len; } /* Make OFPT_PACKET_IN and hand over to packet scheduler. It might