[ovs-dev] [PATCH 2/2] datapath: Simplify vport_send() error handling.

Jesse Gross jesse at nicira.com
Sun Dec 21 23:17:40 UTC 2014


On Fri, Dec 19, 2014 at 7:25 PM, Pravin B Shelar <pshelar at nicira.com> wrote:
> Today vport-send has complex error handling because it involves
> freeing skb and updating stats depending on return value from
> vport send implementation.
> This can be simplified by delegating responsibility of freeing
> skb to the vport implementation for all cases. So that
> vport-send needs just update stats.
>
> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>

It's somewhat non-obvious to me that handle_offloads should free the
skb in the event of an error. It seems like this introduces more
complexity to this patch as well.

As an example of the problem, I think that the previous patch
introduces a double free in the non-compat case. This is because it
updates the skb freeing for the compat code in handle_offloads() but
the equivalent update to the non-compat code isn't made until this
patch.



More information about the dev mailing list