[ovs-dev] [PATCH] dpif-netdev: Add miniflow bits to dump-flows.

Ilya Maximets i.maximets at ovn.org
Mon Jun 8 14:01:55 UTC 2020


On 5/14/20 4:11 PM, William Tu wrote:
> The 'dpctl/dump-flows -m' only shows the number of 1-bit in the
> miniflow map, the patch outputs additional miniflow bits after it.
> The format will be
>   dp-extra-info:miniflow_bits(count_1bit(unit0):unit0,
>                               count_1bit(unit1):unit1)
> Example:
>   dp-extra-info:miniflow_bits(4:0x30c0000000000000,1:0x400)
> 
> By searching the unique miniflow bits, we know the number of subtables,
> and for earch subtables, the fields it matches on.

Hi.

Beside the curiosity what is the purpose of printing this information?
How can it be used?

Best regards, Ilya Maximets.

> 
> Cc: Emma Finn <emma.finn at intel.com>
> Cc: Ian Stokes <ian.stokes at intel.com>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---
>  lib/dpif-netdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index 51c888501bdf..b618b07be0c8 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -3352,8 +3352,9 @@ dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd,
>          if (unit) {
>              ds_put_char(&extra_info, ',');
>          }
> -        ds_put_format(&extra_info, "%d",
> -                      count_1bits(flow->cr.mask->mf.map.bits[unit]));
> +        ds_put_format(&extra_info, "%d:0x%llx",
> +                      count_1bits(flow->cr.mask->mf.map.bits[unit]),
> +                      flow->cr.mask->mf.map.bits[unit]);
>      }
>      ds_put_char(&extra_info, ')');
>      flow->dp_extra_info = ds_steal_cstr(&extra_info);
> 



More information about the dev mailing list