get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30672,
    "url": "http://patches.dpdk.org/api/patches/30672/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1508708240-69814-4-git-send-email-xiao.w.wang@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": "<1508708240-69814-4-git-send-email-xiao.w.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1508708240-69814-4-git-send-email-xiao.w.wang@intel.com",
    "date": "2017-10-22T21:37:19",
    "name": "[dpdk-dev,3/4] net/fm10k: support switch restart on VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b157789d65990f985f7443204d2146186b7d3b02",
    "submitter": {
        "id": 281,
        "url": "http://patches.dpdk.org/api/people/281/?format=api",
        "name": "Xiao Wang",
        "email": "xiao.w.wang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1508708240-69814-4-git-send-email-xiao.w.wang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/30672/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/30672/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 188191B38C;\n\tSun, 22 Oct 2017 14:58:56 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 40AAA1B38A\n\tfor <dev@dpdk.org>; Sun, 22 Oct 2017 14:58:52 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Oct 2017 05:58:51 -0700",
            "from dpdk-xiao-1.sh.intel.com ([10.67.110.153])\n\tby orsmga003.jf.intel.com with ESMTP; 22 Oct 2017 05:58:50 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.43,417,1503385200\"; d=\"scan'208\";\n\ta=\"1027937666\"",
        "From": "Xiao Wang <xiao.w.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "jingjing.wu@intel.com, jing.d.chen@intel.com,\n\tXiao Wang <xiao.w.wang@intel.com>",
        "Date": "Sun, 22 Oct 2017 14:37:19 -0700",
        "Message-Id": "<1508708240-69814-4-git-send-email-xiao.w.wang@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1508708240-69814-1-git-send-email-xiao.w.wang@intel.com>",
        "References": "<1508708240-69814-1-git-send-email-xiao.w.wang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 3/4] net/fm10k: support switch restart on VF",
        "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": "For events indicating a change in the state of the switch manager, the\ndriver will restore the basic port configurations and then pass this event\nto application so that the application can restore any additional\nconfigurations if required. In this way, once the switch manager restarts,\nthe DPDK application can resume its network.\n\nSigned-off-by: Xiao Wang <xiao.w.wang@intel.com>\n---\n drivers/net/fm10k/fm10k_ethdev.c | 41 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)",
    "diff": "diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c\nindex 898bd5d..45ba943 100644\n--- a/drivers/net/fm10k/fm10k_ethdev.c\n+++ b/drivers/net/fm10k/fm10k_ethdev.c\n@@ -2670,6 +2670,11 @@ static void fm10k_MAC_filter_set(struct rte_eth_dev *dev,\n {\n \tstruct rte_eth_dev *dev = (struct rte_eth_dev *)param;\n \tstruct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct fm10k_mbx_info *mbx = &hw->mbx;\n+\tstruct fm10k_dev_info *dev_info =\n+\t\tFM10K_DEV_PRIVATE_TO_INFO(dev->data->dev_private);\n+\tconst enum fm10k_mbx_state state = mbx->state;\n+\tint status_mbx;\n \n \tif (hw->mac.type != fm10k_mac_vf)\n \t\treturn;\n@@ -2679,6 +2684,42 @@ static void fm10k_MAC_filter_set(struct rte_eth_dev *dev,\n \thw->mbx.ops.process(hw, &hw->mbx);\n \tfm10k_mbx_unlock(hw);\n \n+\tif ((state == FM10K_STATE_OPEN) && (mbx->state == FM10K_STATE_CONNECT)) {\n+\t\tPMD_INIT_LOG(INFO, \"INT: Switch has gone down\");\n+\n+\t\tfm10k_mbx_lock(hw);\n+\t\thw->mac.ops.update_lport_state(hw, hw->mac.dglort_map, MAX_LPORT_NUM, 1);\n+\t\tfm10k_mbx_unlock(hw);\n+\n+\t\t/* Setting reset flag */\n+\t\tdev_info->sm_down = 1;\n+\t\t_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL, NULL);\n+\t}\n+\n+\tif ((dev_info->sm_down == 1) && (hw->mac.dglort_map == FM10K_DGLORTMAP_ZERO)) {\n+\t\tPMD_INIT_LOG(INFO, \"INT: Switch has gone up\");\n+\t\tfm10k_mbx_lock(hw);\n+\t\tstatus_mbx = hw->mac.ops.update_xcast_mode(hw, hw->mac.dglort_map,\n+\t\t\t\tFM10K_XCAST_MODE_NONE);\n+\t\tif (status_mbx != FM10K_SUCCESS)\n+\t\t\tPMD_INIT_LOG(ERR, \"Failed to set XCAST mode\");\n+\t\tfm10k_mbx_unlock(hw);\n+\n+\t\t/* first clear the internal SW recording structure */\n+\t\tfm10k_vlan_filter_set(dev, hw->mac.default_vid, false);\n+\t\tfm10k_MAC_filter_set(dev, hw->mac.addr, false, MAIN_VSI_POOL_NUMBER);\n+\n+\t\t/* Add default mac address and vlan for the logical ports that\n+\t\t * have been created, leave to the application to fully recover\n+\t\t * Rx filtering.\n+\t\t */\n+\t\tfm10k_MAC_filter_set(dev, hw->mac.addr, true, MAIN_VSI_POOL_NUMBER);\n+\t\tfm10k_vlan_filter_set(dev, hw->mac.default_vid, true);\n+\n+\t\tdev_info->sm_down = 0;\n+\t\t_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL, NULL);\n+\t}\n+\n \t/* Re-enable interrupt from device side */\n \tFM10K_WRITE_REG(hw, FM10K_VFITR(0), FM10K_ITR_AUTOMASK |\n \t\t\t\t\tFM10K_ITR_MASK_CLEAR);\n",
    "prefixes": [
        "dpdk-dev",
        "3/4"
    ]
}