From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com ([209.85.128.195]:41166 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946037AbeCBRor (ORCPT ); Fri, 2 Mar 2018 12:44:47 -0500 Received: by mail-wr0-f195.google.com with SMTP id f14so10902296wre.8 for ; Fri, 02 Mar 2018 09:44:47 -0800 (PST) Subject: Re: [PATCH v3 net-next 03/10] net/ipv4: Simplify fib_multipath_hash with optional flow keys To: David Ahern , netdev@vger.kernel.org References: <20180302163221.26954-1-dsahern@gmail.com> <20180302163221.26954-4-dsahern@gmail.com> Cc: idosch@idosch.org, davem@davemloft.net, roopa@cumulusnetworks.com, tom@herbertland.com From: Nikolay Aleksandrov Message-ID: <9b12dacb-2191-846c-bd22-11038601a395@cumulusnetworks.com> Date: Fri, 2 Mar 2018 19:44:44 +0200 MIME-Version: 1.0 In-Reply-To: <20180302163221.26954-4-dsahern@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 02/03/18 18:32, David Ahern wrote: > As of commit e37b1e978bec5 ("ipv6: route: dissect flow in input path if > fib rules need it") fib_multipath_hash takes an optional flow keys. If > non-NULL it means the skb has already been dissected. If not set, then > fib_multipath_hash needs to call skb_flow_dissect_flow_keys. > > Simplify the logic by setting flkeys to the local stack variable keys. > Simplifies fib_multipath_hash by only have 1 set of instructions > setting hash_keys. > > Signed-off-by: David Ahern > Reviewed-by: Ido Schimmel > --- > net/ipv4/route.c | 24 ++++++++++-------------- > 1 file changed, 10 insertions(+), 14 deletions(-) > Reviewed-by: Nikolay Aleksandrov