From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f53.google.com ([74.125.83.53]:35204 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeCPSS6 (ORCPT ); Fri, 16 Mar 2018 14:18:58 -0400 Received: by mail-pg0-f53.google.com with SMTP id d1so4387341pgv.2 for ; Fri, 16 Mar 2018 11:18:57 -0700 (PDT) Subject: Re: [PATCH net-next 1/2] net/ipv6: Handle onlink flag with multipath routes To: David Miller Cc: netdev@vger.kernel.org References: <20180313154010.31623-2-dsahern@gmail.com> <20180316.114036.150569474738562427.davem@davemloft.net> <3e2977f7-156e-aad9-ef6a-43733fc7ae4d@gmail.com> <20180316.123847.1371456393189460416.davem@davemloft.net> From: David Ahern Message-ID: <36fe3314-1c44-5516-54c5-4aa33e80942c@gmail.com> Date: Fri, 16 Mar 2018 11:18:55 -0700 MIME-Version: 1.0 In-Reply-To: <20180316.123847.1371456393189460416.davem@davemloft.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 3/16/18 9:38 AM, David Miller wrote: > From: David Ahern > Date: Fri, 16 Mar 2018 08:45:10 -0700 > >> On 3/16/18 8:40 AM, David Miller wrote: >>> Hmmm, this actually "accumulates" the flag rather than sets it. >>> >>> Have you thought about what should happen if the cfg has RTNH_F_ONLINK >>> set? >> >> yes, that's why the test script adds cases with the ONLINK flag set for >> both nexthops, then one with it on the first nexthop only, and one with >> the flag only on the second nexthop. >> >> If you look at the full loop 'cfg' is the variable with the user data, >> and r_cfg is the 'local loop version' so r_cfg.fc_flags gets reset for >> each nexthop: >> >> while (rtnh_ok(rtnh, remaining)) { >> memcpy(&r_cfg, cfg, sizeof(*cfg)); >> ... >> r_cfg.fc_flags |= (rtnh->rtnh_flags & RTNH_F_ONLINK); >> rt = ip6_route_info_create(&r_cfg, extack); > > Right. > >>> I think you should either change this logic to a true 'set', or adjust >>> your commit message to address this aspect of the new behavior. >> >> I can update the commit message. > > Please do, thanks David. > And it looks like patch 1 needs to be in 'net'; did not realize the ipv6 ONLINK support is already in 4.16. I will send the patch adding tests separately for net-next.