get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816259,
    "url": "http://patchwork.ozlabs.org/api/patches/816259/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170920141516.1402-9-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": "<20170920141516.1402-9-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-09-20T14:15:08",
    "name": "[net-next,08/16] mlxsw: spectrum_switchdev: Don't write mids to the HW when mc is disabled",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a07d1359dc7ef6e6ecc7c1a7fd3dbcee2fa4e2c2",
    "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/20170920141516.1402-9-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 4129,
            "url": "http://patchwork.ozlabs.org/api/series/4129/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4129",
            "date": "2017-09-20T14:15:00",
            "name": "mlxsw: Multicast flood update",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4129/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816259/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816259/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=\"mx2RSiQY\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xy1xq6B6Yz9sNr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 00:16:15 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751831AbdITOQN (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 20 Sep 2017 10:16:13 -0400",
            "from mail-wm0-f66.google.com ([74.125.82.66]:35674 \"EHLO\n\tmail-wm0-f66.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751722AbdITOPZ (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 20 Sep 2017 10:15:25 -0400",
            "by mail-wm0-f66.google.com with SMTP id e64so2588741wmi.2\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 07:15:25 -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\tw4sm1942165wrc.78.2017.09.20.07.15.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Sep 2017 07:15:24 -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=kNCEQg2qAWh3YAINa+WO+Y1uvC6o4/zhfZJR2twpUec=;\n\tb=mx2RSiQY0NLilYewHg67xlcyzpI3UCQfSMbszj/mXAaYtcF3a/eh7YYVPKhUaktx22\n\thHPiz2r535WJ48MKNYjSkq5dH66qXnEzzXqenqd5AJO6iCqHUL30jcAWIJ50r7gr+vXo\n\tnDiG/kla28ZrXUxHwAIiW9aEg+2H2ycm5zTeAQ1D5uCEHMht2+Q3HyKzRk2Y7gcEUUmS\n\tw0bsZAnAdm2M6u2qNU4QBTYqIe1JC+GlTLY9RVmTjDvP3rv+1c3xJR28Cca0IKWyWcru\n\tiMJkTaPTGNXAaD9X8io3M1CN0zgC6ns5JuKiRWSv6Ddn2Gv9e2HHBZ9mMZYIVJWcyvw7\n\teUXg==",
        "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=kNCEQg2qAWh3YAINa+WO+Y1uvC6o4/zhfZJR2twpUec=;\n\tb=XoZ7OwMnPZCZQ6+G+5ibnqoCMij58GrJya7izhEJI97VUxA7btI0DFcQzIoSpavrp4\n\tMGzTdUN5tc68UASW+aDW7WBB3Z57J6UHVNV706N9zXgBuaC69YYeb64BPYlyPvwwjRg8\n\texohzGJnyAg9MHv+jb0LfZIympouArv1nIV36zJi74vgEJ72hBR0OlPwkXbQzTc7TbnJ\n\tzOptwQ3LcXkCOUeiwI9/rWIbkthcOfnvaoLeGyLHjC046WI5+UlAMIFdo8Uv0T102ywd\n\tzGsIJgOTFh/iHUMyyRLbruHY7BmpIJTfNsG986bxYLaoU366ep9bG+NpwhoS+oL+U1/v\n\taflA==",
        "X-Gm-Message-State": "AHPjjUhrRnrmosahbXeHMGhqHbH+IgqNl/COXweCSduekMK1VZM3Z2lF\n\tujYDFEn1Zo87tXSDoiW9/0rn73gs",
        "X-Google-Smtp-Source": "AOwi7QDcIKHn5W6U3S3lYRqpP0avp06fQrU0W/j4d8TrK9w1Azjn0EB8dBsF47U0iVxZRoM9lQFzCQ==",
        "X-Received": "by 10.28.165.1 with SMTP id o1mr4588629wme.31.1505916924536;\n\tWed, 20 Sep 2017 07:15:24 -0700 (PDT)",
        "From": "Jiri Pirko <jiri@resnulli.us>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, nogahf@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com",
        "Subject": "[patch net-next 08/16] mlxsw: spectrum_switchdev: Don't write mids\n\tto the HW when mc is disabled",
        "Date": "Wed, 20 Sep 2017 16:15:08 +0200",
        "Message-Id": "<20170920141516.1402-9-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170920141516.1402-1-jiri@resnulli.us>",
        "References": "<20170920141516.1402-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: Nogah Frankel <nogahf@mellanox.com>\n\nDon't write multicast related data to the HW when mc is disabled.\nAlso, don't allocate mid id to new mids (so the remove function could know\nthat they weren't wrote to the HW)\n\nSigned-off-by: Nogah Frankel <nogahf@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n .../ethernet/mellanox/mlxsw/spectrum_switchdev.c    | 21 +++++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c\nindex 7f622de..cea257a 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c\n@@ -1290,6 +1290,9 @@ mlxsw_sp_mc_write_mdb_entry(struct mlxsw_sp *mlxsw_sp,\n static int mlxsw_sp_mc_remove_mdb_entry(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t\tstruct mlxsw_sp_mid *mid)\n {\n+\tif (!mid->in_hw)\n+\t\treturn 0;\n+\n \tclear_bit(mid->mid, mlxsw_sp->bridge->mids_bitmap);\n \tmid->in_hw = false;\n \treturn mlxsw_sp_port_mdb_op(mlxsw_sp, mid->addr, mid->fid, mid->mid,\n@@ -1319,11 +1322,15 @@ mlxsw_sp_mid *__mlxsw_sp_mc_alloc(struct mlxsw_sp *mlxsw_sp,\n \tether_addr_copy(mid->addr, addr);\n \tmid->fid = fid;\n \tmid->in_hw = false;\n+\n+\tif (!bridge_device->multicast_enabled)\n+\t\tgoto out;\n+\n \tif (!mlxsw_sp_mc_write_mdb_entry(mlxsw_sp, mid))\n \t\tgoto err_write_mdb_entry;\n \n+out:\n \tlist_add_tail(&mid->list, &bridge_device->mids_list);\n-\n \treturn mid;\n \n err_write_mdb_entry:\n@@ -1391,6 +1398,9 @@ static int mlxsw_sp_port_mdb_add(struct mlxsw_sp_port *mlxsw_sp_port,\n \t}\n \tset_bit(mlxsw_sp_port->local_port, mid->ports_in_mid);\n \n+\tif (!bridge_device->multicast_enabled)\n+\t\treturn 0;\n+\n \terr = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, true);\n \tif (err) {\n \t\tnetdev_err(dev, \"Unable to set SMID\\n\");\n@@ -1476,9 +1486,12 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port,\n \tstruct net_device *dev = mlxsw_sp_port->dev;\n \tint err;\n \n-\terr = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false);\n-\tif (err)\n-\t\tnetdev_err(dev, \"Unable to remove port from SMID\\n\");\n+\tif (bridge_port->bridge_device->multicast_enabled) {\n+\t\terr = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false);\n+\n+\t\tif (err)\n+\t\t\tnetdev_err(dev, \"Unable to remove port from SMID\\n\");\n+\t}\n \n \terr = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);\n \tif (err)\n",
    "prefixes": [
        "net-next",
        "08/16"
    ]
}