From patchwork Tue Feb 27 18:58:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Mintz X-Patchwork-Id: 878794 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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=fail (p=none dis=none) header.from=mellanox.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zrSfn5kbpz9s1w for ; Wed, 28 Feb 2018 05:59:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbeB0S70 (ORCPT ); Tue, 27 Feb 2018 13:59:26 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:43374 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751641AbeB0S7Q (ORCPT ); Tue, 27 Feb 2018 13:59:16 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yuvalm@mellanox.com) with ESMTPS (AES256-SHA encrypted); 27 Feb 2018 20:59:30 +0200 Received: from dev-r-vrt-155.mtr.labs.mlnx (dev-r-vrt-155.mtr.labs.mlnx [10.212.155.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w1RIxArG015595; Tue, 27 Feb 2018 20:59:10 +0200 From: Yuval Mintz To: netdev@vger.kernel.org Cc: mlxsw@mellanox.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, nikolay@cumulusnetworks.com, Yuval Mintz Subject: [PATCH net-next 00/11] ipmr, ip6mr: Align multicast routing for IPv4 & IPv6 Date: Tue, 27 Feb 2018 20:58:17 +0200 Message-Id: <1519757908-32863-1-git-send-email-yuvalm@mellanox.com> X-Mailer: git-send-email 2.4.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Historically ip6mr was based [cut-n-paste] on ipmr and the two have not diverged too much. Apparently as ipv4 multicast routing is more common than its ipv6 brethren modifications since then are mostly one-way, affecting ipmr while leaving ip6mr unchanged. This series is meant to re-factor both ipmr and ip6mr into having common structures [and some functionality], adding 2 new common files - mroute_base.h and ipmr_base.c. The series begins by bringing ip6mr up to speed to some of the changes applied in the past to ipmr [#2, #3]. It is then possible to re-factor a lot of the common structures - vif devices [#1], mr_table [#4] mfc_cache [#6], and use the common structures in both ipmr and ip6mr. The rest of the patches re-factor some choice flows used by both ipmr and ip6mr and eliminates duplicity. This series would later allow for easy extension of ipmr offloading to support ip6mr offloading as well, as almost all structures related to the offloading would be shared between the two protocols. Changes from previous versions ------------------------------ RFC -> v1: - Corrected support for CONFIG_IP{,V6}_MROUTE_MULTIPLE_TABLES - Addressed a couple of kbuild test robot issues Yuval Mintz (11): ipmr,ipmr6: Define a uniform vif_device ip6mr: Make mroute_sk rcu-based ip6mr: Align hash implementation to ipmr mroute*: Make mr_table a common struct ipmr, ip6mr: Unite creation of new mr_table ipmr, ip6mr: Make mfc_cache a common structure ipmr, ip6mr: Unite logic for searching in MFC cache ipmr, ip6mr: Unite mfc seq logic ipmr, ip6mr: Unite vif seq functions ip6mr: Remove MFC_NOTIFY and refactor flags ipmr, ip6mr: Unite dumproute flows drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 21 +- include/linux/mroute.h | 88 +- include/linux/mroute6.h | 62 +- include/linux/mroute_base.h | 346 ++++++++ include/net/netns/ipv6.h | 2 +- net/ipv4/Kconfig | 5 + net/ipv4/Makefile | 1 + net/ipv4/ipmr.c | 583 ++++--------- net/ipv4/ipmr_base.c | 323 +++++++ net/ipv6/Kconfig | 1 + net/ipv6/ip6_output.c | 2 +- net/ipv6/ip6mr.c | 983 ++++++++-------------- 12 files changed, 1250 insertions(+), 1167 deletions(-) create mode 100644 include/linux/mroute_base.h create mode 100644 net/ipv4/ipmr_base.c