get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 29732,
    "url": "https://patches.dpdk.org/api/patches/29732/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1507210100-69917-2-git-send-email-david.hunt@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": "<1507210100-69917-2-git-send-email-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1507210100-69917-2-git-send-email-david.hunt@intel.com",
    "date": "2017-10-05T13:28:12",
    "name": "[dpdk-dev,v7,1/9] net/i40e: add API to convert VF MAC to VF id",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "319fd4429469a19881efafb139e47b86dcb5e4aa",
    "submitter": {
        "id": 342,
        "url": "https://patches.dpdk.org/api/people/342/?format=api",
        "name": "Hunt, David",
        "email": "david.hunt@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1507210100-69917-2-git-send-email-david.hunt@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/29732/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/29732/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D017A1B23C;\n\tThu,  5 Oct 2017 15:28:28 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 95A741B22C\n\tfor <dev@dpdk.org>; Thu,  5 Oct 2017 15:28:27 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Oct 2017 06:28:27 -0700",
            "from silpixa00397898.ir.intel.com ([10.237.223.116])\n\tby orsmga004.jf.intel.com with ESMTP; 05 Oct 2017 06:28:25 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.42,481,1500966000\"; d=\"scan'208\";a=\"135515392\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "konstantin.ananyev@intel.com, jingjing.wu@intel.com,\n\tsantosh.shukla@caviumnetworks.com, \"Sexton,\n\tRory\" <rory.sexton@intel.com>, \n\tNemanja Marjanovic <nemanja.marjanovic@intel.com>,\n\tDavid Hunt <david.hunt@intel.com>",
        "Date": "Thu,  5 Oct 2017 14:28:12 +0100",
        "Message-Id": "<1507210100-69917-2-git-send-email-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1507210100-69917-1-git-send-email-david.hunt@intel.com>",
        "References": "<1507206350-215367-1-git-send-email-david.hunt@intel.com>\n\t<1507210100-69917-1-git-send-email-david.hunt@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 1/9] net/i40e: add API to convert VF MAC to VF\n\tid",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "From: \"Sexton, Rory\" <rory.sexton@intel.com>\n\nNeed a way to convert a vf id to a pf id on the host so as to query the pf\nfor relevant statistics which are used for the frequency changes in the\nvm_power_manager app. Used when profiles are passed down from the guest\nto the host, allowing the host to map the vfs to pfs.\n\nSigned-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>\nSigned-off-by: Rory Sexton <rory.sexton@intel.com>\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n drivers/net/i40e/rte_pmd_i40e.c           | 30 ++++++++++++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e.h           | 15 +++++++++++++++\n drivers/net/i40e/rte_pmd_i40e_version.map |  7 +++++++\n 3 files changed, 52 insertions(+)",
    "diff": "diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c\nindex f12b7f4..76d11dd 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.c\n+++ b/drivers/net/i40e/rte_pmd_i40e.c\n@@ -2115,3 +2115,33 @@ int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,\n \n \treturn 0;\n }\n+\n+int\n+rte_pmd_i40e_query_vfid_by_mac(uint8_t port, const struct ether_addr *vf_mac)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct ether_addr *mac;\n+\tstruct i40e_pf *pf;\n+\tint vf_id;\n+\tstruct i40e_pf_vf *vf;\n+\tuint16_t vf_num;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\tdev = &rte_eth_devices[port];\n+\n+\tif (!is_i40e_supported(dev))\n+\t\treturn -ENOTSUP;\n+\n+\tpf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\tvf_num = pf->vf_num;\n+\n+\tfor (vf_id = 0; vf_id < vf_num; vf_id++) {\n+\t\tvf = &pf->vfs[vf_id];\n+\t\tmac = &vf->mac_addr;\n+\n+\t\tif (is_same_ether_addr(mac, vf_mac))\n+\t\t\treturn vf_id;\n+\t}\n+\n+\treturn -EINVAL;\n+}\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h\nindex 356fa89..a355896 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.h\n+++ b/drivers/net/i40e/rte_pmd_i40e.h\n@@ -637,4 +637,19 @@ int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,\n \t\t\t\t       uint8_t mask,\n \t\t\t\t       uint32_t pkt_type);\n \n+/**\n+ * On the PF, find VF index based on VF MAC address\n+ *\n+ * @param port\n+ *    pointer to port identifier of the device\n+ * @param vf_mac\n+ *    the mac address of the vf to determine index of\n+ * @return\n+ *    The index of vfid If successful.\n+ *    -EINVAL: vf mac address does not exist for this port\n+ *    -ENOTSUP: i40e not supported for this port.\n+ */\n+int rte_pmd_i40e_query_vfid_by_mac(uint8_t port,\n+\t\t\t\t\tconst struct ether_addr *vf_mac);\n+\n #endif /* _PMD_I40E_H_ */\ndiff --git a/drivers/net/i40e/rte_pmd_i40e_version.map b/drivers/net/i40e/rte_pmd_i40e_version.map\nindex 20cc980..d8b74bd 100644\n--- a/drivers/net/i40e/rte_pmd_i40e_version.map\n+++ b/drivers/net/i40e/rte_pmd_i40e_version.map\n@@ -45,3 +45,10 @@ DPDK_17.08 {\n \trte_pmd_i40e_get_ddp_info;\n \n } DPDK_17.05;\n+\n+DPDK_17.11 {\n+\tglobal:\n+\n+\trte_pmd_i40e_query_vfid_by_mac;\n+\n+} DPDK_17.08;\n",
    "prefixes": [
        "dpdk-dev",
        "v7",
        "1/9"
    ]
}