[ovs-dev] [PATCH] ofp: ensure that l2 is set in ofpmp_reserve()

Ben Pfaff blp at nicira.com
Tue Feb 12 23:54:02 UTC 2013


On Wed, Feb 13, 2013 at 08:09:25AM +0900, Simon Horman wrote:
> On Tue, Feb 12, 2013 at 09:15:24AM -0800, Ben Pfaff wrote:
> > On Tue, Feb 12, 2013 at 05:19:38PM +0900, Simon Horman wrote:
> > > Ensure that the buffer returned by ofpmp_reserve() has buf->l2 set
> > > as this may be required by nxm_reg_load_to_nxast() when generating
> > > the reply to an stats request
> > > 
> > > This problem was observed when dumping a large number of flows
> > > with set_field actions using ovs-ofctl dump-flows.
> > > 
> > > Signed-off-by: Simon Horman <horms at verge.net.au>
> > 
> > Good catch.
> > 
> > I don't think ofpbuf_clone_with_headroom() is a good choice, because
> > headroom comes before the cloned data, whereas we want space to expand
> > after the cloned data.
> 
> Oops.
> 
> > I think that the following patch also fixes the problem.  Does it look
> > good to you?
> 
> I was thinking that it would be good to have a helper that
> updated all the relevant pointers. But I believe the much
> simpler fix you propose below looks correct to me and resolves
> the problem that I observed.

Thanks a lot, I applied this to master and branch-1.{9,10}.



More information about the dev mailing list