On 6/24/21 12:58 PM, Ilya Maximets wrote:
> 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.
> 

And these logs must be rate-limited, as if this log is going to be printed,
it will be printed for every single packet or for lots of them anyway.
This might grow log size very fast.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to