get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18786,
    "url": "https://patches.dpdk.org/api/patches/18786/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1483426488-117332-13-git-send-email-wenzhuo.lu@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": "<1483426488-117332-13-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1483426488-117332-13-git-send-email-wenzhuo.lu@intel.com",
    "date": "2017-01-03T06:54:33",
    "name": "[dpdk-dev,v7,12/27] net/i40e: fix VF MAC address assignment",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8c72de2c3448dd4267c4ea8bc78004cb165c8961",
    "submitter": {
        "id": 258,
        "url": "https://patches.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1483426488-117332-13-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/18786/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/18786/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 7B8DFF920;\n\tTue,  3 Jan 2017 07:56:40 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 81CBB201;\n\tTue,  3 Jan 2017 07:55:45 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga104.fm.intel.com with ESMTP; 02 Jan 2017 22:55:45 -0800",
            "from dpdk26.sh.intel.com ([10.239.128.228])\n\tby orsmga003.jf.intel.com with ESMTP; 02 Jan 2017 22:55:44 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.33,451,1477983600\"; d=\"scan'208\";a=\"918351112\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Ferruh Yigit <ferruh.yigit@intel.com>,\n\tstable@dpdk.org",
        "Date": "Tue,  3 Jan 2017 14:54:33 +0800",
        "Message-Id": "<1483426488-117332-13-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "In-Reply-To": "<1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 12/27] net/i40e: fix VF MAC address assignment",
        "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: Ferruh Yigit <ferruh.yigit@intel.com>\n\nIf PF sets vf->mac_addr, in VF initialization hw->mac.addr will be set\nto that same value. It is possible to check if PF set a MAC address or\nnot through the hw->mac.addr variable.\n\nhw->mac.addr set by i40e_vf_parse_hw_config(), call stack is:\n\nIn PF side\ni40e_pf_host_process_cmd_get_vf_resources()\n    eth_addr_copy(vf->mac_addr, vf_res->vsi_res[0].default_mac_address)\n\nIn VF sise\ni40evf_init_vf()\n    i40evf_get_vf_resources()\n            i40e_vf_parse_hw_config()\n                    memcpy(hw->mac.addr, vsi_res->default_mac_addr)\n\nUpdated code is after i40evf_get_vf_resources() and can benefit from\nhw->mac.addr variable.\n\nFixes: 89e6b86384bb (\"i40evf: rework MAC address validation\")\n\nCC: stable@dpdk.org\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\n drivers/net/i40e/i40e_ethdev_vf.c | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c\nindex 5016249..0977095 100644\n--- a/drivers/net/i40e/i40e_ethdev_vf.c\n+++ b/drivers/net/i40e/i40e_ethdev_vf.c\n@@ -1193,7 +1193,6 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,\n \tint i, err, bufsz;\n \tstruct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);\n-\tstruct ether_addr *p_mac_addr;\n \tuint16_t interval =\n \t\ti40e_calc_itr_interval(I40E_QUEUE_ITR_INTERVAL_MAX);\n \n@@ -1270,13 +1269,10 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,\n \tvf->vsi.adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n \n \t/* Store the MAC address configured by host, or generate random one */\n-\tp_mac_addr = (struct ether_addr *)(vf->vsi_res->default_mac_addr);\n-\tif (is_valid_assigned_ether_addr(p_mac_addr)) { /* Configured by host */\n-\t\tether_addr_copy(p_mac_addr, (struct ether_addr *)hw->mac.addr);\n+\tif (is_valid_assigned_ether_addr((struct ether_addr *)hw->mac.addr))\n \t\tvf->flags |= I40E_FLAG_VF_MAC_BY_PF;\n-\t} else {\n+\telse\n \t\teth_random_addr(hw->mac.addr); /* Generate a random one */\n-\t}\n \n \t/* If the PF host is not DPDK, set the interval of ITR0 to max*/\n \tif (vf->version_major != I40E_DPDK_VERSION_MAJOR) {\n",
    "prefixes": [
        "dpdk-dev",
        "v7",
        "12/27"
    ]
}