netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jeff Dike <jdike@akamai.com>, Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: Re: [PATCH net V2] Exempt multicast addresses from five-second neighbor lifetime
Date: Tue, 10 Nov 2020 08:05:21 -0700	[thread overview]
Message-ID: <5210487b-fde2-c6f1-a065-ad25103acaed@gmail.com> (raw)
In-Reply-To: <aaf62231-75d2-6b2f-9982-3d24ca4e4e80@akamai.com>

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.

  reply	other threads:[~2020-11-10 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09  2:50 [PATCH net V2] Exempt multicast addresses from five-second neighbor lifetime Jeff Dike
2020-11-09 19:47 ` Jakub Kicinski
2020-11-10 14:21   ` Jeff Dike
2020-11-10 15:05     ` David Ahern [this message]
2020-11-10 16:03     ` Jakub Kicinski
2020-11-10  3:55 ` David Ahern
2020-11-10 14:24   ` Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5210487b-fde2-c6f1-a065-ad25103acaed@gmail.com \
    --to=dsahern@gmail.com \
    --cc=jdike@akamai.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).