Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2680174ybi; Sun, 9 Jun 2019 18:12:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBSSjGpo8Krco1anIE8Gkyl66Tx9antgunlpUCbItg8/S4iCGz941AggyCjuOWEITCvCpT X-Received: by 2002:a17:902:a607:: with SMTP id u7mr62398578plq.43.1560129120107; Sun, 09 Jun 2019 18:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560129120; cv=none; d=google.com; s=arc-20160816; b=KbOZnFK/zyYTotl54JxUNnCiEp0+vdIdLFMSbgvrcouEYUXKsBmgYHKWykYJAb7n1T 6IIy9j06vhkGvV8Op7faFMc6oHMm/9COwocepXLcQz3HHROfYiUnhZBrPJiOUlLa22+Z Q6afuR71nOGUsq3oEoCeKLUCXlfS5Zcpbsz/Lrb9FFedPKq86PxLyOTVIUioYxX+GRzp Tf2HMRYds7C9pJpuSe8ooUZIjdlHY7Q7LVAe9JFeyAtuX+tt+LbDYSx42onKGysKMVIZ bCbzNuFjYaYuY5YDxFrTvZ00yEP8TSif2+LAMvhsRZvjd5PM7AbPu6iFwGXO9t6Unpcu iSVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vUL6UqtPP/ETrY0wsRouLmCPqZxWbdBGGERApvmdgnU=; b=bMeBI51vXiziYLLxCU2OdS527D41c2VfDAtGGvFeCJ03ldzEFm92uBfLJ+kMygLG1U TfzsgO6tsxfEGTi4mB0+wGEU6UnuqLSs9KxJJWuHWZt6DAcidi4vL9SQozBl/tqgMQWX LipSxToQ30fwL6cmHdclz7UEmfDwYe6HfB1AIFZOWwyai4nT2ZqzuNAera3zy4I1zrXe ms19/z9LkKOU+ACnzhfq5x6ab1LECElsW3t3w0ezzgtqxLTMKSNJkeN9YZ+nzHyCb1ah 9zaKU0MaQYT5YPY2cyUPsLrwXdjlTJPz6UaR9omEPwQictHYTCzfTEaHoZ6gqLuup5vd eZog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l36si8630514plb.58.2019.06.09.18.11.44; Sun, 09 Jun 2019 18:12:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730071AbfFJBKl (ORCPT + 99 others); Sun, 9 Jun 2019 21:10:41 -0400 Received: from mo-csw1514.securemx.jp ([210.130.202.153]:48400 "EHLO mo-csw.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbfFJBKl (ORCPT ); Sun, 9 Jun 2019 21:10:41 -0400 Received: by mo-csw.securemx.jp (mx-mo-csw1514) id x5A1AUBL030841; Mon, 10 Jun 2019 10:10:30 +0900 X-Iguazu-Qid: 34trJGGSgoJWdfxbTO X-Iguazu-QSIG: v=2; s=0; t=1560129029; q=34trJGGSgoJWdfxbTO; m=aIrqk9CdBBughxTo19QPF+oC/4yEyVt+H0wlgc4JEC0= Received: from imx2.toshiba.co.jp (imx2.toshiba.co.jp [106.186.93.51]) by relay.securemx.jp (mx-mr1510) id x5A1ASfc035108; Mon, 10 Jun 2019 10:10:29 +0900 Received: from enc01.localdomain ([106.186.93.100]) by imx2.toshiba.co.jp with ESMTP id x5A1ASBg004576; Mon, 10 Jun 2019 10:10:28 +0900 (JST) Received: from hop001.toshiba.co.jp ([133.199.164.63]) by enc01.localdomain with ESMTP id x5A1AS6h021925; Mon, 10 Jun 2019 10:10:28 +0900 Date: Mon, 10 Jun 2019 10:10:25 +0900 From: Nobuhiro Iwamatsu To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Alan Maguire , David Ahern , "David S. Miller" Subject: Re: [PATCH 4.14 03/35] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit X-TSB-HOP: ON Message-ID: <20190610011024.utn5fft7nocabqxb@toshiba.co.jp> References: <20190609164125.377368385@linuxfoundation.org> <20190609164125.756810906@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190609164125.756810906@linuxfoundation.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Jun 09, 2019 at 06:42:09PM +0200, Greg Kroah-Hartman wrote: > From: David Ahern > > [ Upstream commit 4b2a2bfeb3f056461a90bd621e8bd7d03fa47f60 ] > > Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to > INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was not > updated to use the altered key. The result is that every packet Tx does > a lookup on the gateway address which does not find an entry, a new one > is created only to find the existing one in the table right before the > insert since arp_constructor was updated to reset the primary key. This > is seen in the allocs and destroys counters: > ip -s -4 ntable show | head -10 | grep alloc > > which increase for each packet showing the unnecessary overhread. > > Fix by having neigh_xmit use __ipv4_neigh_lookup_noref for NEIGH_ARP_TABLE. > > Fixes: cd9ff4de0107 ("ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY") > Reported-by: Alan Maguire > Signed-off-by: David Ahern > Tested-by: Alan Maguire > Signed-off-by: David S. Miller > Signed-off-by: Greg Kroah-Hartman > --- This commit also requires the following commit: commit 9b3040a6aafd7898ece7fc7efcbca71e42aa8069 Author: David Ahern Date: Sun May 5 11:16:20 2019 -0700 ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled Define __ipv4_neigh_lookup_noref to return NULL when CONFIG_INET is disabled. Fixes: 4b2a2bfeb3f0 ("neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit") Reported-by: kbuild test robot Signed-off-by: David Ahern Signed-off-by: David S. Miller And this is also necessary for 4.4.y, 4.14.y, 4.19.y and 5.1.y. Please apply this commit. Best regards, Nobuhiro