mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
dpif-netdev: Modified ovs-appctl dpctl/dump-flows command
Modified ovs-appctl dpctl/dump-flows command to output the miniflow bits for a given flow when -m option is passed. $ ovs-appctl dpctl/dump-flows -m Signed-off-by: Emma Finn <emma.finn@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
@@ -3158,6 +3158,21 @@ dp_netdev_flow_to_dpif_flow(const struct dp_netdev *dp,
|
||||
flow->pmd_id = netdev_flow->pmd_id;
|
||||
|
||||
get_dpif_flow_status(dp, netdev_flow, &flow->stats, &flow->attrs);
|
||||
|
||||
struct ds extra_info = DS_EMPTY_INITIALIZER;
|
||||
size_t unit;
|
||||
|
||||
ds_put_cstr(&extra_info, "miniflow_bits(");
|
||||
FLOWMAP_FOR_EACH_UNIT (unit) {
|
||||
if (unit) {
|
||||
ds_put_char(&extra_info, ',');
|
||||
}
|
||||
ds_put_format(&extra_info, "%d",
|
||||
count_1bits(netdev_flow->cr.mask->mf.map.bits[unit]));
|
||||
}
|
||||
ds_put_char(&extra_info, ')');
|
||||
flow->attrs.dp_extra_info = ds_steal_cstr(&extra_info);
|
||||
ds_destroy(&extra_info);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user