From patchwork Sun Apr 28 02:27:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 1092119 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="f8NTVNiY"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44sBWB43z5z9s9N for ; Sun, 28 Apr 2019 12:26:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfD1C0j (ORCPT ); Sat, 27 Apr 2019 22:26:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:44010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfD1C0j (ORCPT ); Sat, 27 Apr 2019 22:26:39 -0400 Received: from kenny.it.cumulusnetworks.com. (fw.cumulusnetworks.com [216.129.126.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24AE320881; Sun, 28 Apr 2019 02:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556418399; bh=vRH21xMC9Iet0oiqgzcaFhg5/xFgBCJQQnlnA47KDVE=; h=From:To:Cc:Subject:Date:From; b=f8NTVNiYmpGIr4K/inpoh6ZkUxNzy08V8JwjPqPQ3XA6pxGcS2/WWjxB/S+CVBfRe +VJiapfeu0RD9X7fkzEpbAdEPaKGu61vqt9hkQ9PeqnZHGC5s37h2yw0k5nug7iobi P5B6JNWIfBMrmVzcw4TkFX0NiO/CHhNK3GK2Qp/0= From: David Ahern To: davem@davemloft.net, netdev@vger.kernel.org Cc: idosch@mellanox.com, David Ahern Subject: [PATCH v2 net-next 0/7] ipv4 ipv6: Move location of pcpu route cache and exceptions Date: Sat, 27 Apr 2019 19:27:27 -0700 Message-Id: <20190428022734.21965-1-dsahern@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: David Ahern This series moves IPv4 pcpu cached routes from fib_nh to fib_nh_common to make the caches avaialable for IPv6 nexthops (fib6_nh) with IPv4 routes. This allows a fib6_nh struct to be used with both IPv4 and and IPv6 routes. In addition pcpu caches and exception entries for IPv6 routes are moved from fib6_info to fib6_nh since they are really a function of the device and gateway. During the move of each, functions are refactored such that the core logic is in new helpers that take a fib6_nh versus a fib6_info. v2 - reverted patch 2 to use ifdef CONFIG_IP_ROUTE_CLASSID instead of IS_ENABLED(CONFIG_IP_ROUTE_CLASSID) to fix compile issues reported by kbuild test robot David Ahern (7): ipv4: Move cached routes to fib_nh_common ipv4: Pass fib_nh_common to rt_cache_route ipv4: Move exception bucket to nh_common ipv6: Move pcpu cached routes to fib6_nh ipv6: Refactor fib6_drop_pcpu_from ipv6: Refactor exception functions ipv6: Move exception bucket to fib6_nh include/net/ip6_fib.h | 11 +- include/net/ip_fib.h | 8 +- net/ipv4/fib_semantics.c | 45 +++---- net/ipv4/route.c | 75 ++++++------ net/ipv6/addrconf.c | 6 +- net/ipv6/ip6_fib.c | 62 ++++------ net/ipv6/route.c | 302 +++++++++++++++++++++++++++++++++-------------- 7 files changed, 305 insertions(+), 204 deletions(-)