[ovs-dev] [PATCH 01/14] tunneling: Clear OVS_CB after call to update_header().

Ben Pfaff blp at nicira.com
Thu Dec 2 20:57:17 UTC 2010


On Thu, Dec 02, 2010 at 12:36:50PM -0800, Jesse Gross wrote:
> If a packet is traversing the IP stack we need to clear some pieces
> of the skb CB beforehand.  We currently do this before the call to
> update_header() but header generation may need some members of the
> CB, such as the key.  Therefore, zero out the CB only after the
> header is complete.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

If I'm reading the code right then this way is easier to understand,
too, because it clears the CB just before it enters the IP stack instead
of somewhat earlier.

It might be slightly cleaner to use a single call to memset to zero the
whole IPCB.  There are only two members, and each is currently zeroed
separately.  It's not changed by this patch though.

Acked-by: Ben Pfaff <blp at nicira.com>




More information about the dev mailing list