[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5210487b-fde2-c6f1-a065-ad25103acaed@gmail.com>
Date: Tue, 10 Nov 2020 08:05:21 -0700
From: David Ahern <dsahern@...il.com>
To: Jeff Dike <jdike@...mai.com>, Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Nikolay Aleksandrov <nikolay@...dia.com>
Subject: Re: [PATCH net V2] Exempt multicast addresses from five-second
neighbor lifetime
On 11/10/20 7:21 AM, Jeff Dike wrote:
> Hi Jakub,
>
> On 11/9/20 2:47 PM, Jakub Kicinski wrote:
>> This makes sense because mcast L2 addr is calculated, not discovered,
>> and therefore can be recreated at a very low cost, correct?
>
> Yes.
>
>> Perhaps it would make sense to widen the API to any "computed" address
>> rather than implicitly depending on this behavior for mcast?
>
> I'm happy to do that, but I don't know of any other types of addresses which are computed and end up in the neighbors table.
>
>> I'm not an expert tho, maybe others disagree.
>>
>>> +static int arp_is_multicast(const void *pkey)
>>> +{
>>> + return IN_MULTICAST(htonl(*((u32 *)pkey)));
>>> +}
>>
>> net/ipv4/arp.c:935:16: warning: cast from restricted __be32
>>
>> s/u32/__be32/
>> s/htonl/ntohl/
>
> Thanks, I ran sparse, but must have missed that somehow.
>
I missed this yesterday -- ipv4_is_multicast() is more appropriate and
the norm for IPv4 addresses.
Powered by blists - more mailing lists