get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1288675,
    "url": "http://patchwork.ozlabs.org/api/patches/1288675/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200512173553.39460-1-andre.guedes@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": "<20200512173553.39460-1-andre.guedes@intel.com>",
    "list_archive_url": null,
    "date": "2020-05-12T17:35:52",
    "name": "[1/2] igc: Reject NFC rules with multiple matches",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "4df6b2b87ba185f402a08ca735bc91b8721c4154",
    "submitter": {
        "id": 72323,
        "url": "http://patchwork.ozlabs.org/api/people/72323/?format=api",
        "name": "Andre Guedes",
        "email": "andre.guedes@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/20200512173553.39460-1-andre.guedes@intel.com/mbox/",
    "series": [
        {
            "id": 176436,
            "url": "http://patchwork.ozlabs.org/api/series/176436/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=176436",
            "date": "2020-05-12T17:35:53",
            "name": "[1/2] igc: Reject NFC rules with multiple matches",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/176436/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1288675/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1288675/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@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"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49M4j56lgpz9sRY\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 13 May 2020 03:36:09 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 66F6620417;\n\tTue, 12 May 2020 17:36:08 +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 5-EdsbdJiYCn; Tue, 12 May 2020 17:36:07 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4529620BF9;\n\tTue, 12 May 2020 17:36:07 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by ash.osuosl.org (Postfix) with ESMTP id B3D041BF23F\n for <intel-wired-lan@lists.osuosl.org>; Tue, 12 May 2020 17:36:05 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by silver.osuosl.org (Postfix) with ESMTP id 9673620BF9\n for <intel-wired-lan@lists.osuosl.org>; Tue, 12 May 2020 17:36:05 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id Er7gdN++x3qE for <intel-wired-lan@lists.osuosl.org>;\n Tue, 12 May 2020 17:36:03 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by silver.osuosl.org (Postfix) with ESMTPS id 7A4FB20417\n for <intel-wired-lan@lists.osuosl.org>; Tue, 12 May 2020 17:36:03 +0000 (UTC)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 May 2020 10:36:03 -0700",
            "from ksengupt-mobl1.amr.corp.intel.com ([10.254.97.57])\n by orsmga008.jf.intel.com with ESMTP; 12 May 2020 10:36:02 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "IronPort-SDR": [
            "\n OHprHnbGF96GwTFWzU81XNzR6jb+iYxGilhJbKvOuTeP5TDZYXbElW9nyz70K3rFqOJxrLx15O\n xEvZ0aLr+ieQ==",
            "\n wlo8OeF/fYYVpCqp57OAMQcLjXfIKGovxfJg4jHE5PpAOVQHOphq8w8GRvXhpPyYnqj8yLC7Bc\n u6D2Q8fJwiVg=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,384,1583222400\"; d=\"scan'208\";a=\"298094585\"",
        "From": "Andre Guedes <andre.guedes@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 12 May 2020 10:35:52 -0700",
        "Message-Id": "<20200512173553.39460-1-andre.guedes@intel.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH 1/2] igc: Reject NFC rules with multiple\n matches",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "The way rx queue assignment based on mac address, ethetype and vlan\npriority filtering operates in I225 doesn't allow us to properly support\nNFC rules with multiple matches.\n\nConsider the following example which assigns to queue 2 frames matching\nthe address MACADDR *and* ethertype ETYPE.\n\n$ ethtool -N eth0 flow-type ether dst <MACADDR> proto <ETYPE> queue 2\n\nWhen such rule is applied, we have 2 unwanted behaviors:\n\n    1) Any frame matching MACADDR will be assigned to queue 2. It\n       doesn't matter the ETYPE value.\n\n    2) Any accepted frame that has ethertype equals to ETYPE, no matter\n       the mac address, will be assigned to queue 2 as well.\n\nIn current code, multiple-match filters are accepted by the driver, even\nthough it doesn't support them properly. This patch adds a check for\nmultiple-match rules in igc_ethtool_is_nfc_rule_valid() so they are\nrejected.\n\nSigned-off-by: Andre Guedes <andre.guedes@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_ethtool.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c\nindex 247d0f5c4eb8..2214a5d3a259 100644\n--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c\n+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c\n@@ -1222,8 +1222,8 @@ static void igc_ethtool_init_nfc_rule(struct igc_nfc_rule *rule,\n  * @adapter: Pointer to adapter.\n  * @rule: Rule under evaluation.\n  *\n- * Rules with both destination and source MAC addresses are considered invalid\n- * since the driver doesn't support them.\n+ * The driver doesn't support rules with multiple matches so if more than\n+ * one bit in filter flags is set, @rule is considered invalid.\n  *\n  * Also, if there is already another rule with the same filter in a different\n  * location, @rule is considered invalid.\n@@ -1244,9 +1244,8 @@ static int igc_ethtool_check_nfc_rule(struct igc_adapter *adapter,\n \t\treturn -EINVAL;\n \t}\n \n-\tif (flags & IGC_FILTER_FLAG_DST_MAC_ADDR &&\n-\t    flags & IGC_FILTER_FLAG_SRC_MAC_ADDR) {\n-\t\tnetdev_dbg(dev, \"Filters with both dst and src are not supported\");\n+\tif (flags & (flags - 1)) {\n+\t\tnetdev_dbg(dev, \"Rule with multiple matches not supported\");\n \t\treturn -EOPNOTSUPP;\n \t}\n \n",
    "prefixes": [
        "1/2"
    ]
}