get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/809090/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 809090,
    "url": "http://patchwork.ozlabs.org/api/patches/809090/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170902152126.17286-17-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": "<20170902152126.17286-17-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-09-02T15:21:21",
    "name": "[net-next,16/21] mlxsw: spectrum_router: Support IPv4 underlay decap",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "45ec80ccc76776cdca2b641790c5080fd56ad551",
    "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/20170902152126.17286-17-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 1159,
            "url": "http://patchwork.ozlabs.org/api/series/1159/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1159",
            "date": "2017-09-02T15:21:05",
            "name": "mlxsw: Offloading GRE tunnels",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1159/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809090/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809090/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=\"gQVUWlXH\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl0GR34wjz9sQl\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun,  3 Sep 2017 01:22:23 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752813AbdIBPWV (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 2 Sep 2017 11:22:21 -0400",
            "from mail-wr0-f194.google.com ([209.85.128.194]:36512 \"EHLO\n\tmail-wr0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752766AbdIBPVz (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 2 Sep 2017 11:21:55 -0400",
            "by mail-wr0-f194.google.com with SMTP id 40so1350246wrv.3\n\tfor <netdev@vger.kernel.org>; Sat, 02 Sep 2017 08:21:54 -0700 (PDT)",
            "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\ta6sm1565322wme.16.2017.09.02.08.21.52\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 08:21:52 -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=Lt5NJWUtw557dBhsy6tXjuRWcVaDb3OODvw4n35sFOY=;\n\tb=gQVUWlXHcN22DyeOH9uX6SiFoVhCKrR/EGUxT/INKsO7mtnImD1rDnrM4z1Fd/caKL\n\tf5BZNxfoyJPQNVLHN69qPHHCdKiViQZDE1fzuX8dl4D0PgS6tZ59i01OsyG0rBqJpQNe\n\t6LTM67rYGqV/jDjm2bgg/M7Mz2lWOmWUagJ0xAncA3kgLdTLo6b5Q54O8/eLN40LjhNO\n\tKxIAcvBqlhtEw4IVpe3nWdhVhv/ZvHDpF2AXSBMLdCyXiadBHChbWt2IQuJwethAjyfF\n\t2nfi5XeQwQ4GA4c1SvZMALXYrKxTzv58qxb8hpRahAAM/hUUbzp8wRiFI/yaoBKL2xUA\n\tU8RA==",
        "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=Lt5NJWUtw557dBhsy6tXjuRWcVaDb3OODvw4n35sFOY=;\n\tb=r4OnjKS2Djb+aaMQlDnt1vvykQbnMFTV1pBvS6Cio/ntPyJsY63YDFuZrnUpAQXBut\n\t86uaWXappIPr+qzmtrrOF52c9gAJh7aIZNjB9yT2EHF5GRpxqQPnWJQOSj9H/pdM0pga\n\tGLrfCOTyCq92NAjHFF0Hm3U2cK1smIHVegvrZ357k2PBq8w/HHTzIA9KSY5A3/mNt/pQ\n\tPN9DE6N+2NmrgKPMODOOLUhMi81j0QQAyyjAdmN3md1bH9pyC1qUXFBz7ZKVWTioUZzD\n\t2WgqamYVsSkkYFYnX1rkkgiWyrBla28eN1tihrz+euNg4j47EeeCijXAYf3eFiGZbLqF\n\t8InA==",
        "X-Gm-Message-State": "AHPjjUjRG6aCfvajrfilPMnar6yjxeXFTyWu38xqJ4n1EBo5G2hyz6dJ\n\tmrK8lmOiqjbT8RXAlro=",
        "X-Google-Smtp-Source": "ADKCNb4UWuvSjK5FhuAvzvTsbYhBWkgMqPR1ID/oiBzBWhBlH8bWWFpR2PlRfqEVeBsosYbAqIrkgQ==",
        "X-Received": "by 10.223.193.14 with SMTP id r14mr3117277wre.64.1504365713149; \n\tSat, 02 Sep 2017 08:21:53 -0700 (PDT)",
        "From": "Jiri Pirko <jiri@resnulli.us>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, petrm@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com",
        "Subject": "[patch net-next 16/21] mlxsw: spectrum_router: Support IPv4\n\tunderlay decap",
        "Date": "Sat,  2 Sep 2017 17:21:21 +0200",
        "Message-Id": "<20170902152126.17286-17-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170902152126.17286-1-jiri@resnulli.us>",
        "References": "<20170902152126.17286-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: Petr Machata <petrm@mellanox.com>\n\nUnlike encapsulation, which is represented by a next hop forwarding to\nan IPIP tunnel, decapsulation is a type of local route. It is created\nfor local routes whose prefix corresponds to the local address of one of\noffloaded IPIP tunnels. When the tunnel is removed (i.e. all the encap\nnext hops are removed), the decap offload is migrated back to a trap for\nresolution in slow path.\n\nThis patch assumes that decap route is already present when encap route\nis added. A follow-up patch will fix this issue.\n\nNote that this patch only supports IPv4 underlay. Support for IPv6\nunderlay will be subject to follow-up work apart from this patchset.\n\nSigned-off-by: Petr Machata <petrm@mellanox.com>\nReviewed-by: Ido Schimmel <idosch@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h    |   7 +\n .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 141 ++++++++++++++++++++-\n .../net/ethernet/mellanox/mlxsw/spectrum_router.h  |   3 +\n 3 files changed, 146 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h\nindex 7b40aa2..cd986bd 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h\n@@ -36,6 +36,7 @@\n #define _MLXSW_IPIP_H_\n \n #include \"spectrum_router.h\"\n+#include <net/ip_fib.h>\n \n enum mlxsw_sp_ipip_type {\n \tMLXSW_SP_IPIP_TYPE_MAX,\n@@ -46,6 +47,7 @@ struct mlxsw_sp_ipip_entry {\n \tstruct net_device *ol_dev; /* Overlay. */\n \tstruct mlxsw_sp_rif_ipip_lb *ol_lb;\n \tunsigned int ref_count; /* Number of next hops using the tunnel. */\n+\tstruct mlxsw_sp_fib_entry *decap_fib_entry;\n \tstruct list_head ipip_list_node;\n };\n \n@@ -64,6 +66,11 @@ struct mlxsw_sp_ipip_ops {\n \tstruct mlxsw_sp_rif_ipip_lb_config\n \t(*ol_loopback_config)(struct mlxsw_sp *mlxsw_sp,\n \t\t\t      const struct net_device *ol_dev);\n+\n+\tint (*fib_entry_op)(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t    struct mlxsw_sp_ipip_entry *ipip_entry,\n+\t\t\t    enum mlxsw_reg_ralue_op op,\n+\t\t\t    u32 tunnel_index);\n };\n \n extern const struct mlxsw_sp_ipip_ops *mlxsw_sp_ipip_ops_arr[];\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\nindex 05afd53..0d09f81 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -381,6 +381,14 @@ enum mlxsw_sp_fib_entry_type {\n \tMLXSW_SP_FIB_ENTRY_TYPE_REMOTE,\n \tMLXSW_SP_FIB_ENTRY_TYPE_LOCAL,\n \tMLXSW_SP_FIB_ENTRY_TYPE_TRAP,\n+\n+\t/* This is a special case of local delivery, where a packet should be\n+\t * decapsulated on reception. Note that there is no corresponding ENCAP,\n+\t * because that's a type of next hop, not of FIB entry. (There can be\n+\t * several next hops in a REMOTE entry, and some of them may be\n+\t * encapsulating entries.)\n+\t */\n+\tMLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP,\n };\n \n struct mlxsw_sp_nexthop_group;\n@@ -394,12 +402,18 @@ struct mlxsw_sp_fib_node {\n \tstruct mlxsw_sp_fib_key key;\n };\n \n+struct mlxsw_sp_fib_entry_decap {\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry;\n+\tu32 tunnel_index;\n+};\n+\n struct mlxsw_sp_fib_entry {\n \tstruct list_head list;\n \tstruct mlxsw_sp_fib_node *fib_node;\n \tenum mlxsw_sp_fib_entry_type type;\n \tstruct list_head nexthop_group_node;\n \tstruct mlxsw_sp_nexthop_group *nh_group;\n+\tstruct mlxsw_sp_fib_entry_decap decap; /* Valid for decap entries. */\n };\n \n struct mlxsw_sp_fib4_entry {\n@@ -1031,6 +1045,48 @@ mlxsw_sp_ipip_entry_saddr_matches(struct mlxsw_sp *mlxsw_sp,\n \t       mlxsw_sp_l3addr_eq(&tun_saddr, &saddr);\n }\n \n+static int\n+mlxsw_sp_fib_entry_decap_init(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t      struct mlxsw_sp_fib_entry *fib_entry,\n+\t\t\t      struct mlxsw_sp_ipip_entry *ipip_entry)\n+{\n+\tu32 tunnel_index;\n+\tint err;\n+\n+\terr = mlxsw_sp_kvdl_alloc(mlxsw_sp, 1, &tunnel_index);\n+\tif (err)\n+\t\treturn err;\n+\n+\tipip_entry->decap_fib_entry = fib_entry;\n+\tfib_entry->decap.ipip_entry = ipip_entry;\n+\tfib_entry->decap.tunnel_index = tunnel_index;\n+\treturn 0;\n+}\n+\n+static void mlxsw_sp_fib_entry_decap_fini(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t  struct mlxsw_sp_fib_entry *fib_entry)\n+{\n+\t/* Unlink this node from the IPIP entry that it's the decap entry of. */\n+\tfib_entry->decap.ipip_entry->decap_fib_entry = NULL;\n+\tfib_entry->decap.ipip_entry = NULL;\n+\tmlxsw_sp_kvdl_free(mlxsw_sp, fib_entry->decap.tunnel_index);\n+}\n+\n+static int mlxsw_sp_fib_entry_update(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t     struct mlxsw_sp_fib_entry *fib_entry);\n+\n+static void\n+mlxsw_sp_ipip_entry_demote_decap(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct mlxsw_sp_ipip_entry *ipip_entry)\n+{\n+\tstruct mlxsw_sp_fib_entry *fib_entry = ipip_entry->decap_fib_entry;\n+\n+\tmlxsw_sp_fib_entry_decap_fini(mlxsw_sp, fib_entry);\n+\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP;\n+\n+\tmlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry);\n+}\n+\n static struct mlxsw_sp_ipip_entry *\n mlxsw_sp_ipip_entry_get(struct mlxsw_sp *mlxsw_sp,\n \t\t\tenum mlxsw_sp_ipip_type ipipt,\n@@ -1076,10 +1132,51 @@ mlxsw_sp_ipip_entry_put(struct mlxsw_sp *mlxsw_sp,\n {\n \tif (--ipip_entry->ref_count == 0) {\n \t\tlist_del(&ipip_entry->ipip_list_node);\n+\t\tif (ipip_entry->decap_fib_entry)\n+\t\t\tmlxsw_sp_ipip_entry_demote_decap(mlxsw_sp, ipip_entry);\n \t\tmlxsw_sp_ipip_entry_destroy(ipip_entry);\n \t}\n }\n \n+static bool\n+mlxsw_sp_ipip_entry_matches_decap(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t  const struct net_device *ul_dev,\n+\t\t\t\t  enum mlxsw_sp_l3proto ul_proto,\n+\t\t\t\t  union mlxsw_sp_l3addr ul_dip,\n+\t\t\t\t  struct mlxsw_sp_ipip_entry *ipip_entry)\n+{\n+\tu32 ul_tb_id = l3mdev_fib_table(ul_dev) ? : RT_TABLE_MAIN;\n+\tenum mlxsw_sp_ipip_type ipipt = ipip_entry->ipipt;\n+\tstruct net_device *ipip_ul_dev;\n+\n+\tif (mlxsw_sp->router->ipip_ops_arr[ipipt]->ul_proto != ul_proto)\n+\t\treturn false;\n+\n+\tipip_ul_dev = __mlxsw_sp_ipip_netdev_ul_dev_get(ipip_entry->ol_dev);\n+\treturn mlxsw_sp_ipip_entry_saddr_matches(mlxsw_sp, ul_proto, ul_dip,\n+\t\t\t\t\t\t ul_tb_id, ipip_entry) &&\n+\t       (!ipip_ul_dev || ipip_ul_dev == ul_dev);\n+}\n+\n+/* Given decap parameters, find the corresponding IPIP entry. */\n+static struct mlxsw_sp_ipip_entry *\n+mlxsw_sp_ipip_entry_find_by_decap(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t  const struct net_device *ul_dev,\n+\t\t\t\t  enum mlxsw_sp_l3proto ul_proto,\n+\t\t\t\t  union mlxsw_sp_l3addr ul_dip)\n+{\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry;\n+\n+\tlist_for_each_entry(ipip_entry, &mlxsw_sp->router->ipip_list,\n+\t\t\t    ipip_list_node)\n+\t\tif (mlxsw_sp_ipip_entry_matches_decap(mlxsw_sp, ul_dev,\n+\t\t\t\t\t\t      ul_proto, ul_dip,\n+\t\t\t\t\t\t      ipip_entry))\n+\t\t\treturn ipip_entry;\n+\n+\treturn NULL;\n+}\n+\n struct mlxsw_sp_neigh_key {\n \tstruct neighbour *n;\n };\n@@ -2186,9 +2283,6 @@ mlxsw_sp_nexthop_group_update(struct mlxsw_sp *mlxsw_sp,\n \treturn 0;\n }\n \n-static int mlxsw_sp_fib_entry_update(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t     struct mlxsw_sp_fib_entry *fib_entry);\n-\n static bool\n mlxsw_sp_fib_node_entry_is_first(const struct mlxsw_sp_fib_node *fib_node,\n \t\t\t\t const struct mlxsw_sp_fib_entry *fib_entry);\n@@ -2779,6 +2873,8 @@ mlxsw_sp_fib_entry_should_offload(const struct mlxsw_sp_fib_entry *fib_entry)\n \t\treturn !!nh_group->adj_index_valid;\n \tcase MLXSW_SP_FIB_ENTRY_TYPE_LOCAL:\n \t\treturn !!nh_group->nh_rif;\n+\tcase MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP:\n+\t\treturn true;\n \tdefault:\n \t\treturn false;\n \t}\n@@ -2810,7 +2906,8 @@ mlxsw_sp_fib4_entry_offload_set(struct mlxsw_sp_fib_entry *fib_entry)\n \tstruct mlxsw_sp_nexthop_group *nh_grp = fib_entry->nh_group;\n \tint i;\n \n-\tif (fib_entry->type == MLXSW_SP_FIB_ENTRY_TYPE_LOCAL) {\n+\tif (fib_entry->type == MLXSW_SP_FIB_ENTRY_TYPE_LOCAL ||\n+\t    fib_entry->type == MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP) {\n \t\tnh_grp->nexthops->key.fib_nh->nh_flags |= RTNH_F_OFFLOAD;\n \t\treturn;\n \t}\n@@ -3015,6 +3112,22 @@ static int mlxsw_sp_fib_entry_op_trap(struct mlxsw_sp *mlxsw_sp,\n \treturn mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ralue), ralue_pl);\n }\n \n+static int\n+mlxsw_sp_fib_entry_op_ipip_decap(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct mlxsw_sp_fib_entry *fib_entry,\n+\t\t\t\t enum mlxsw_reg_ralue_op op)\n+{\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry = fib_entry->decap.ipip_entry;\n+\tconst struct mlxsw_sp_ipip_ops *ipip_ops;\n+\n+\tif (WARN_ON(!ipip_entry))\n+\t\treturn -EINVAL;\n+\n+\tipip_ops = mlxsw_sp->router->ipip_ops_arr[ipip_entry->ipipt];\n+\treturn ipip_ops->fib_entry_op(mlxsw_sp, ipip_entry, op,\n+\t\t\t\t      fib_entry->decap.tunnel_index);\n+}\n+\n static int __mlxsw_sp_fib_entry_op(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t   struct mlxsw_sp_fib_entry *fib_entry,\n \t\t\t\t   enum mlxsw_reg_ralue_op op)\n@@ -3026,6 +3139,9 @@ static int __mlxsw_sp_fib_entry_op(struct mlxsw_sp *mlxsw_sp,\n \t\treturn mlxsw_sp_fib_entry_op_local(mlxsw_sp, fib_entry, op);\n \tcase MLXSW_SP_FIB_ENTRY_TYPE_TRAP:\n \t\treturn mlxsw_sp_fib_entry_op_trap(mlxsw_sp, fib_entry, op);\n+\tcase MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP:\n+\t\treturn mlxsw_sp_fib_entry_op_ipip_decap(mlxsw_sp,\n+\t\t\t\t\t\t\tfib_entry, op);\n \t}\n \treturn -EINVAL;\n }\n@@ -3060,11 +3176,23 @@ mlxsw_sp_fib4_entry_type_set(struct mlxsw_sp *mlxsw_sp,\n \t\t\t     const struct fib_entry_notifier_info *fen_info,\n \t\t\t     struct mlxsw_sp_fib_entry *fib_entry)\n {\n+\tunion mlxsw_sp_l3addr dip = { .addr4 = htonl(fen_info->dst) };\n+\tstruct net_device *dev = fen_info->fi->fib_dev;\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry;\n \tstruct fib_info *fi = fen_info->fi;\n \n \tswitch (fen_info->type) {\n-\tcase RTN_BROADCAST: /* fall through */\n \tcase RTN_LOCAL:\n+\t\tipip_entry = mlxsw_sp_ipip_entry_find_by_decap(mlxsw_sp, dev,\n+\t\t\t\t\t\t MLXSW_SP_L3_PROTO_IPV4, dip);\n+\t\tif (ipip_entry) {\n+\t\t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP;\n+\t\t\treturn mlxsw_sp_fib_entry_decap_init(mlxsw_sp,\n+\t\t\t\t\t\t\t     fib_entry,\n+\t\t\t\t\t\t\t     ipip_entry);\n+\t\t}\n+\t\t/* fall through */\n+\tcase RTN_BROADCAST:\n \t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP;\n \t\treturn 0;\n \tcase RTN_UNREACHABLE: /* fall through */\n@@ -3557,6 +3685,9 @@ mlxsw_sp_fib4_node_entry_unlink(struct mlxsw_sp *mlxsw_sp,\n {\n \tmlxsw_sp_fib_node_entry_del(mlxsw_sp, &fib4_entry->common);\n \tmlxsw_sp_fib4_node_list_remove(fib4_entry);\n+\n+\tif (fib4_entry->common.type == MLXSW_SP_FIB_ENTRY_TYPE_IPIP_DECAP)\n+\t\tmlxsw_sp_fib_entry_decap_fini(mlxsw_sp, &fib4_entry->common);\n }\n \n static void mlxsw_sp_fib4_entry_replace(struct mlxsw_sp *mlxsw_sp,\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h\nindex a5732aa..4276f5f 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h\n@@ -97,5 +97,8 @@ mlxsw_sp_neigh_entry_counter_update(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t    struct mlxsw_sp_neigh_entry *neigh_entry,\n \t\t\t\t    bool adding);\n bool mlxsw_sp_neigh_ipv6_ignore(struct mlxsw_sp_neigh_entry *neigh_entry);\n+union mlxsw_sp_l3addr\n+mlxsw_sp_ipip_netdev_saddr(enum mlxsw_sp_l3proto proto,\n+\t\t\t   const struct net_device *ol_dev);\n \n #endif /* _MLXSW_ROUTER_H_*/\n",
    "prefixes": [
        "net-next",
        "16/21"
    ]
}