get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2646,
    "url": "https://patches.dpdk.org/api/patches/2646/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1422495715-6450-3-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": "<1422495715-6450-3-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1422495715-6450-3-git-send-email-jingjing.wu@intel.com",
    "date": "2015-01-29T01:41:55",
    "name": "[dpdk-dev,2/2] i40e: enable internal switch of pf",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e4140a6430cb71d662ed3a49480adb2a0e57f5d4",
    "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/1422495715-6450-3-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2646/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2646/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 4EA455A95;\n\tThu, 29 Jan 2015 02:42:17 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id D3DF11F5\n\tfor <dev@dpdk.org>; Thu, 29 Jan 2015 02:42:11 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga103.fm.intel.com with ESMTP; 28 Jan 2015 17:35:58 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga003.jf.intel.com with ESMTP; 28 Jan 2015 17:34:57 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0T1g6sW009736;\n\tThu, 29 Jan 2015 09:42:06 +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 t0T1g2xt006499; Thu, 29 Jan 2015 09:42:04 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0T1g2qe006495; \n\tThu, 29 Jan 2015 09:42:02 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,484,1418112000\"; d=\"scan'208\";a=\"519388451\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 29 Jan 2015 09:41:55 +0800",
        "Message-Id": "<1422495715-6450-3-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1422495715-6450-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1422495715-6450-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] i40e: enable internal switch of pf",
        "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 enables PF's internal switch by setting ALLOWLOOPBACK\nflag when VEB is created. With this patch, traffic from PF can be\nswitched on the VEB.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n lib/librte_pmd_i40e/i40e_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 36 insertions(+)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex fe758c2..94fd36c 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -2854,6 +2854,40 @@ i40e_vsi_dump_bw_config(struct i40e_vsi *vsi)\n \treturn 0;\n }\n \n+/*\n+ * i40e_enable_pf_lb\n+ * @pf: pointer to the pf structure\n+ *\n+ * allow loopback on pf\n+ */\n+static inline void\n+i40e_enable_pf_lb(struct i40e_pf *pf)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tstruct i40e_vsi_context ctxt;\n+\tint ret;\n+\n+\tmemset(&ctxt, 0, sizeof(ctxt));\n+\tctxt.seid = pf->main_vsi_seid;\n+\tctxt.pf_num = hw->pf_id;\n+\tret = i40e_aq_get_vsi_params(hw, &ctxt, NULL);\n+\tif (ret) {\n+\t\tPMD_DRV_LOG(ERR, \"couldn't get pf vsi config, err %d, aq_err %d\",\n+\t\t\tret, hw->aq.asq_last_status);\n+\t\treturn;\n+\t}\n+\tctxt.flags = I40E_AQ_VSI_TYPE_PF;\n+\tctxt.info.valid_sections =\n+\t\trte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);\n+\tctxt.info.switch_id |=\n+\t\trte_cpu_to_le_16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);\n+\n+\tret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);\n+\tif (ret)\n+\t\tPMD_DRV_LOG(ERR, \"update vsi switch failed, aq_err=%d\\n\",\n+\t\t\thw->aq.asq_last_status);\n+}\n+\n /* Setup a VSI */\n struct i40e_vsi *\n i40e_vsi_setup(struct i40e_pf *pf,\n@@ -2889,6 +2923,8 @@ i40e_vsi_setup(struct i40e_pf *pf,\n \t\t\tPMD_DRV_LOG(ERR, \"VEB setup failed\");\n \t\t\treturn NULL;\n \t\t}\n+\t\t/* set ALLOWLOOPBACk on pf, when veb is created */\n+\t\ti40e_enable_pf_lb(pf);\n \t}\n \n \tvsi = rte_zmalloc(\"i40e_vsi\", sizeof(struct i40e_vsi), 0);\n",
    "prefixes": [
        "dpdk-dev",
        "2/2"
    ]
}