netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jeff Dike <jdike@akamai.com>
Cc: <netdev@vger.kernel.org>, David Ahern <dsahern@gmail.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: Re: [PATCH net V2] Exempt multicast addresses from five-second neighbor lifetime
Date: Mon, 9 Nov 2020 11:47:33 -0800	[thread overview]
Message-ID: <20201109114733.0ee71b82@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> (raw)
In-Reply-To: <20201109025052.23280-1-jdike@akamai.com>

On Sun, 8 Nov 2020 21:50:52 -0500 Jeff Dike wrote:
> Commit 58956317c8de ("neighbor: Improve garbage collection")
> guarantees neighbour table entries a five-second lifetime.  Processes
> which make heavy use of multicast can fill the neighour table with
> multicast addresses in five seconds.  At that point, neighbour entries
> can't be GC-ed because they aren't five seconds old yet, the kernel
> log starts to fill up with "neighbor table overflow!" messages, and
> sends start to fail.
> 
> This patch allows multicast addresses to be thrown out before they've
> lived out their five seconds.  This makes room for non-multicast
> addresses and makes messages to all addresses more reliable in these
> circumstances.
> 
> Signed-off-by: Jeff Dike <jdike@akamai.com>

This makes sense because mcast L2 addr is calculated, not discovered,
and therefore can be recreated at a very low cost, correct?

Perhaps it would make sense to widen the API to any "computed" address
rather than implicitly depending on this behavior for mcast?

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/

  reply	other threads:[~2020-11-09 19:47 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 [this message]
2020-11-10 14:21   ` Jeff Dike
2020-11-10 15:05     ` David Ahern
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=20201109114733.0ee71b82@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net \
    --to=kuba@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jdike@akamai.com \
    --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).