On 9/22/15 8:15 PM, Eric W. Biederman wrote:
David Ahern <d...@cumulusnetworks.com> writes:

e_nobufs has 1 user. Move setting err to -ENOBUFS for the 1 user and
use the goto out label instead of e_nobufs. Stepping stone patch; next
one moves rth code into a helper function.

Ick you are pessimizing the code.

You will almost certainly have better code generation if you hoist
the assignment of "err = -ENOBUFS" above the rt_dst_alloc then you
don't need to do anything in your error path except "goto out;"

Can't do that here because the current value of err is used later in:
rth->dst.error = -err;

Besides, as mentioned above this is a stepping stone patch all of this is moved to a helper in patch 4. Where I could do the assignment before the rt_dst_alloc since I put the original err as an input arg rth_err.

David


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to