Hi,

I see that in ovs-2.3 onwards, we use format_uint32_masked from match_format for printing register values. While use of format_uint32_masked for printing recirc_id, dp_hash and pkt_mark are fine, register values can have a legit value of 0. As format_uint32_masked uses "%#x", we may end up seeing register values as 0 instead of something more meaningful 0x0 (ex. reg8=0). It may be bit confusing and cause existing parsing scripts to break. Instead, why not use the earlier ovs printing method for registers? Just wondering, if we can put back the following code in match_format?

Thanks,
Sabya

match_format()
{
[..]
    for (i = 0; i < FLOW_N_REGS; i++) {
        switch (wc->masks.regs[i]) {
        case 0:
            break;
        case UINT32_MAX:
            ds_put_format(s, "reg%d=0x%"PRIx32",", i, f->regs[i]);
            break;
        default:
            ds_put_format(s, "reg%d=0x%"PRIx32"/0x%"PRIx32",",
                          i, f->regs[i], wc->masks.regs[i]);
            break;
        }
    }
[..]
}
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to