[ovs-dev] [runt-flows 5/8] datapath: Report memory allocation errors in flow_extract().
Ben Pfaff
blp at nicira.com
Fri Aug 27 09:47:59 PDT 2010
On Thu, Aug 26, 2010 at 02:56:04PM -0700, Jesse Gross wrote:
> On Fri, Aug 13, 2010 at 10:55 AM, Ben Pfaff <blp at nicira.com> wrote:
> > Until now flow_extract() has simply returned a bogus flow when memory
> > allocation errors occurred. This fixes the problem by propagating the
> > error to the caller.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
>
> Hmm, that's pretty nasty behavior that we had before.
>
> One general comment about this is that the behavior seems a little
> asymmetrical for the different protocol types: why switch to this new
> style for IP but not for ARP? Why are the L4 protocols different from
> L3? Why can't we just do all of this at the beginning? The answer to
> all of these questions is (I assume) "IP options". However, it took a
> little more thought to convince myself that it is OK than seems
> necessary.
We could do it all at the beginning, if we are willing to pull 98 bytes
of headers:
14 Ethernet
4 VLAN
60 max IP header
20 TCP/UDP/ICMP header
--
98
The 64 bytes we currently pull covers any of the protocols we support as
long as there are no IP options. I was reluctant to increase the amount
we pull. But maybe it's not a big deal. What do you think?
More information about the dev
mailing list