[ovs-dev] [learning v2 11/19] ofproto-dpif: Add -packet option to ofproto/trace command.
Ben Pfaff
blp at nicira.com
Thu Sep 8 21:36:09 UTC 2011
On Wed, Sep 07, 2011 at 07:35:02PM -0700, Ethan Jackson wrote:
> I think the -packet option needs to be surrounded by square braces in
> the man page.
>
> I may be misreading the man page, but I don't think it actually
> explains what the -packet option does. Should we document it at all?
> Perhaps it should be hidden since it's only useful for unit testing.
> If we decide to keep it, I would rename it "-p". I found the man page
> confusing because the option was named similarly to one of the
> arguments to the trace command.
I renamed it -generate.
You might be right that it could legitimately be undocumented. But
this is the sort of obscure detail that I'm liable to forget anyhow,
so I suspect that having the documentation will be useful to me
someday too.
> > + ? ?if (flow->dl_type == htons(FLOW_DL_TYPE_NONE)) {
> > + ? ? ? ?struct eth_header *eth = b->l2;
> > + ? ? ? ?eth->eth_type = htons(b->size);
>
> This seems like a strange choice of eth_type in this case. Is there
> any particular reason the size of the packet was chosen?
That's how 802.2 encapsulation works: the field normally used for the
Ethernet type instead stores the length of the frame. (I might have
some detail wrong.)
More information about the dev
mailing list