2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 09:58:01 +00:00

dpif-netdev: Delete the artificial flow limit.

The MAX_FLOWS constant was there from the introduction of dpif-netdev,
however, later new flow-limit mechanism was implemented that
controls number of datapath flows in a dynamic way on ofproto level.

So, we can just remove the limit and fully rely on ofproto to decide
what flow limit we need.  There are no limitations for flow table size
in dpif-netdev beside the artificial one.
'other_config:flow-limit' seems suitable to control this.

Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Tonghao Zhang 2020-03-16 05:56:03 +08:00 committed by Ilya Maximets
parent a64ee5493f
commit df5c293642
2 changed files with 5 additions and 8 deletions

3
NEWS
View File

@ -16,6 +16,9 @@ Post-v2.13.0
* New netdev class 'afxdp-nonpmd' for netdev-afxdp to save CPU cycles
by enabling interrupt mode.
- Userspace datapath:
* Removed artificial datapath flow limit that was 65536.
Now number of datapath flows is fully controlled by revalidators and the
'other_config:flow-limit' knob.
* Add support for conntrack zone-based timeout policy.
* New configuration knob 'other_config:lb-output-action' for bond ports
that enables new datapath action 'lb_output' to avoid recirculation

View File

@ -98,7 +98,6 @@ DEFINE_STATIC_PER_THREAD_DATA(uint32_t, recirc_depth, 0)
#define DEFAULT_TX_FLUSH_INTERVAL 0
/* Configuration parameters. */
enum { MAX_FLOWS = 65536 }; /* Maximum number of flows in flow table. */
enum { MAX_METERS = 65536 }; /* Maximum number of meters. */
enum { MAX_BANDS = 8 }; /* Maximum number of bands / meter. */
enum { N_METER_LOCKS = 64 }; /* Maximum number of meters. */
@ -3527,13 +3526,8 @@ flow_put_on_pmd(struct dp_netdev_pmd_thread *pmd,
netdev_flow = dp_netdev_pmd_lookup_flow(pmd, key, NULL);
if (!netdev_flow) {
if (put->flags & DPIF_FP_CREATE) {
if (cmap_count(&pmd->flow_table) < MAX_FLOWS) {
dp_netdev_flow_add(pmd, match, ufid, put->actions,
put->actions_len);
error = 0;
} else {
error = EFBIG;
}
dp_netdev_flow_add(pmd, match, ufid, put->actions,
put->actions_len);
} else {
error = ENOENT;
}