From patchwork Tue Feb 27 18:58:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Mintz X-Patchwork-Id: 878803 X-Patchwork-Delegate: davem@davemloft.net 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 3zrSgQ04kSz9s19 for ; Wed, 28 Feb 2018 06:00:02 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbeB0S7u (ORCPT ); Tue, 27 Feb 2018 13:59:50 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:43405 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751775AbeB0S7Q (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:31 +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 w1RIxArQ015595; Tue, 27 Feb 2018 20:59:11 +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 10/11] ip6mr: Remove MFC_NOTIFY and refactor flags Date: Tue, 27 Feb 2018 20:58:27 +0200 Message-Id: <1519757908-32863-11-git-send-email-yuvalm@mellanox.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1519757908-32863-1-git-send-email-yuvalm@mellanox.com> References: <1519757908-32863-1-git-send-email-yuvalm@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org MFC_NOTIFY exists in ip6mr, probably as some legacy code [was already removed for ipmr in commit 06bd6c0370bb ("net: ipmr: remove unused MFC_NOTIFY flag and make the flags enum"). Remove it from ip6mr as well, and move the enum into a common file; Notice MFC_OFFLOAD is currently only used by ipmr. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov --- include/linux/mroute.h | 9 --------- include/linux/mroute6.h | 3 --- include/linux/mroute_base.h | 9 +++++++++ net/ipv6/ip6mr.c | 3 --- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 63b36e6..7ed82e4 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h @@ -65,15 +65,6 @@ struct vif_entry_notifier_info { #define VIFF_STATIC 0x8000 -/* mfc_flags: - * MFC_STATIC - the entry was added statically (not by a routing daemon) - * MFC_OFFLOAD - the entry was offloaded to the hardware - */ -enum { - MFC_STATIC = BIT(0), - MFC_OFFLOAD = BIT(1), -}; - struct mfc_cache_cmp_arg { __be32 mfc_mcastgrp; __be32 mfc_origin; diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 6acf576..1ac38e6 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h @@ -81,9 +81,6 @@ struct mfc6_cache { }; }; -#define MFC_STATIC 1 -#define MFC_NOTIFY 2 - #define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */ struct rtmsg; diff --git a/include/linux/mroute_base.h b/include/linux/mroute_base.h index edc6e6b..2054118 100644 --- a/include/linux/mroute_base.h +++ b/include/linux/mroute_base.h @@ -45,6 +45,15 @@ struct vif_device { #define VIF_EXISTS(_mrt, _idx) (!!((_mrt)->vif_table[_idx].dev)) +/* mfc_flags: + * MFC_STATIC - the entry was added statically (not by a routing daemon) + * MFC_OFFLOAD - the entry was offloaded to the hardware + */ +enum { + MFC_STATIC = BIT(0), + MFC_OFFLOAD = BIT(1), +}; + /** * struct mr_mfc - common multicast routing entries * @mnode: rhashtable list diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 9773b80..0709ae3 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -2208,9 +2208,6 @@ int ip6mr_get_route(struct net *net, struct sk_buff *skb, struct rtmsg *rtm, return err; } - if (rtm->rtm_flags & RTM_F_NOTIFY) - cache->_c.mfc_flags |= MFC_NOTIFY; - err = __ip6mr_fill_mroute(mrt, skb, cache, rtm); read_unlock(&mrt_lock); return err;