[ovs-dev] format_uint32_masked call for printing reg value in match_format

Ben Pfaff blp at nicira.com
Fri Jan 23 22:55:47 UTC 2015


On Fri, Jan 23, 2015 at 02:52:46PM -0800, Sabyasachi Sengupta wrote:
> 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).

0 is just as meaningful as 0x0, and shorter.



More information about the dev mailing list