[ovs-dev] [PATCH] ofproto: Get enough headroom in fail-open when connected to controller.

Ben Pfaff blp at nicira.com
Wed Sep 1 19:56:57 UTC 2010


On Wed, Sep 01, 2010 at 11:25:28AM -0700, Jesse Gross wrote:
> On Wed, Sep 1, 2010 at 10:18 AM, Ben Pfaff <blp at nicira.com> wrote:
> > Since commit 750638bb "ofproto: Avoid ofpbuf_clone() for OFPAT_CONTROLLER
> > common case," send_packet_in() needs at least DPIF_RECV_MSG_PADDING bytes
> > of headroom, which ofpbuf_clone() doesn't supply.  This commit should fix
> > that.
> >
> > This fixes an assertion failure in ofpbuf_prealloc_headroom() via
> > send_packet_in().
> >
> > Reported-by: Justin Pettit <jpettit at nicira.com>
> 
> This looks fine.  However, I've seen this bit of code at least twice,
> maybe three times now (and I'm guessing it shows up in the dpif
> providers as well).  Is it worth creating a helper function?  Or
> alternately, we could consider always allocating a certain amount of
> headroom (similar to NET_SKB_PAD in the kernel).

OK, I sent out a new 2-patch series that adds helpers.




More information about the dev mailing list