summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorEelco Chaudron <echaudro@redhat.com>2021-09-06 10:53:58 +0200
committerIlya Maximets <i.maximets@ovn.org>2021-11-08 21:48:05 +0100
commit9b20df73a600b00b236c85856b5c92cf9b624e82 (patch)
treed93550ac28848dfe1849ffea8ebdedee2b5ba71d /utilities
parentefd55eb34cf246d7b65bdae633d9369391dfb5af (diff)
downloadopenvswitch-9b20df73a600b00b236c85856b5c92cf9b624e82.tar.gz
dpctl: dpif: Allow viewing and configuring dp cache sizes.
This patch adds a general way of viewing/configuring datapath cache sizes. With an implementation for the netlink interface. The ovs-dpctl/ovs-appctl show commands will display the current cache sizes configured: $ ovs-dpctl show system@ovs-system: lookups: hit:25 missed:63 lost:0 flows: 0 masks: hit:282 total:0 hit/pkt:3.20 cache: hit:4 hit-rate:4.54% caches: masks-cache: size:256 port 0: ovs-system (internal) port 1: br-int (internal) port 2: genev_sys_6081 (geneve: packet_type=ptap) port 3: br-ex (internal) port 4: eth2 port 5: sw0p1 (internal) port 6: sw0p3 (internal) A specific cache can be configured as follows: $ ovs-appctl dpctl/cache-set-size DP CACHE SIZE $ ovs-dpctl cache-set-size DP CACHE SIZE For example to disable the cache do: $ ovs-dpctl cache-set-size system@ovs-system masks-cache 0 Setting cache size successful, new size 0. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Paolo Valerio <pvalerio@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-dpctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c
index f616995c3..56d7a942b 100644
--- a/utilities/ovs-dpctl.c
+++ b/utilities/ovs-dpctl.c
@@ -198,6 +198,10 @@ usage(void *userdata OVS_UNUSED)
" del-flow [DP] FLOW delete FLOW from DP\n"
" del-flows [DP] [FILE] " \
"delete all or specified flows from DP\n"
+ " cache-get-size [DP] " \
+ "Show the current size for all caches\n"
+ " cache-set-size DP CACHE SIZE " \
+ "Set cache size for a specific cache\n"
" dump-conntrack [DP] [zone=ZONE] " \
"display conntrack entries for ZONE\n"
" flush-conntrack [DP] [zone=ZONE] [ct-tuple]" \