[ovs-dev] [flow-stats 06/14] packets: New function eth_from_hex().

Ben Pfaff blp at nicira.com
Wed Dec 14 17:29:42 UTC 2011


On Tue, Dec 13, 2011 at 03:41:54PM -0800, Ethan Jackson wrote:
> > + ? ?if (packet->size < ETH_HEADER_LEN) {
> 
> In theory, I think we would want ETH_TOTAL_MIN here.  However, that
> could potentially be annoying for it's only user ofproto/trace.  So I
> think it's fine.

Thank you for the review.

ETH_TOTAL_MIN isn't really very useful in practice because it only
applies to packets that go over a physical Ethernet (or some
semi-accurate virtualization thereof).  I'm not even sure that all
physical media that we call "Ethernet" even has this requirement (is
there any reason for it on non-shared media such as full-duplex
Ethernet?).  So, most code can't assume that packets are at least 64
bytes long, and it's not very useful to require users to specify at
least 64 bytes.



More information about the dev mailing list