Re: [PATCH net] openvswitch: Zero flows on allocation.

2015-09-21 Thread Jesse Gross
On Sun, Sep 20, 2015 at 11:24 PM, David Miller wrote: > From: Jesse Gross > Date: Fri, 18 Sep 2015 19:06:14 -0700 > >> @@ -80,7 +80,7 @@ struct sw_flow *ovs_flow_alloc(void) >> struct flow_stats *stats; >> int node; >> >> - flow = kmem_cache_alloc(flow_cache, GFP_KERNEL); >> +

Re: [PATCH net] openvswitch: Zero flows on allocation.

2015-09-20 Thread David Miller
From: Jesse Gross Date: Fri, 18 Sep 2015 19:06:14 -0700 > @@ -80,7 +80,7 @@ struct sw_flow *ovs_flow_alloc(void) > struct flow_stats *stats; > int node; > > - flow = kmem_cache_alloc(flow_cache, GFP_KERNEL); > + flow = kmem_cache_alloc(flow_cache, GFP_KERNEL | __GFP_ZERO); >

Re: [PATCH net] openvswitch: Zero flows on allocation.

2015-09-20 Thread Eric Dumazet
On Fri, 2015-09-18 at 19:06 -0700, Jesse Gross wrote: > > Fixes: 07148121 ("openvswitch: Eliminate memset() from flow_extract.") > Signed-off-by: Jesse Gross > --- > net/openvswitch/flow_table.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswitch/flow_table

Re: [PATCH net] openvswitch: Zero flows on allocation.

2015-09-18 Thread Pravin Shelar
On Fri, Sep 18, 2015 at 7:06 PM, Jesse Gross wrote: > OVS tries to be clever about not touching the parts of a flow that > aren't used. This can include leaving pieces of memory uninitialized > if the mask is zero and therefore the value would be ignored anyways. > > While this works fine for the