On Tue, Sep 24, 2013 at 09:22:19PM -0700, Jarno Rajahalme wrote:
> 
> On Sep 24, 2013, at 9:05 PM, Ben Pfaff <b...@nicira.com> wrote:
> 
> > On Tue, Sep 24, 2013 at 07:48:55PM -0700, Jarno Rajahalme wrote:
> >> 
> >> On Sep 24, 2013, at 5:10 PM, Ben Pfaff <b...@nicira.com> wrote:
> >>> On Wed, Sep 18, 2013 at 01:42:41PM -0700, Jarno Rajahalme wrote:
> >>> I slightly prefer %# over 0x% in the following cases, because 0 looks
> >>> a little less silly than 0x0:
> >> 
> >> "%#03" would print zero as "000". My intent was to output the flags as 
> >> "0xXXX", where "XXX" are hex digits corresponding to the 12 flags bits, so 
> >> at to make the width of the flags field explicit.
> >> However, if you think the flags should be printed without zero padding in 
> >> the front, I'm more than happy to change this as you suggested. 
> > 
> > Do we zero-pad other fields?  I don't usually favor that kind of
> > formatting.  Do you think that it is especially important for this
> > field?
> > 
> 
> I think I took cue from other fields, like:
> 
>         } else if (wc->masks.vlan_tci == htons(0xffff)) {
>             ds_put_format(s, "vlan_tci=0x%04"PRIx16",", ntohs(f->vlan_tci));
>         } else {
>             ds_put_format(s, "vlan_tci=0x%04"PRIx16"/0x%04"PRIx16",",
>                           ntohs(f->vlan_tci), ntohs(wc->masks.vlan_tci));
>         }

Ah, OK.  I should have reviewed the code.

Let's leave the padding as-is, then.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to