On 1/7/19 5:06 PM, Stephen Hemminger wrote:
> On Mon,  7 Jan 2019 14:55:51 -0800
> David Ahern <dsah...@kernel.org> wrote:
> 
>> +int iplink_parse(int argc, char **argv, struct iplink_req *req, char **type,
>> +             bool *name_change);
> 
> Not a real fan of adding another by reference return value flag.
> It makes the logic flow more complex.
> 
> Is there another way? Caching in general is dicey anyway.
> 

The details of the link change are buried inside of the req argument. It
does not make sense to decode the message to see if the devices
referenced by ifi_index == IFLA_NAME.

The alternative is to just negate caching of ifi_index regardless of
what the request is doing.

If the caching only gained 5 or 10% we would not be having this
discussion - I would not have sent patches. The gain here is significant
and the caching aligns with the whole intent of batch files.

Reply via email to