[ovs-dev] Use more than 200000 flows in datapath/kernel cache flows

Ben Pfaff blp at ovn.org
Thu Oct 31 21:05:59 UTC 2019


On Thu, Oct 31, 2019 at 11:10:42AM -0700, William Tu wrote:
> On Wed, Oct 30, 2019 at 10:16:58AM -0700, Ben Pfaff wrote:
> > On Mon, Oct 28, 2019 at 09:39:55PM -0700, Zhiwei Cen wrote:
> > > It seems I can change the limit for Openflow flows.
> > > This works:
> > > $ovs-vsctl --no-wait set Open_vSwitch . other_config:flow-limit=200001
> > > 
> > > $ovs-vsctl --no-wait get Open_vSwitch . other_config:flow-limit
> > > "200001"
> > 
> > That sets the kernel (datapath) flow limit.
> Hi Zhiwei,
> 
> Looking at the source code, OVS seems to limit the flow number to
> max 200,000. Setting flow-limit larger than 200,000 will be capped
> to 200,000.
> 
> At udpif_revalidator, 
>        flow_limit = MIN(ofproto_flow_limit, MAX(flow_limit, 1000));
> 
> and ofproto_flow_limit is 200,000
> user can set 'flow_limit' to any value, but in the end
> flow_limit is between 1000 to 200,000

I don't think this is correct.

The default value for ofproto_flow_limit is OFPROTO_FLOW_LIMIT_DEFAULT,
which is 200000, but other-config:flow-limit in the Bridge table
controls it.

'flow_limit' bobs up and down depending on the rate at which flows can
be revalidated, trying to keep the total revalidation time under 1
second.  'ofproto_flow_limit' is a hard limit on 'flow_limit'.


More information about the dev mailing list