get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7734,
    "url": "https://patches.dpdk.org/api/patches/7734/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445236317-8138-1-git-send-email-jingjing.wu@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1445236317-8138-1-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1445236317-8138-1-git-send-email-jingjing.wu@intel.com",
    "date": "2015-10-19T06:31:57",
    "name": "[dpdk-dev,v3] i40e: Add a workaround to drop flow control frames from VFs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "291c4cf054cfc40817781da7ed8c56ec3128719e",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445236317-8138-1-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7734/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7734/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id EE11F8E7E;\n\tMon, 19 Oct 2015 08:32:10 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 408F18E7A\n\tfor <dev@dpdk.org>; Mon, 19 Oct 2015 08:32:09 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP; 18 Oct 2015 23:32:08 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 18 Oct 2015 23:32:07 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9J6W2Bj016760;\n\tMon, 19 Oct 2015 14:32:02 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t9J6VwBH008172; Mon, 19 Oct 2015 14:32:00 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9J6Vwc6008168; \n\tMon, 19 Oct 2015 14:31:58 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,700,1437462000\"; d=\"scan'208\";a=\"796669463\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 19 Oct 2015 14:31:57 +0800",
        "Message-Id": "<1445236317-8138-1-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1444720729-788-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1444720729-788-1-git-send-email-jingjing.wu@intel.com>",
        "Cc": "yulong.pei@intel.com",
        "Subject": "[dpdk-dev] [PATCH v3] i40e: Add a workaround to drop flow control\n\tframes from VFs",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch adds a workaround to drop flow control frames from being\ntransmitted from VSIs.\nWith this patch in place a malicious VF cannot send flow control or PFC\npackets out on the wire.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\nv3:\n - fix typo\nv2:\n - reword comments\n\n drivers/net/i40e/i40e_ethdev.c | 30 ++++++++++++++++++++++++++++++\n 1 file changed, 30 insertions(+)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 2dd9fdc..963e501 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -382,6 +382,30 @@ static inline void i40e_flex_payload_reg_init(struct i40e_hw *hw)\n \tI40E_WRITE_REG(hw, I40E_GLQF_PIT(17), 0x00007440);\n }\n \n+#define I40E_FLOW_CONTROL_ETHERTYPE  0x8808\n+\n+/*\n+ * Add a ethertype filter to drop all flow control frames transmitted\n+ * from VSIs.\n+*/\n+static void\n+i40e_add_tx_flow_control_drop_filter(struct i40e_pf *pf)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tuint16_t flags = I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC |\n+\t\t\tI40E_AQC_ADD_CONTROL_PACKET_FLAGS_DROP |\n+\t\t\tI40E_AQC_ADD_CONTROL_PACKET_FLAGS_TX;\n+\tint ret;\n+\n+\tret = i40e_aq_add_rem_control_packet_filter(hw, NULL,\n+\t\t\t\tI40E_FLOW_CONTROL_ETHERTYPE, flags,\n+\t\t\t\tpf->main_vsi_seid, 0,\n+\t\t\t\tTRUE, NULL, NULL);\n+\tif (ret)\n+\t\tPMD_INIT_LOG(ERR, \"Failed to add filter to drop flow control \"\n+\t\t\t\t  \" frames from VSIs.\");\n+}\n+\n static int\n eth_i40e_dev_init(struct rte_eth_dev *dev)\n {\n@@ -584,6 +608,12 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)\n \n \t/* enable uio intr after callback register */\n \trte_intr_enable(&(pci_dev->intr_handle));\n+\t/*\n+\t * Add an ethertype filter to drop all flow control frames transmitted\n+\t * from VSIs. By doing so, we stop VF from sending out PAUSE or PFC\n+\t * frames to wire.\n+\t */\n+\ti40e_add_tx_flow_control_drop_filter(pf);\n \n \t/* initialize mirror rule list */\n \tTAILQ_INIT(&pf->mirror_list);\n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}