get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 11158,
    "url": "http://patches.dpdk.org/api/patches/11158/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1457419329-11915-2-git-send-email-helin.zhang@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": "<1457419329-11915-2-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1457419329-11915-2-git-send-email-helin.zhang@intel.com",
    "date": "2016-03-08T06:42:08",
    "name": "[dpdk-dev,v2,1/2] i40e: generate MAC address for VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1d3ff8395e987814531ae2c34b3a9bd2ce572aef",
    "submitter": {
        "id": 14,
        "url": "http://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patches.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1457419329-11915-2-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/11158/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/11158/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 3D15A2C72;\n\tTue,  8 Mar 2016 07:42:22 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 850D52C67\n\tfor <dev@dpdk.org>; Tue,  8 Mar 2016 07:42:19 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga103.fm.intel.com with ESMTP; 07 Mar 2016 22:42:18 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 07 Mar 2016 22:42:17 -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 u286gFc0024028;\n\tTue, 8 Mar 2016 14:42:15 +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 u286gCwJ011956; Tue, 8 Mar 2016 14:42:14 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u286gCdC011952; \n\tTue, 8 Mar 2016 14:42:12 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.22,555,1449561600\"; d=\"scan'208\";a=\"665630890\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  8 Mar 2016 14:42:08 +0800",
        "Message-Id": "<1457419329-11915-2-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1457419329-11915-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1453970423-15234-1-git-send-email-helin.zhang@intel.com>\n\t<1457419329-11915-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/2] i40e: generate MAC address for VF",
        "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": "It generates a MAC address for each VFs during PF host\ninitialization.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n doc/guides/rel_notes/release_16_04.rst | 5 +++++\n drivers/net/i40e/i40e_ethdev.h         | 1 +\n drivers/net/i40e/i40e_pf.c             | 3 +++\n 3 files changed, 9 insertions(+)\n\nv2:\n - It just generates a MAC address for each VFs during PF host\n   initialization, and removes configuring from users.\n - Reworded the release notes.",
    "diff": "diff --git a/doc/guides/rel_notes/release_16_04.rst b/doc/guides/rel_notes/release_16_04.rst\nindex 73494f9..1b9061d 100644\n--- a/doc/guides/rel_notes/release_16_04.rst\n+++ b/doc/guides/rel_notes/release_16_04.rst\n@@ -137,6 +137,11 @@ Drivers\n \n * **vmxnet3: add TSO support.**\n \n+* **i40e: Generates MAC address for each VFs.**\n+\n+  It generates a MAC address for each VFs during PF host initialization,\n+  and keeps the VF MAC address the same among different VF launch.\n+\n \n Libraries\n ~~~~~~~~~\ndiff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h\nindex db6173a..9109cd9 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -312,6 +312,7 @@ struct i40e_pf_vf {\n \tuint16_t vf_idx; /* VF index in pf->vfs */\n \tuint16_t lan_nb_qps; /* Actual queues allocated */\n \tuint16_t reset_cnt; /* Total vf reset times */\n+\tstruct ether_addr mac_addr;  /* Default MAC address */\n };\n \n /*\ndiff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c\nindex cbf4e5b..5790377 100644\n--- a/drivers/net/i40e/i40e_pf.c\n+++ b/drivers/net/i40e/i40e_pf.c\n@@ -315,6 +315,8 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf)\n \t/* As assume Vf only has single VSI now, always return 0 */\n \tvf_res->vsi_res[0].vsi_id = 0;\n \tvf_res->vsi_res[0].num_queue_pairs = vf->vsi->nb_qps;\n+\tether_addr_copy(&vf->mac_addr,\n+\t\t(struct ether_addr *)vf_res->vsi_res[0].default_mac_addr);\n \n send_msg:\n \ti40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_VF_RESOURCES,\n@@ -1045,6 +1047,7 @@ i40e_pf_host_init(struct rte_eth_dev *dev)\n \t\tret = i40e_pf_host_vf_reset(&pf->vfs[i], 0);\n \t\tif (ret != I40E_SUCCESS)\n \t\t\tgoto fail;\n+\t\teth_random_addr(pf->vfs[i].mac_addr.addr_bytes);\n \t}\n \n \t/* restore irq0 */\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "1/2"
    ]
}