Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/816697/?format=api
{ "id": 816697, "url": "http://patchwork.ozlabs.org/api/patches/816697/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170921064338.1282-11-jiri@resnulli.us/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170921064338.1282-11-jiri@resnulli.us>", "list_archive_url": null, "date": "2017-09-21T06:43:36", "name": "[net-next,10/12] mlxsw: spectrum_router: Add multicast routes notification handling functionality", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "2ee518400eeb17c69eaef3321d572f44a73c9fb9", "submitter": { "id": 15321, "url": "http://patchwork.ozlabs.org/api/people/15321/?format=api", "name": "Jiri Pirko", "email": "jiri@resnulli.us" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170921064338.1282-11-jiri@resnulli.us/mbox/", "series": [ { "id": 4309, "url": "http://patchwork.ozlabs.org/api/series/4309/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4309", "date": "2017-09-21T06:43:26", "name": "mlxsw: Add support for offloading IPv4 multicast routes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/4309/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/816697/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/816697/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"RiJrBLdx\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyRsg1PlFz9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 16:44:07 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751964AbdIUGoF (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 02:44:05 -0400", "from mail-wr0-f193.google.com ([209.85.128.193]:36707 \"EHLO\n\tmail-wr0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751936AbdIUGnt (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 02:43:49 -0400", "by mail-wr0-f193.google.com with SMTP id g50so2584422wra.3\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 23:43:48 -0700 (PDT)", "from localhost (ip-89-177-125-82.net.upcbroadband.cz.\n\t[89.177.125.82]) by smtp.gmail.com with ESMTPSA id\n\tn57sm905170wrn.29.2017.09.20.23.43.47\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Sep 2017 23:43:47 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=8vI4/tnBt3TLVGZjS3SDHvtwgZSEOQDho5RJmFMo49U=;\n\tb=RiJrBLdxrPx8rjoaxgonfj9b9X6YTNaUeQMcE6ZlNf3m+2stkTcrqMcIVxBCCaUPR+\n\td0DcwKQXrgjmIc8pVTg8cNweI+NVDYHXbuUjIWOG+eMNlfnrVEY3Jzjp2CokTSEvtXPz\n\tWSMNCK6YMY9pmp5I9qBGRp1FcoloWAwSDBlsdEsyzYVYesVn9YbIDCQ74uwCwXLhfWVB\n\tocd8R5vTYLJrIrjcXjBzS3q9yFM4A3uWJ6eE2D4VyeE080RlvubBF8xbBOM8Tn15a/9c\n\tOhOFMIOZ13xB3Lp616+RnUSE3pC9ZBm30kI9bTSEkLiS1Az4PrPc/SWHOu1pv/X+bkBU\n\tQxPw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=8vI4/tnBt3TLVGZjS3SDHvtwgZSEOQDho5RJmFMo49U=;\n\tb=jGmT4boQN5p6Ie8vZ4+D+YhUuNKFAkrjZUlRW3a2EozS+SUQwFNpCujKCxO37LTeQg\n\tgMePo+e0XrIlbauspcJX59BNtJ43kJXf/OemgLxOfXKuQH5oVOmD7OYizJOBoIoDZ4SM\n\thpTZCdrcVmUf4Zejz9xehn68dAhTsROm57hA4RbIUsQh55ezeOSJU3I5gZOMNfnrI2pC\n\t9YeZCegUcNeAfN0446eTeoDs2zDQmZwTs3dvC2zK2gmwrjfsqq26rEX0gWIMgwviRQ7t\n\tcJCPvkv+MysngW8UiG0XYOETpGyRI+WxNkKVsviGS21WEHUkSy0CnwW0THxVmegTCKsu\n\t1Awg==", "X-Gm-Message-State": "AHPjjUhkxPxGudPyM5XB8ZTvWHJHEtCjsE9BLaWbyjF4DulNgEN5Im7o\n\tg1euF5UHIXaUFaDX0Czkgl2uJhTN", "X-Google-Smtp-Source": "AOwi7QCIJQO4V0YCEWzXwuqea2lA3FjVyeHreXmfYgvZ7UeiW74U/AvK7U52OKL7meD9TD3wRdXr4g==", "X-Received": "by 10.223.178.193 with SMTP id g59mr990597wrd.0.1505976227774;\n\tWed, 20 Sep 2017 23:43:47 -0700 (PDT)", "From": "Jiri Pirko <jiri@resnulli.us>", "To": "netdev@vger.kernel.org", "Cc": "davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com", "Subject": "[patch net-next 10/12] mlxsw: spectrum_router: Add multicast routes\n\tnotification handling functionality", "Date": "Thu, 21 Sep 2017 08:43:36 +0200", "Message-Id": "<20170921064338.1282-11-jiri@resnulli.us>", "X-Mailer": "git-send-email 2.9.5", "In-Reply-To": "<20170921064338.1282-1-jiri@resnulli.us>", "References": "<20170921064338.1282-1-jiri@resnulli.us>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Yotam Gigi <yotamg@mellanox.com>\n\nAdd functionality for calling the multicast routing offloading logic upon\nMFC and VIF add and delete notifications. In addition, call the multicast\nrouting upon RIF addition and deletion events.\n\nAs the multicast routing offload logic may sleep, the actual calls are done\nin a deferred work. To ensure the MFC object is not freed in that interval,\na reference is held to it. In case of a failure, the abort mechanism is\nused, which ejects all the routes from the hardware and triggers the\ntraffic to flow through the kernel.\n\nNote: At that stage, the FIB notifications are still ignored, and will be\nenabled in a further patch.\n\nSigned-off-by: Yotam Gigi <yotamg@mellanox.com>\nReviewed-by: Ido Schimmel <idosch@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 187 ++++++++++++++++++++-\n 1 file changed, 185 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\nindex 1e6122f..b36ec63 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -65,6 +65,8 @@\n #include \"spectrum_cnt.h\"\n #include \"spectrum_dpipe.h\"\n #include \"spectrum_ipip.h\"\n+#include \"spectrum_mr.h\"\n+#include \"spectrum_mr_tcam.h\"\n #include \"spectrum_router.h\"\n \n struct mlxsw_sp_vr;\n@@ -458,6 +460,7 @@ struct mlxsw_sp_vr {\n \tunsigned int rif_count;\n \tstruct mlxsw_sp_fib *fib4;\n \tstruct mlxsw_sp_fib *fib6;\n+\tstruct mlxsw_sp_mr_table *mr4_table;\n };\n \n static const struct rhashtable_params mlxsw_sp_fib_ht_params;\n@@ -652,7 +655,7 @@ static void mlxsw_sp_lpm_fini(struct mlxsw_sp *mlxsw_sp)\n \n static bool mlxsw_sp_vr_is_used(const struct mlxsw_sp_vr *vr)\n {\n-\treturn !!vr->fib4 || !!vr->fib6;\n+\treturn !!vr->fib4 || !!vr->fib6 || !!vr->mr4_table;\n }\n \n static struct mlxsw_sp_vr *mlxsw_sp_vr_find_unused(struct mlxsw_sp *mlxsw_sp)\n@@ -743,9 +746,18 @@ static struct mlxsw_sp_vr *mlxsw_sp_vr_create(struct mlxsw_sp *mlxsw_sp,\n \t\terr = PTR_ERR(vr->fib6);\n \t\tgoto err_fib6_create;\n \t}\n+\tvr->mr4_table = mlxsw_sp_mr_table_create(mlxsw_sp, vr->id,\n+\t\t\t\t\t\t MLXSW_SP_L3_PROTO_IPV4);\n+\tif (IS_ERR(vr->mr4_table)) {\n+\t\terr = PTR_ERR(vr->mr4_table);\n+\t\tgoto err_mr_table_create;\n+\t}\n \tvr->tb_id = tb_id;\n \treturn vr;\n \n+err_mr_table_create:\n+\tmlxsw_sp_fib_destroy(vr->fib6);\n+\tvr->fib6 = NULL;\n err_fib6_create:\n \tmlxsw_sp_fib_destroy(vr->fib4);\n \tvr->fib4 = NULL;\n@@ -754,6 +766,8 @@ static struct mlxsw_sp_vr *mlxsw_sp_vr_create(struct mlxsw_sp *mlxsw_sp,\n \n static void mlxsw_sp_vr_destroy(struct mlxsw_sp_vr *vr)\n {\n+\tmlxsw_sp_mr_table_destroy(vr->mr4_table);\n+\tvr->mr4_table = NULL;\n \tmlxsw_sp_fib_destroy(vr->fib6);\n \tvr->fib6 = NULL;\n \tmlxsw_sp_fib_destroy(vr->fib4);\n@@ -774,7 +788,8 @@ static struct mlxsw_sp_vr *mlxsw_sp_vr_get(struct mlxsw_sp *mlxsw_sp, u32 tb_id)\n static void mlxsw_sp_vr_put(struct mlxsw_sp_vr *vr)\n {\n \tif (!vr->rif_count && list_empty(&vr->fib4->node_list) &&\n-\t list_empty(&vr->fib6->node_list))\n+\t list_empty(&vr->fib6->node_list) &&\n+\t mlxsw_sp_mr_table_empty(vr->mr4_table))\n \t\tmlxsw_sp_vr_destroy(vr);\n }\n \n@@ -4606,6 +4621,75 @@ static int __mlxsw_sp_router_set_abort_trap(struct mlxsw_sp *mlxsw_sp,\n \treturn 0;\n }\n \n+static int mlxsw_sp_router_fibmr_add(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct mfc_entry_notifier_info *men_info,\n+\t\t\t\t bool replace)\n+{\n+\tstruct mlxsw_sp_vr *vr;\n+\n+\tif (mlxsw_sp->router->aborted)\n+\t\treturn 0;\n+\n+\tvr = mlxsw_sp_vr_get(mlxsw_sp, men_info->tb_id);\n+\tif (IS_ERR(vr))\n+\t\treturn PTR_ERR(vr);\n+\n+\treturn mlxsw_sp_mr_route4_add(vr->mr4_table, men_info->mfc, replace);\n+}\n+\n+static void mlxsw_sp_router_fibmr_del(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct mfc_entry_notifier_info *men_info)\n+{\n+\tstruct mlxsw_sp_vr *vr;\n+\n+\tif (mlxsw_sp->router->aborted)\n+\t\treturn;\n+\n+\tvr = mlxsw_sp_vr_find(mlxsw_sp, men_info->tb_id);\n+\tif (WARN_ON(!vr))\n+\t\treturn;\n+\n+\tmlxsw_sp_mr_route4_del(vr->mr4_table, men_info->mfc);\n+\tmlxsw_sp_vr_put(vr);\n+}\n+\n+static int\n+mlxsw_sp_router_fibmr_vif_add(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t struct vif_entry_notifier_info *ven_info)\n+{\n+\tstruct mlxsw_sp_rif *rif;\n+\tstruct mlxsw_sp_vr *vr;\n+\n+\tif (mlxsw_sp->router->aborted)\n+\t\treturn 0;\n+\n+\tvr = mlxsw_sp_vr_get(mlxsw_sp, ven_info->tb_id);\n+\tif (IS_ERR(vr))\n+\t\treturn PTR_ERR(vr);\n+\n+\trif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, ven_info->dev);\n+\treturn mlxsw_sp_mr_vif_add(vr->mr4_table, ven_info->dev,\n+\t\t\t\t ven_info->vif_index,\n+\t\t\t\t ven_info->vif_flags, rif);\n+}\n+\n+static void\n+mlxsw_sp_router_fibmr_vif_del(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t struct vif_entry_notifier_info *ven_info)\n+{\n+\tstruct mlxsw_sp_vr *vr;\n+\n+\tif (mlxsw_sp->router->aborted)\n+\t\treturn;\n+\n+\tvr = mlxsw_sp_vr_find(mlxsw_sp, ven_info->tb_id);\n+\tif (WARN_ON(!vr))\n+\t\treturn;\n+\n+\tmlxsw_sp_mr_vif_del(vr->mr4_table, ven_info->vif_index);\n+\tmlxsw_sp_vr_put(vr);\n+}\n+\n static int mlxsw_sp_router_set_abort_trap(struct mlxsw_sp *mlxsw_sp)\n {\n \tenum mlxsw_reg_ralxx_protocol proto = MLXSW_REG_RALXX_PROTOCOL_IPV4;\n@@ -4616,6 +4700,10 @@ static int mlxsw_sp_router_set_abort_trap(struct mlxsw_sp *mlxsw_sp)\n \tif (err)\n \t\treturn err;\n \n+\t/* The multicast router code does not need an abort trap as by default,\n+\t * packets that don't match any routes are trapped to the CPU.\n+\t */\n+\n \tproto = MLXSW_REG_RALXX_PROTOCOL_IPV6;\n \treturn __mlxsw_sp_router_set_abort_trap(mlxsw_sp, proto,\n \t\t\t\t\t\tMLXSW_SP_LPM_TREE_MIN + 1);\n@@ -4697,6 +4785,8 @@ static void mlxsw_sp_router_fib_flush(struct mlxsw_sp *mlxsw_sp)\n \n \t\tif (!mlxsw_sp_vr_is_used(vr))\n \t\t\tcontinue;\n+\n+\t\tmlxsw_sp_mr_table_flush(vr->mr4_table);\n \t\tmlxsw_sp_vr_fib_flush(mlxsw_sp, vr, MLXSW_SP_L3_PROTO_IPV4);\n \n \t\t/* If virtual router was only used for IPv4, then it's no\n@@ -4729,6 +4819,8 @@ struct mlxsw_sp_fib_event_work {\n \t\tstruct fib_entry_notifier_info fen_info;\n \t\tstruct fib_rule_notifier_info fr_info;\n \t\tstruct fib_nh_notifier_info fnh_info;\n+\t\tstruct mfc_entry_notifier_info men_info;\n+\t\tstruct vif_entry_notifier_info ven_info;\n \t};\n \tstruct mlxsw_sp *mlxsw_sp;\n \tunsigned long event;\n@@ -4815,6 +4907,55 @@ static void mlxsw_sp_router_fib6_event_work(struct work_struct *work)\n \tkfree(fib_work);\n }\n \n+static void mlxsw_sp_router_fibmr_event_work(struct work_struct *work)\n+{\n+\tstruct mlxsw_sp_fib_event_work *fib_work =\n+\t\tcontainer_of(work, struct mlxsw_sp_fib_event_work, work);\n+\tstruct mlxsw_sp *mlxsw_sp = fib_work->mlxsw_sp;\n+\tstruct fib_rule *rule;\n+\tbool replace;\n+\tint err;\n+\n+\trtnl_lock();\n+\tswitch (fib_work->event) {\n+\tcase FIB_EVENT_ENTRY_REPLACE: /* fall through */\n+\tcase FIB_EVENT_ENTRY_ADD:\n+\t\treplace = fib_work->event == FIB_EVENT_ENTRY_REPLACE;\n+\n+\t\terr = mlxsw_sp_router_fibmr_add(mlxsw_sp, &fib_work->men_info,\n+\t\t\t\t\t\treplace);\n+\t\tif (err)\n+\t\t\tmlxsw_sp_router_fib_abort(mlxsw_sp);\n+\t\tipmr_cache_put(fib_work->men_info.mfc);\n+\t\tbreak;\n+\tcase FIB_EVENT_ENTRY_DEL:\n+\t\tmlxsw_sp_router_fibmr_del(mlxsw_sp, &fib_work->men_info);\n+\t\tipmr_cache_put(fib_work->men_info.mfc);\n+\t\tbreak;\n+\tcase FIB_EVENT_VIF_ADD:\n+\t\terr = mlxsw_sp_router_fibmr_vif_add(mlxsw_sp,\n+\t\t\t\t\t\t &fib_work->ven_info);\n+\t\tif (err)\n+\t\t\tmlxsw_sp_router_fib_abort(mlxsw_sp);\n+\t\tdev_put(fib_work->ven_info.dev);\n+\t\tbreak;\n+\tcase FIB_EVENT_VIF_DEL:\n+\t\tmlxsw_sp_router_fibmr_vif_del(mlxsw_sp,\n+\t\t\t\t\t &fib_work->ven_info);\n+\t\tdev_put(fib_work->ven_info.dev);\n+\t\tbreak;\n+\tcase FIB_EVENT_RULE_ADD: /* fall through */\n+\tcase FIB_EVENT_RULE_DEL:\n+\t\trule = fib_work->fr_info.rule;\n+\t\tif (!ipmr_rule_default(rule) && !rule->l3mdev)\n+\t\t\tmlxsw_sp_router_fib_abort(mlxsw_sp);\n+\t\tfib_rule_put(rule);\n+\t\tbreak;\n+\t}\n+\trtnl_unlock();\n+\tkfree(fib_work);\n+}\n+\n static void mlxsw_sp_router_fib4_event(struct mlxsw_sp_fib_event_work *fib_work,\n \t\t\t\t struct fib_notifier_info *info)\n {\n@@ -4860,6 +5001,30 @@ static void mlxsw_sp_router_fib6_event(struct mlxsw_sp_fib_event_work *fib_work,\n \t}\n }\n \n+static void\n+mlxsw_sp_router_fibmr_event(struct mlxsw_sp_fib_event_work *fib_work,\n+\t\t\t struct fib_notifier_info *info)\n+{\n+\tswitch (fib_work->event) {\n+\tcase FIB_EVENT_ENTRY_REPLACE: /* fall through */\n+\tcase FIB_EVENT_ENTRY_ADD: /* fall through */\n+\tcase FIB_EVENT_ENTRY_DEL:\n+\t\tmemcpy(&fib_work->men_info, info, sizeof(fib_work->men_info));\n+\t\tipmr_cache_hold(fib_work->men_info.mfc);\n+\t\tbreak;\n+\tcase FIB_EVENT_VIF_ADD: /* fall through */\n+\tcase FIB_EVENT_VIF_DEL:\n+\t\tmemcpy(&fib_work->ven_info, info, sizeof(fib_work->ven_info));\n+\t\tdev_hold(fib_work->ven_info.dev);\n+\t\tbreak;\n+\tcase FIB_EVENT_RULE_ADD: /* fall through */\n+\tcase FIB_EVENT_RULE_DEL:\n+\t\tmemcpy(&fib_work->fr_info, info, sizeof(fib_work->fr_info));\n+\t\tfib_rule_get(fib_work->fr_info.rule);\n+\t\tbreak;\n+\t}\n+}\n+\n /* Called with rcu_read_lock() */\n static int mlxsw_sp_router_fib_event(struct notifier_block *nb,\n \t\t\t\t unsigned long event, void *ptr)\n@@ -4889,6 +5054,10 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb,\n \t\tINIT_WORK(&fib_work->work, mlxsw_sp_router_fib6_event_work);\n \t\tmlxsw_sp_router_fib6_event(fib_work, info);\n \t\tbreak;\n+\tcase RTNL_FAMILY_IPMR:\n+\t\tINIT_WORK(&fib_work->work, mlxsw_sp_router_fibmr_event_work);\n+\t\tmlxsw_sp_router_fibmr_event(fib_work, info);\n+\t\tbreak;\n \t}\n \n \tmlxsw_core_schedule_work(&fib_work->work);\n@@ -5102,12 +5271,18 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,\n \tif (err)\n \t\tgoto err_configure;\n \n+\terr = mlxsw_sp_mr_rif_add(vr->mr4_table, rif);\n+\tif (err)\n+\t\tgoto err_mr_rif_add;\n+\n \tmlxsw_sp_rif_counters_alloc(rif);\n \tmlxsw_sp->router->rifs[rif_index] = rif;\n \tvr->rif_count++;\n \n \treturn rif;\n \n+err_mr_rif_add:\n+\tops->deconfigure(rif);\n err_configure:\n \tif (fid)\n \t\tmlxsw_sp_fid_put(fid);\n@@ -5132,6 +5307,7 @@ void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif)\n \tvr->rif_count--;\n \tmlxsw_sp->router->rifs[rif->rif_index] = NULL;\n \tmlxsw_sp_rif_counters_free(rif);\n+\tmlxsw_sp_mr_rif_del(vr->mr4_table, rif);\n \tops->deconfigure(rif);\n \tif (fid)\n \t\t/* Loopback RIFs are not associated with a FID. */\n@@ -5994,6 +6170,10 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp)\n \tif (err)\n \t\tgoto err_lpm_init;\n \n+\terr = mlxsw_sp_mr_init(mlxsw_sp, &mlxsw_sp_mr_tcam_ops);\n+\tif (err)\n+\t\tgoto err_mr_init;\n+\n \terr = mlxsw_sp_vrs_init(mlxsw_sp);\n \tif (err)\n \t\tgoto err_vrs_init;\n@@ -6015,6 +6195,8 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp)\n err_neigh_init:\n \tmlxsw_sp_vrs_fini(mlxsw_sp);\n err_vrs_init:\n+\tmlxsw_sp_mr_fini(mlxsw_sp);\n+err_mr_init:\n \tmlxsw_sp_lpm_fini(mlxsw_sp);\n err_lpm_init:\n \trhashtable_destroy(&mlxsw_sp->router->nexthop_group_ht);\n@@ -6036,6 +6218,7 @@ void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp)\n \tunregister_fib_notifier(&mlxsw_sp->router->fib_nb);\n \tmlxsw_sp_neigh_fini(mlxsw_sp);\n \tmlxsw_sp_vrs_fini(mlxsw_sp);\n+\tmlxsw_sp_mr_fini(mlxsw_sp);\n \tmlxsw_sp_lpm_fini(mlxsw_sp);\n \trhashtable_destroy(&mlxsw_sp->router->nexthop_group_ht);\n \trhashtable_destroy(&mlxsw_sp->router->nexthop_ht);\n", "prefixes": [ "net-next", "10/12" ] }