get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 534135,
    "url": "http://patchwork.ozlabs.org/api/patches/534135/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1445471236-35918-12-git-send-email-catherine.sullivan@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1445471236-35918-12-git-send-email-catherine.sullivan@intel.com>",
    "list_archive_url": null,
    "date": "2015-10-21T23:47:12",
    "name": "[next,S19,11/15] i40evf: handle many MAC filters correctly",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "19e112b240df976b16b276e4e1b35bb22fcea6cc",
    "submitter": {
        "id": 13931,
        "url": "http://patchwork.ozlabs.org/api/people/13931/?format=api",
        "name": "Catherine Sullivan",
        "email": "catherine.sullivan@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1445471236-35918-12-git-send-email-catherine.sullivan@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/534135/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/534135/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 49400141310\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 22 Oct 2015 10:48:47 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9619A87F81;\n\tWed, 21 Oct 2015 23:48:46 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id W1GsuWqw0wvL; Wed, 21 Oct 2015 23:48:44 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8B46287FA7;\n\tWed, 21 Oct 2015 23:48:44 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id E149F1C04C3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Oct 2015 23:48:41 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id DD1598AFA0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Oct 2015 23:48:41 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id KW+SLi1s+x0r for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Oct 2015 23:48:41 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 50C6488EA9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Oct 2015 23:48:41 +0000 (UTC)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 21 Oct 2015 16:48:41 -0700",
            "from catheri1-tigger.jf.intel.com ([134.134.176.92])\n\tby fmsmga001.fm.intel.com with ESMTP; 21 Oct 2015 16:48:41 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,179,1444719600\"; d=\"scan'208\";a=\"816562641\"",
        "From": "Catherine Sullivan <catherine.sullivan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 21 Oct 2015 19:47:12 -0400",
        "Message-Id": "<1445471236-35918-12-git-send-email-catherine.sullivan@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "In-Reply-To": "<1445471236-35918-1-git-send-email-catherine.sullivan@intel.com>",
        "References": "<1445471236-35918-1-git-send-email-catherine.sullivan@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S19 11/15] i40evf: handle many MAC\n\tfilters correctly",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "From: Mitch Williams <mitch.a.williams@intel.com>\n\nWhen a lot (many hundreds) of MAC or VLAN filters are added at one time,\nwe can overflow the Admin Queue buffer size with all the requests.\nUnfortunately, the driver would then calculate the message size\nincorrectly, causing it to be rejected by the PF. Furthermore, there was\nno mechanism to trigger another request to allow for configuring the\nrest of the filters that didn't fit into the first request.\n\nTo fix this, recalculate the correct buffer size when we detect the\noverflow condition instead of just assuming the max buffer size. Also,\ndon't clear the request bit in adapter->aq_required when we have an\noverflow, so that the rest of the filters can be processed later.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\nChange-ID: Idd7cbbc5af31315e0dcb1b10e6a02ad9817ce65c\n\n---\nTesting-hints: 5645131, 5645133\nBring up a VF and add 2000 IPv6 addresses to it. Before this patch, it\nwill crash. After this patch, it will crash less horribly.\n .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 32 ++++++++++++++++------\n 1 file changed, 24 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\nindex 091ef6a..46b0516 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n@@ -391,6 +391,7 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)\n \tstruct i40e_virtchnl_ether_addr_list *veal;\n \tint len, i = 0, count = 0;\n \tstruct i40evf_mac_filter *f;\n+\tbool more = false;\n \n \tif (adapter->current_op != I40E_VIRTCHNL_OP_UNKNOWN) {\n \t\t/* bail because we already have a command pending */\n@@ -415,7 +416,9 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)\n \t\tcount = (I40EVF_MAX_AQ_BUF_SIZE -\n \t\t\t sizeof(struct i40e_virtchnl_ether_addr_list)) /\n \t\t\tsizeof(struct i40e_virtchnl_ether_addr);\n-\t\tlen = I40EVF_MAX_AQ_BUF_SIZE;\n+\t\tlen = sizeof(struct i40e_virtchnl_ether_addr_list) +\n+\t\t      (count * sizeof(struct i40e_virtchnl_ether_addr));\n+\t\tmore = true;\n \t}\n \n \tveal = kzalloc(len, GFP_ATOMIC);\n@@ -431,7 +434,8 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)\n \t\t\tf->add = false;\n \t\t}\n \t}\n-\tadapter->aq_required &= ~I40EVF_FLAG_AQ_ADD_MAC_FILTER;\n+\tif (!more)\n+\t\tadapter->aq_required &= ~I40EVF_FLAG_AQ_ADD_MAC_FILTER;\n \ti40evf_send_pf_msg(adapter, I40E_VIRTCHNL_OP_ADD_ETHER_ADDRESS,\n \t\t\t   (u8 *)veal, len);\n \tkfree(veal);\n@@ -450,6 +454,7 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)\n \tstruct i40e_virtchnl_ether_addr_list *veal;\n \tstruct i40evf_mac_filter *f, *ftmp;\n \tint len, i = 0, count = 0;\n+\tbool more = false;\n \n \tif (adapter->current_op != I40E_VIRTCHNL_OP_UNKNOWN) {\n \t\t/* bail because we already have a command pending */\n@@ -474,7 +479,9 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)\n \t\tcount = (I40EVF_MAX_AQ_BUF_SIZE -\n \t\t\t sizeof(struct i40e_virtchnl_ether_addr_list)) /\n \t\t\tsizeof(struct i40e_virtchnl_ether_addr);\n-\t\tlen = I40EVF_MAX_AQ_BUF_SIZE;\n+\t\tlen = sizeof(struct i40e_virtchnl_ether_addr_list) +\n+\t\t      (count * sizeof(struct i40e_virtchnl_ether_addr));\n+\t\tmore = true;\n \t}\n \tveal = kzalloc(len, GFP_ATOMIC);\n \tif (!veal)\n@@ -490,7 +497,8 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)\n \t\t\tkfree(f);\n \t\t}\n \t}\n-\tadapter->aq_required &= ~I40EVF_FLAG_AQ_DEL_MAC_FILTER;\n+\tif (!more)\n+\t\tadapter->aq_required &= ~I40EVF_FLAG_AQ_DEL_MAC_FILTER;\n \ti40evf_send_pf_msg(adapter, I40E_VIRTCHNL_OP_DEL_ETHER_ADDRESS,\n \t\t\t   (u8 *)veal, len);\n \tkfree(veal);\n@@ -509,6 +517,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)\n \tstruct i40e_virtchnl_vlan_filter_list *vvfl;\n \tint len, i = 0, count = 0;\n \tstruct i40evf_vlan_filter *f;\n+\tbool more = false;\n \n \tif (adapter->current_op != I40E_VIRTCHNL_OP_UNKNOWN) {\n \t\t/* bail because we already have a command pending */\n@@ -534,7 +543,9 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)\n \t\tcount = (I40EVF_MAX_AQ_BUF_SIZE -\n \t\t\t sizeof(struct i40e_virtchnl_vlan_filter_list)) /\n \t\t\tsizeof(u16);\n-\t\tlen = I40EVF_MAX_AQ_BUF_SIZE;\n+\t\tlen = sizeof(struct i40e_virtchnl_vlan_filter_list) +\n+\t\t      (count * sizeof(u16));\n+\t\tmore = true;\n \t}\n \tvvfl = kzalloc(len, GFP_ATOMIC);\n \tif (!vvfl)\n@@ -549,7 +560,8 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)\n \t\t\tf->add = false;\n \t\t}\n \t}\n-\tadapter->aq_required &= ~I40EVF_FLAG_AQ_ADD_VLAN_FILTER;\n+\tif (!more)\n+\t\tadapter->aq_required &= ~I40EVF_FLAG_AQ_ADD_VLAN_FILTER;\n \ti40evf_send_pf_msg(adapter, I40E_VIRTCHNL_OP_ADD_VLAN, (u8 *)vvfl, len);\n \tkfree(vvfl);\n }\n@@ -567,6 +579,7 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)\n \tstruct i40e_virtchnl_vlan_filter_list *vvfl;\n \tstruct i40evf_vlan_filter *f, *ftmp;\n \tint len, i = 0, count = 0;\n+\tbool more = false;\n \n \tif (adapter->current_op != I40E_VIRTCHNL_OP_UNKNOWN) {\n \t\t/* bail because we already have a command pending */\n@@ -592,7 +605,9 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)\n \t\tcount = (I40EVF_MAX_AQ_BUF_SIZE -\n \t\t\t sizeof(struct i40e_virtchnl_vlan_filter_list)) /\n \t\t\tsizeof(u16);\n-\t\tlen = I40EVF_MAX_AQ_BUF_SIZE;\n+\t\tlen = sizeof(struct i40e_virtchnl_vlan_filter_list) +\n+\t\t      (count * sizeof(u16));\n+\t\tmore = true;\n \t}\n \tvvfl = kzalloc(len, GFP_ATOMIC);\n \tif (!vvfl)\n@@ -608,7 +623,8 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)\n \t\t\tkfree(f);\n \t\t}\n \t}\n-\tadapter->aq_required &= ~I40EVF_FLAG_AQ_DEL_VLAN_FILTER;\n+\tif (!more)\n+\t\tadapter->aq_required &= ~I40EVF_FLAG_AQ_DEL_VLAN_FILTER;\n \ti40evf_send_pf_msg(adapter, I40E_VIRTCHNL_OP_DEL_VLAN, (u8 *)vvfl, len);\n \tkfree(vvfl);\n }\n",
    "prefixes": [
        "next",
        "S19",
        "11/15"
    ]
}