[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51a3d3fa-e0c1-ca40-8c25-659487a092f7@gmail.com>
Date: Wed, 27 Mar 2019 20:05:03 -0600
From: David Ahern <dsahern@...il.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: David Ahern <dsahern@...nel.org>, davem@...emloft.net,
netdev@...r.kernel.org, idosch@...lanox.com, jiri@...lanox.com,
saeedm@...lanox.com
Subject: Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh
On 3/27/19 7:30 PM, Alexei Starovoitov wrote:
>>>
>>> imo it would be cleaner not to mess with cfg.
>>> Ideally it should be marked 'const'.
>>
>> Existing code sets those flags but on a fib6_info. This is not used for
>> nexthop objects and is kept here to not duplicate this if branch in the
>> create_info that uses it. This check affects both which device is used
>> as well as the flags.
>
> What stopping you from doing fib6_nh->nh_flags |= RTF_REJECT | RTF_NONEXTHOP ?
> cfg should really be const.
Because it is not a nexthop flag, it is a prefix flag.
>>>
>>> lwtstate_put() is missing in the error path of existing code.
>>> Is this a bug fix?
>>> Why there is nothing about this in commit log?
>>
>> Existing code has a different cleanup path.
>>
>> This is done explicitly here per a request from Ido in v1 that the new
>> function be symmetric in its cleanup on an error.
>
> I saw that comment.
> What I don't see is where existing code doing that cleanup.
> Could you please point it out?
fib6_info_release -> fib6_info_destroy_rcu
Powered by blists - more mailing lists