[ovs-dev] [v4 02/12] dpif-netdev: Add auto validation function for miniflow extract

Ilya Maximets i.maximets at ovn.org
Thu Jun 24 10:58:53 UTC 2021


On 6/24/21 12:46 PM, Stokes, Ian wrote:
>> +
>> +            if (!miniflow_equal(&keys[i].mf, &test_keys[i].mf)) {
>> +                uint32_t block_cnt = miniflow_n_values(&keys[i].mf);
>> +                VLOG_ERR("Autovalidation blocks failed for %s pkt %d",
>> +                         mfex_impls[j].name, i);
>> +                VLOG_ERR("  Good hexdump:\n");
>> +                uint64_t *good_block_ptr = (uint64_t *)&keys[i].buf;
>> +                uint64_t *test_block_ptr = (uint64_t *)&test_keys[i].buf;
>> +                for (uint32_t b = 0; b < block_cnt; b++) {
>> +                    VLOG_ERR("    %"PRIx64"\n", good_block_ptr[b]);
> 
> For this and other VLOG Errs  rather than using spaces to have you thought of using pad left?

FWIW, I'd prefer having a dynamic string for this kind of complex logs
constructed with ds_put_hex_dump() and printed as a single log message.
This way it will not be intermixed with other logs.

Not sure, what you meant under 'pad left', though.

Best regards, Ilya Maximets.


More information about the dev mailing list