get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 692499,
    "url": "http://patchwork.ozlabs.org/api/patches/692499/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1478639119-14656-12-git-send-email-bimmy.pujari@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": "<1478639119-14656-12-git-send-email-bimmy.pujari@intel.com>",
    "list_archive_url": null,
    "date": "2016-11-08T21:05:15",
    "name": "[next,S52-V2,11/15] i40e: restore workaround for removing default MAC filter",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "76acd9e7e20a4d5877a2f017f16704a2e791c130",
    "submitter": {
        "id": 68919,
        "url": "http://patchwork.ozlabs.org/api/people/68919/?format=api",
        "name": "Pujari, Bimmy",
        "email": "bimmy.pujari@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/1478639119-14656-12-git-send-email-bimmy.pujari@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/692499/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/692499/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3tD21n4pcCz9t1Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  9 Nov 2016 08:07:09 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 00620C131C;\n\tTue,  8 Nov 2016 21:07:08 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id rUuRwLS_okPv; Tue,  8 Nov 2016 21:07:05 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A5B26C13F9;\n\tTue,  8 Nov 2016 21:07:03 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0ADF01C22F9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  8 Nov 2016 21:07:01 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 096942E50D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  8 Nov 2016 21:07:01 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id JP9z+mUqRbz3 for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  8 Nov 2016 21:06:56 +0000 (UTC)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 5A01B31C54\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  8 Nov 2016 21:06:55 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga105.fm.intel.com with ESMTP; 08 Nov 2016 13:06:55 -0800",
            "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.167])\n\tby fmsmga002.fm.intel.com with ESMTP; 08 Nov 2016 13:06:54 -0800"
        ],
        "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.31,611,1473145200\"; d=\"scan'208\";\n\ta=\"1082486424\"",
        "From": "Bimmy Pujari <bimmy.pujari@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue,  8 Nov 2016 13:05:15 -0800",
        "Message-Id": "<1478639119-14656-12-git-send-email-bimmy.pujari@intel.com>",
        "X-Mailer": "git-send-email 2.4.11",
        "In-Reply-To": "<1478639119-14656-1-git-send-email-bimmy.pujari@intel.com>",
        "References": "<1478639119-14656-1-git-send-email-bimmy.pujari@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S52-V2 11/15] i40e: restore\n\tworkaround for removing default MAC filter",
        "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: Jacob Keller <jacob.e.keller@intel.com>\n\nA previous commit 53cb6e9e8949 (\"i40e: Removal of workaround for simple\nMAC address filter deletion\") removed a workaround for some\nfirmware versions which was reported to not be necessary in production\nNICs. Unfortunately this workaround is necessary in some configurations,\nspecifically the Ethernet Controller XL710 for 40GbE QSFP+ (8086:1583).\n\nWithout this patch, the mentioned NICs with current firmware exhibit\nissues when adding VLANs, as outlined by the following reproduction:\n\n  $modprobe i40e\n  $ip link set <device> up\n  $ip link add link <device> vlan100 type vlan id 100\n  $dmesg | tail\n  <snip>\n  kernel: i40e 0000:82:00.0: Error I40E_AQ_RC_EINVAL adding RX\nfilters on PF, promiscuous mode forced on\n\nThis results in filters being marked as FAILED and setting the device in\npromiscuous mode.\n\nThe root cause of receiving the -EINVAL error response appears to be due\nto a conflict with the default MAC filter which still exists on the\ndefault firmware for this device. Attempting to add a new VLAN filter on\nthe default MAC address conflicts with the IGNORE_VLAN setting on the\ndefault rule.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nChange-ID: I4d8f6d48ac5f60cfe981b3baad30eb4d7c170d61\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 41 +++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 161f512..ef6eb19 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -1226,6 +1226,39 @@ bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi)\n }\n \n /**\n+ * i40e_rm_default_mac_filter - Remove the default MAC filter set by NVM\n+ * @vsi: the PF Main VSI - inappropriate for any other VSI\n+ * @macaddr: the MAC address\n+ *\n+ * Remove whatever filter the firmware set up so the driver can manage\n+ * its own filtering intelligently.\n+ **/\n+static void i40e_rm_default_mac_filter(struct i40e_vsi *vsi, u8 *macaddr)\n+{\n+\tstruct i40e_aqc_remove_macvlan_element_data element;\n+\tstruct i40e_pf *pf = vsi->back;\n+\n+\t/* Only appropriate for the PF main VSI */\n+\tif (vsi->type != I40E_VSI_MAIN)\n+\t\treturn;\n+\n+\tmemset(&element, 0, sizeof(element));\n+\tether_addr_copy(element.mac_addr, macaddr);\n+\telement.vlan_tag = 0;\n+\t/* Ignore error returns, some firmware does it this way... */\n+\telement.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH;\n+\ti40e_aq_remove_macvlan(&pf->hw, vsi->seid, &element, 1, NULL);\n+\n+\tmemset(&element, 0, sizeof(element));\n+\tether_addr_copy(element.mac_addr, macaddr);\n+\telement.vlan_tag = 0;\n+\t/* ...and some firmware does it this way. */\n+\telement.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH |\n+\t\t\tI40E_AQC_MACVLAN_DEL_IGNORE_VLAN;\n+\ti40e_aq_remove_macvlan(&pf->hw, vsi->seid, &element, 1, NULL);\n+}\n+\n+/**\n  * i40e_add_filter - Add a mac/vlan filter to the VSI\n  * @vsi: the VSI to be searched\n  * @macaddr: the MAC address\n@@ -9283,6 +9316,12 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \tif (vsi->type == I40E_VSI_MAIN) {\n \t\tSET_NETDEV_DEV(netdev, &pf->pdev->dev);\n \t\tether_addr_copy(mac_addr, hw->mac.perm_addr);\n+\t\t/* The following steps are necessary to prevent reception\n+\t\t * of tagged packets - some older NVM configurations load a\n+\t\t * default a MAC-VLAN filter that accepts any tagged packet\n+\t\t * which must be replaced by a normal filter.\n+\t\t */\n+\t\ti40e_rm_default_mac_filter(vsi, mac_addr);\n \t\tspin_lock_bh(&vsi->mac_filter_hash_lock);\n \t\ti40e_add_filter(vsi, mac_addr, I40E_VLAN_ANY);\n \t\tspin_unlock_bh(&vsi->mac_filter_hash_lock);\n@@ -9816,6 +9855,8 @@ static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi)\n \tpf->vsi[pf->lan_vsi]->tc_config.enabled_tc = 0;\n \tpf->vsi[pf->lan_vsi]->seid = pf->main_vsi_seid;\n \ti40e_vsi_config_tc(pf->vsi[pf->lan_vsi], enabled_tc);\n+\tif (vsi->type == I40E_VSI_MAIN)\n+\t\ti40e_rm_default_mac_filter(vsi, pf->hw.mac.perm_addr);\n \n \t/* assign it some queues */\n \tret = i40e_alloc_rings(vsi);\n",
    "prefixes": [
        "next",
        "S52-V2",
        "11/15"
    ]
}