get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7186,
    "url": "http://patches.dpdk.org/api/patches/7186/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1443170678-7249-1-git-send-email-jingjing.wu@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1443170678-7249-1-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1443170678-7249-1-git-send-email-jingjing.wu@intel.com",
    "date": "2015-09-25T08:44:38",
    "name": "[dpdk-dev] i40e: workaround for Security issue in SR-IOV mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "01baacfc3bfa3d539d031d31dda291cb5b1e7f0e",
    "submitter": {
        "id": 47,
        "url": "http://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1443170678-7249-1-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/7186/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/7186/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 9D4CD8E56;\n\tFri, 25 Sep 2015 10:44:49 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 0AC71CF9\n\tfor <dev@dpdk.org>; Fri, 25 Sep 2015 10:44:47 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP; 25 Sep 2015 01:44:46 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga003.jf.intel.com with ESMTP; 25 Sep 2015 01:44:47 -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 t8P8ihLt022640;\n\tFri, 25 Sep 2015 16:44:43 +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 t8P8ieni007283; Fri, 25 Sep 2015 16:44:42 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8P8ie56007279; \n\tFri, 25 Sep 2015 16:44:40 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,585,1437462000\"; d=\"scan'208\";a=\"652050904\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 25 Sep 2015 16:44:38 +0800",
        "Message-Id": "<1443170678-7249-1-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Cc": "yulong.pei@intel.com",
        "Subject": "[dpdk-dev] [PATCH] i40e: workaround for Security issue in SR-IOV\n\tmode",
        "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": "In SR-IOV mode a VF sending LFC or PFC would throttle the entire port.\nThe workaround is to add a filter to drop pause frames from VFs from\nsending pause frames.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\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..6cc2172 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 transimited\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 a ethertype filter to drop all flow control frames transimited\n+\t * from VSIs. This is used to workaround the issue -- in SR-IOV mode\n+\t * where a VF sending LFC or PFC would throttle the entire port.\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"
    ]
}