All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsa@cumulusnetworks.com>
To: Alexander Duyck <alexander.duyck@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/9] net: Remove e_inval label from ip_route_input_slow
Date: Wed, 23 Sep 2015 11:13:37 -0600	[thread overview]
Message-ID: <5602DDC1.2080403@cumulusnetworks.com> (raw)
In-Reply-To: <5602D3CA.7010502@gmail.com>

On 9/23/15 10:31 AM, Alexander Duyck wrote:
>
> Just as you said, that code would be an intermediate step.  Going though
> and adding more points where you are updating err and just exchanging
> one jump label for another doesn't help anything.  You are better off
> pulling apart the spaghetti right from the start and then rearranging
> the code.  If nothing else it helps to make things more readable.
>
> In a couple of patches from here you are going to have to pull out the
> local_input helper.  Rather than adding a new jump label inside of it
> for out you could save yourself a few steps and just return the error
> values.  If you do this correctly what you should end up with is a
> series of functions that all converge on one end point anyway.
>
> Also as far as the multiple returns issue it isn't much of a problem
> since ip_output_input_slow ends up being compiled into
> ip_route_input_noref anyway.  As such the return statements end up just
> being jumps to the bits for the rcu_read_unlock and returning the error
> value.

I chose this series of steps because it is easy to follow each change to 
ensure I do not introduce bugs with the patches. Small, focused changes 
to evolve the code.

The first 3 patches appear to have *zero* impact on what the compiler 
generates.

Do you object to the end result of this patch series? ie. do you have 
concerns about what the end code looks like?

  reply	other threads:[~2015-09-23 17:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 15:15 [PATCH net-next 0/9 v2] net: Refactor ip_route_input_slow David Ahern
2015-09-23 15:15 ` [PATCH net-next 1/9] net: Remove martian_source_keep_err goto label David Ahern
2015-09-23 16:19   ` Tom Herbert
2015-09-23 16:22     ` David Ahern
2015-09-23 15:15 ` [PATCH net-next 2/9] net: Remove e_inval label from ip_route_input_slow David Ahern
2015-09-23 15:45   ` Alexander Duyck
2015-09-23 16:02     ` David Ahern
2015-09-23 16:31       ` Alexander Duyck
2015-09-23 17:13         ` David Ahern [this message]
2015-09-23 17:38           ` Alexander Duyck
2015-09-23 18:03             ` David Ahern
2015-09-23 18:19               ` David Miller
2015-09-23 22:26               ` Alexander Duyck
2015-09-23 18:14         ` David Miller
2015-09-23 15:15 ` [PATCH net-next 3/9] net: Remove e_nobufs " David Ahern
2015-09-23 15:15 ` [PATCH net-next 4/9] net: Move rth handling from ip_route_input_slow to helper David Ahern
2015-09-23 15:15 ` [PATCH net-next 5/9] net: Move martian_destination " David Ahern
2015-09-23 15:15 ` [PATCH net-next 6/9] net: Remove martian_source goto David Ahern
2015-09-23 15:15 ` [PATCH net-next 7/9] net: Remove martian_destination label David Ahern
2015-09-23 17:27   ` Eric Dumazet
2015-09-23 15:15 ` [PATCH net-next 8/9] net: Remove local_input label David Ahern
2015-09-23 15:15 ` [PATCH net-next 9/9] net: Remove no_route label David Ahern
2015-09-23 15:30 ` [PATCH net-next 0/9 v2] net: Refactor ip_route_input_slow Eric Dumazet
2015-09-23 16:08   ` David Ahern
2015-09-23 17:33     ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2015-09-22 22:55 [PATCH net-next 0/9] " David Ahern
2015-09-22 22:55 ` [PATCH net-next 2/9] net: Remove e_inval label from ip_route_input_slow David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5602DDC1.2080403@cumulusnetworks.com \
    --to=dsa@cumulusnetworks.com \
    --cc=alexander.duyck@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.