get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 833726,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/833726/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20171103090344.19444-14-jiri@resnulli.us/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20171103090344.19444-14-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-11-03T09:03:41",
    "name": "[net-next,13/16] mlxsw: spectrum: Support IPIP underlay VRF migration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b299812d963443643fbebb1f4ee290c3034df9bf",
    "submitter": {
        "id": 15321,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/15321/?format=api",
        "name": "Jiri Pirko",
        "email": "jiri@resnulli.us"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20171103090344.19444-14-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 11677,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/11677/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=11677",
            "date": "2017-11-03T09:03:28",
            "name": "mlxsw: Handle changes in GRE configuration",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/11677/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/833726/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/833726/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=\"pW6HaGse\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3ySwxh3qpxz9sNc\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  3 Nov 2017 20:04:24 +1100 (AEDT)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755590AbdKCJEW (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 3 Nov 2017 05:04:22 -0400",
            "from mail-wm0-f67.google.com ([74.125.82.67]:47155 \"EHLO\n\tmail-wm0-f67.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932609AbdKCJD5 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 3 Nov 2017 05:03:57 -0400",
            "by mail-wm0-f67.google.com with SMTP id r196so15344wmf.2\n\tfor <netdev@vger.kernel.org>; Fri, 03 Nov 2017 02:03:56 -0700 (PDT)",
            "from localhost (ip-94-113-127-32.net.upcbroadband.cz.\n\t[94.113.127.32]) by smtp.gmail.com with ESMTPSA id\n\tn2sm4307871wmd.39.2017.11.03.02.03.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 03 Nov 2017 02:03:55 -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=dEX/vI2if4zPj9sp+qoyxusazJJJG9R8F4AgzHZVXEA=;\n\tb=pW6HaGseaIQIMNIeelafhyLwy+OeIuWIbUrJk4qPRluQhf+P26J6dJcDiuj7yhZjHM\n\tYkyLYsSU1UGESOazjg2KzqoR4hlzgrD27cHNMRKqwf/LdqJps7fZG83ZryrXRwteJQmY\n\tfMClE8s+EFX/i/5aMLMO8XBfRRMDl5FFxPhK94M1qVw8Pv49caIcA3e9lCshBlu29fgK\n\tQtcazaldvKzwLxmp6/6pC+wO3rl6ZU1ArTqE5wv1ZeIycPAxT+wOfWNsWiPD70zkOADU\n\tL0j/cn4XEPSH7MhqrC175XxTXiDbqQeUCx5xrVQD4/vbnDUDDFIa3vDWX4i7Fpv/A65k\n\tpcLw==",
        "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=dEX/vI2if4zPj9sp+qoyxusazJJJG9R8F4AgzHZVXEA=;\n\tb=Xwni2+ccGj8PzrifY5SBLN9ghhepdb4QdfovWSu+FktivocqsVlbaeCJudoP7+xeOc\n\t3WR9tBB9eKm+7QkODCe0ogWCFoxkNjySe+mSq0t4azHQfXKM6qw1u4EFsTH6DNk3hWC/\n\t8aGIZSLg36/5JQrPsh0p1WSiSyn1eBJnOrMBYYd1Kx4S48MEZJIgQWnq8JH17l3euwHY\n\thk/V2Gg5shbG3Cv9ilyyJJKzpVPydsbtu7//cONY3uwskhHEaJVP4eBlFY4E6ovqaVfC\n\thuCiDmNhyhfJZbL1Qq0sq/iH6DHaoe0dQ8YEt3Elcg4awUOgeW3gMreIAgCxih+NTcPm\n\tuVkw==",
        "X-Gm-Message-State": "AMCzsaUO5R5wCJLPjOQgjIOw3vkfP8zpK58GE8MxvHmsBO6dNabdjez3\n\tr+QTqSEaC9hLSb+qVTsVf+1JgasJ",
        "X-Google-Smtp-Source": "ABhQp+TQKfqXed20XYniGg2TRXdzd5V1+n8F5mbWnhsTHlM7IC8Fw0S6kHolTGG4PpNVyCQcBsy3aA==",
        "X-Received": "by 10.28.69.8 with SMTP id s8mr3301435wma.65.1509699835831;\n\tFri, 03 Nov 2017 02:03:55 -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 13/16] mlxsw: spectrum: Support IPIP underlay VRF\n\tmigration",
        "Date": "Fri,  3 Nov 2017 10:03:41 +0100",
        "Message-Id": "<20171103090344.19444-14-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20171103090344.19444-1-jiri@resnulli.us>",
        "References": "<20171103090344.19444-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\nWhen a bound device of a tunnel netdevice changes VRF, the loopback RIF\nthat backs the tunnel needs to be updated and existing encapsulating\nroutes need to be refreshed.\n\nNote that several tunnels can share the same bound device, in which case\nall the impacted tunnels need to be updated.\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 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |   3 +\n drivers/net/ethernet/mellanox/mlxsw/spectrum.h     |   7 ++\n .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 100 +++++++++++++++++++++\n 3 files changed, 110 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c\nindex 55bb366..63e5087 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c\n@@ -4545,6 +4545,9 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *nb,\n \tif (mlxsw_sp_netdev_is_ipip_ol(mlxsw_sp, dev))\n \t\terr = mlxsw_sp_netdevice_ipip_ol_event(mlxsw_sp, dev,\n \t\t\t\t\t\t       event, ptr);\n+\telse if (mlxsw_sp_netdev_is_ipip_ul(mlxsw_sp, dev))\n+\t\terr = mlxsw_sp_netdevice_ipip_ul_event(mlxsw_sp, dev,\n+\t\t\t\t\t\t       event, ptr);\n \telse if (event == NETDEV_CHANGEADDR || event == NETDEV_CHANGEMTU)\n \t\terr = mlxsw_sp_netdevice_router_port_event(dev);\n \telse if (mlxsw_sp_is_vrf_event(event, ptr))\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h\nindex 07cba52..47dd7e0 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h\n@@ -398,10 +398,17 @@ int mlxsw_sp_netdevice_vrf_event(struct net_device *l3_dev, unsigned long event,\n \t\t\t\t struct netdev_notifier_changeupper_info *info);\n bool mlxsw_sp_netdev_is_ipip_ol(const struct mlxsw_sp *mlxsw_sp,\n \t\t\t\tconst struct net_device *dev);\n+bool mlxsw_sp_netdev_is_ipip_ul(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\tconst struct net_device *dev);\n int mlxsw_sp_netdevice_ipip_ol_event(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t     struct net_device *l3_dev,\n \t\t\t\t     unsigned long event,\n \t\t\t\t     struct netdev_notifier_info *info);\n+int\n+mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct net_device *l3_dev,\n+\t\t\t\t unsigned long event,\n+\t\t\t\t struct netdev_notifier_info *info);\n void\n mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);\n void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif);\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\nindex 832bfa1..aa7b820 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -1257,6 +1257,33 @@ mlxsw_sp_ipip_entry_find_by_ol_dev(struct mlxsw_sp *mlxsw_sp,\n \treturn NULL;\n }\n \n+static struct mlxsw_sp_ipip_entry *\n+mlxsw_sp_ipip_entry_find_by_ul_dev(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t   const struct net_device *ul_dev,\n+\t\t\t\t   struct mlxsw_sp_ipip_entry *start)\n+{\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry;\n+\n+\tipip_entry = list_prepare_entry(start, &mlxsw_sp->router->ipip_list,\n+\t\t\t\t\tipip_list_node);\n+\tlist_for_each_entry_continue(ipip_entry, &mlxsw_sp->router->ipip_list,\n+\t\t\t\t     ipip_list_node) {\n+\t\tstruct net_device *ipip_ul_dev =\n+\t\t\t__mlxsw_sp_ipip_netdev_ul_dev_get(ipip_entry->ol_dev);\n+\n+\t\tif (ipip_ul_dev == ul_dev)\n+\t\t\treturn ipip_entry;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n+bool mlxsw_sp_netdev_is_ipip_ul(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\tconst struct net_device *dev)\n+{\n+\treturn mlxsw_sp_ipip_entry_find_by_ul_dev(mlxsw_sp, dev, NULL);\n+}\n+\n static bool mlxsw_sp_netdevice_ipip_can_offload(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t\t\tconst struct net_device *ol_dev,\n \t\t\t\t\t\tenum mlxsw_sp_ipip_type ipipt)\n@@ -1434,6 +1461,16 @@ static int mlxsw_sp_netdevice_ipip_ol_vrf_event(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t\t\t   true, false, false, extack);\n }\n \n+static int\n+mlxsw_sp_netdevice_ipip_ul_vrf_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t     struct mlxsw_sp_ipip_entry *ipip_entry,\n+\t\t\t\t     struct net_device *ul_dev,\n+\t\t\t\t     struct netlink_ext_ack *extack)\n+{\n+\treturn __mlxsw_sp_ipip_entry_update_tunnel(mlxsw_sp, ipip_entry,\n+\t\t\t\t\t\t   true, true, false, extack);\n+}\n+\n void mlxsw_sp_ipip_entry_demote_tunnel(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t       struct mlxsw_sp_ipip_entry *ipip_entry)\n {\n@@ -1472,6 +1509,21 @@ mlxsw_sp_ipip_demote_tunnel_by_saddr(struct mlxsw_sp *mlxsw_sp,\n \treturn false;\n }\n \n+static void mlxsw_sp_ipip_demote_tunnel_by_ul_netdev(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t\t     struct net_device *ul_dev)\n+{\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry, *tmp;\n+\n+\tlist_for_each_entry_safe(ipip_entry, tmp, &mlxsw_sp->router->ipip_list,\n+\t\t\t\t ipip_list_node) {\n+\t\tstruct net_device *ipip_ul_dev =\n+\t\t\t__mlxsw_sp_ipip_netdev_ul_dev_get(ipip_entry->ol_dev);\n+\n+\t\tif (ipip_ul_dev == ul_dev)\n+\t\t\tmlxsw_sp_ipip_entry_demote_tunnel(mlxsw_sp, ipip_entry);\n+\t}\n+}\n+\n int mlxsw_sp_netdevice_ipip_ol_event(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t     struct net_device *ol_dev,\n \t\t\t\t     unsigned long event,\n@@ -1504,6 +1556,54 @@ int mlxsw_sp_netdevice_ipip_ol_event(struct mlxsw_sp *mlxsw_sp,\n \treturn 0;\n }\n \n+static int\n+__mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t   struct mlxsw_sp_ipip_entry *ipip_entry,\n+\t\t\t\t   struct net_device *ul_dev,\n+\t\t\t\t   unsigned long event,\n+\t\t\t\t   struct netdev_notifier_info *info)\n+{\n+\tstruct netdev_notifier_changeupper_info *chup;\n+\tstruct netlink_ext_ack *extack;\n+\n+\tswitch (event) {\n+\tcase NETDEV_CHANGEUPPER:\n+\t\tchup = container_of(info, typeof(*chup), info);\n+\t\textack = info->extack;\n+\t\tif (netif_is_l3_master(chup->upper_dev))\n+\t\t\treturn mlxsw_sp_netdevice_ipip_ul_vrf_event(mlxsw_sp,\n+\t\t\t\t\t\t\t\t    ipip_entry,\n+\t\t\t\t\t\t\t\t    ul_dev,\n+\t\t\t\t\t\t\t\t    extack);\n+\t\tbreak;\n+\t}\n+\treturn 0;\n+}\n+\n+int\n+mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct net_device *ul_dev,\n+\t\t\t\t unsigned long event,\n+\t\t\t\t struct netdev_notifier_info *info)\n+{\n+\tstruct mlxsw_sp_ipip_entry *ipip_entry = NULL;\n+\tint err;\n+\n+\twhile ((ipip_entry = mlxsw_sp_ipip_entry_find_by_ul_dev(mlxsw_sp,\n+\t\t\t\t\t\t\t\tul_dev,\n+\t\t\t\t\t\t\t\tipip_entry))) {\n+\t\terr = __mlxsw_sp_netdevice_ipip_ul_event(mlxsw_sp, ipip_entry,\n+\t\t\t\t\t\t\t ul_dev, event, info);\n+\t\tif (err) {\n+\t\t\tmlxsw_sp_ipip_demote_tunnel_by_ul_netdev(mlxsw_sp,\n+\t\t\t\t\t\t\t\t ul_dev);\n+\t\t\treturn err;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n struct mlxsw_sp_neigh_key {\n \tstruct neighbour *n;\n };\n",
    "prefixes": [
        "net-next",
        "13/16"
    ]
}