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

Finn, Emma emma.finn at intel.com
Mon Jun 8 13:23:44 UTC 2020


> -----Original Message-----
> From: dev <ovs-dev-bounces at openvswitch.org> On Behalf Of Gregory Rose
> Sent: Thursday 4 June 2020 20:06
> To: William Tu <u9012063 at gmail.com>; dev at openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] dpif-netdev: Add miniflow bits to dump-
> flows.
> 
> 
> On 5/14/2020 7:11 AM, 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.
> >
> > 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);
> >
> 
> I haven't seen any reply from Emma Finn or Ian Stokes so I looked at this and
> it seems fine to me.
> 
> Acked-by: Greg Rose <gvrose8192 at gmail.com>
>

Looks Good.

Tested-by: Emma Finn <emma.finn at intel.com>
 _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev


More information about the dev mailing list