[ovs-dev] [PATCH v3 2/2] dpctl: dpif: allow viewing and configuring dp cache sizes

Eelco Chaudron echaudro at redhat.com
Thu Mar 4 08:01:13 UTC 2021



On 3 Mar 2021, at 21:44, Flavio Leitner wrote:

> On Wed, Mar 03, 2021 at 02:53:22PM +0100, Eelco Chaudron wrote:
>> 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 at 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.5455%
>>   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 at ovs-system masks-cache 0
>> Setting cache size successful, new size 0.
>>
>> Signed-off-by: Eelco Chaudron <echaudro at redhat.com>
>> ---
>
> Same nit in the commit with regards to precision as before.
>
> The API doesn't say anything about cache 'name' pointer ownership
> most probably because it is hardcoded to a single name. I think
> it's fine for now but in the future we might need to change that
> using xstrdup() and let the caller calls free().
>
> Thanks for including the test unit. Works here.
>
> Acked-by: Flavio Leitner <fbl at sysclose.org>


Thanks Flavio! Ilya do you need a v4 for the commit message change?



More information about the dev mailing list