On Wed, 2015-09-23 at 08:15 -0700, David Ahern wrote: > Move call to ip_handle_martian_dest to various jump sites. The > function only increments a counter and possibly does additional > logging if CONFIG_IP_ROUTE_VERBOSE is enabled. > > Signed-off-by: David Ahern <d...@cumulusnetworks.com> > --- > net/ipv4/route.c | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > > diff --git a/net/ipv4/route.c b/net/ipv4/route.c > index 0fdcb0539795..c23bb0965966 100644 > --- a/net/ipv4/route.c > +++ b/net/ipv4/route.c > @@ -1790,15 +1790,19 @@ static int ip_route_input_slow(struct sk_buff *skb, > __be32 daddr, __be32 saddr, > if (ipv4_is_lbcast(daddr) || (saddr == 0 && daddr == 0)) > goto brd_input; > > - if (ipv4_is_zeronet(daddr)) > - goto martian_destination; > + if (ipv4_is_zeronet(daddr)) { > + ip_handle_martian_dest(dev, in_dev, daddr, saddr); > + goto out; > + } >
As requested, here is an example of code for which compiler might compile in a non efficient way, ie inserting code at the wrong place, increasing icache pressure. Removing a goto is removing an implicit unlikely. -- 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