On Sat, Mar 18, 2017 at 11:34:16AM +0800, Big Strong wrote: > In some cases, the controller may not set up the flow as fast as the packet > arrives. Then multiple pktIn messages for the same flow will be send to > controller. Won't the flow be installed repeatedly? I see another post > discussed about the linked buffering of ovs > <https://mail.openvswitch.org/pipermail/ovs-discuss/2016-April/040744.html>, > I'm wondering if it's being implemented now.
This is not a common problem in practice because most flows start with a single packet and only send more when they receive a reply or upon a timeout. OpenFlow doesn't have a solution to that problem and OVS doesn't have an extension that solves it. Packet buffers don't help much. > Besides, during my test of generating pktIn messages about 100/s, the > buffer seems to be overwritten by new packets when it is filled full, which > makes the "buffer id unknown" error as the controller decide to tell the > buffered packets to forward but cannot find it anymore in the buffer. OK. Great, then OVS dropping support for packet buffering just solved that problem for you! > 2017-03-17 23:16 GMT+08:00 Ben Pfaff <[email protected]>: > > > Table-miss packet-in messages most commonly pass the first packet in a > > microflow to the OpenFlow controller, which then sets up an OpenFlow > > flow that handles remaining traffic in the microflow without further > > controller intervention. In such a case, the packet that initiates the > > microflow is usually small, which means that the switch sends the entire > > packet to the controller and the buffer only saves a small number of > > bytes in the reverse direction. > > > > On Fri, Mar 17, 2017 at 02:14:52PM +0800, Big Strong wrote: > > > Why are buffers usefulness? I thought it is useful to cache table-missed > > > packets and transfer the packets after controller's decision. Without it, > > > the controller has to receive all bytes of the packets and re-inject them > > > afterwards. Or else the connections may be broken for loss of packets. > > > > > > 2017-03-17 11:54 GMT+08:00 Ben Pfaff <[email protected]>: > > > > > > > You can change anything in OVS by modifying the source code, so this > > > > isn't really a surprise. > > > > > > > > Buffers aren't very useful, so we've never made them adjustable, and > > OVS > > > > 2.7 removes them entirely. > > > > > > > > On Fri, Mar 17, 2017 at 10:21:49AM +0800, Big Strong wrote: > > > > > From the source code I found the way to modify n_buffers by > > adjusting the > > > > > PKTBUF_BITS. For example, I can set it to 1024 by setting > > PKTBUF_BITS to > > > > > 10. > > > > > Does the modification have any some side-effects? Why doesn't OVS > > make it > > > > > adjustable? > > > > > > > > > > /* Buffers are identified by a 32-bit opaque ID. We divide the ID > > > > > > * into a buffer number (low bits) and a cookie (high bits). The > > > > buffer > > > > > > number > > > > > > * is an index into an array of buffers. The cookie distinguishes > > > > between > > > > > > * different packets that have occupied a single buffer. Thus, the > > > > more > > > > > > * buffers we have, the lower-quality the cookie... */ > > > > > > #define PKTBUF_BITS 8 > > > > > > #define PKTBUF_MASK (PKTBUF_CNT - 1) > > > > > > #define PKTBUF_CNT (1u << PKTBUF_BITS) > > > > > > #define COOKIE_BITS (32 - PKTBUF_BITS) > > > > > > #define COOKIE_MAX ((1u << COOKIE_BITS) - 1) > > > > > > > > > > > > > > > 2017-03-16 23:07 GMT+08:00 Ben Pfaff <[email protected]>: > > > > > > > > > > > OVS sends a packet to the controller if the flow table tells it to > > do > > > > > > so. There's nothing in OpenFlow that restricts this on the basis > > of a > > > > > > flow or a response from the controller. > > > > > > > > > > > > n_buffers is not adjustable. > > > > > > > > > > > > On Thu, Mar 16, 2017 at 10:22:38PM +0800, Big Strong wrote: > > > > > > > @Ben, does it mean ovs would repeatedly send packet in messages > > as > > > > long > > > > > > as > > > > > > > no response is got from controller? What will happen when a same > > > > packet > > > > > > > comes to ovs while the old packet in message is still not > > handled? > > > > > > > > > > > > > > Another question, is the n_buffers size adjustable using > > > > > > > ovs-ofctl/ovs-vsctl command? I want a larger n_buffers rather > > than > > > > the > > > > > > > default 256. > > > > > > > > > > > > > > Regards. > > > > > > > > > > > > > > 2017-03-16 4:54 GMT+08:00 Ben Pfaff <[email protected]>: > > > > > > > > > > > > > > > On Wed, Mar 15, 2017 at 01:34:56PM +0800, yiyefuping198425 > > wrote: > > > > > > > > > I'm asking for assistance to fix this issue: ovs send many > > > > packets > > > > > > of a > > > > > > > > table miss flow instead of the first packet. > > > > > > > > > > > > > > > > That's how OpenFlow works. > > > > > > > > _______________________________________________ > > > > > > > > discuss mailing list > > > > > > > > [email protected] > > > > > > > > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > > > > > > > > > > > > > > > > > > > > _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
