get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 58713,
    "url": "http://patches.dpdk.org/api/patches/58713/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190906120058.108073-3-yahui.cao@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": "<20190906120058.108073-3-yahui.cao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190906120058.108073-3-yahui.cao@intel.com",
    "date": "2019-09-06T12:00:48",
    "name": "[02/12] net/ice: tear down flow director",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d705da9fd245b73d9051370e8a34e81f82f93f47",
    "submitter": {
        "id": 1176,
        "url": "http://patches.dpdk.org/api/people/1176/?format=api",
        "name": "Cao, Yahui",
        "email": "yahui.cao@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190906120058.108073-3-yahui.cao@intel.com/mbox/",
    "series": [
        {
            "id": 6273,
            "url": "http://patches.dpdk.org/api/series/6273/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6273",
            "date": "2019-09-06T12:00:46",
            "name": "net/ice: add ice Flow Director driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6273/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/58713/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/58713/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 2C8201F0F3;\n\tFri,  6 Sep 2019 06:16:22 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 1E0F41F0E7\n\tfor <dev@dpdk.org>; Fri,  6 Sep 2019 06:16:16 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Sep 2019 21:16:16 -0700",
            "from dpdk-yahui-skylake.sh.intel.com ([10.67.119.16])\n\tby FMSMGA003.fm.intel.com with ESMTP; 05 Sep 2019 21:16:15 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,472,1559545200\"; d=\"scan'208\";a=\"190709697\"",
        "From": "Yahui Cao <yahui.cao@intel.com>",
        "To": "Qiming Yang <qiming.yang@intel.com>,\n\tWenzhuo Lu <wenzhuo.lu@intel.com>",
        "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n\tXiaolong Ye <xiaolong.ye@intel.com>,\n\tBeilei Xing <beilei.xing@intel.com>, Yahui Cao <yahui.cao@intel.com>",
        "Date": "Fri,  6 Sep 2019 20:00:48 +0800",
        "Message-Id": "<20190906120058.108073-3-yahui.cao@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190906120058.108073-1-yahui.cao@intel.com>",
        "References": "<20190906120058.108073-1-yahui.cao@intel.com>",
        "Subject": "[dpdk-dev] [dpdk-dev 02/12] net/ice: tear down flow director",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/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: Beilei Xing <beilei.xing@intel.com>\n\nRelease resources on flow director, include:\n - Release queue.\n - Release VSI.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/ice/ice_fdir_filter.c | 40 ++++++++++++++++++++++\n drivers/net/ice/ice_rxtx.c        | 57 +++++++++++++++++++++++++++++++\n drivers/net/ice/ice_rxtx.h        |  2 ++\n 3 files changed, 99 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c\nindex 03d143058..451ef92b2 100644\n--- a/drivers/net/ice/ice_fdir_filter.c\n+++ b/drivers/net/ice/ice_fdir_filter.c\n@@ -117,6 +117,37 @@ ice_fdir_setup(struct ice_pf *pf)\n \treturn err;\n }\n \n+/*\n+ * ice_fdir_teardown - release the Flow Director resources\n+ * @pf: board private structure\n+ */\n+static void\n+ice_fdir_teardown(struct ice_pf *pf)\n+{\n+\tstruct rte_eth_dev *eth_dev = pf->adapter->eth_dev;\n+\tstruct ice_vsi *vsi;\n+\tint err;\n+\n+\tvsi = pf->fdir.fdir_vsi;\n+\tif (!vsi)\n+\t\treturn;\n+\n+\terr = ice_fdir_tx_queue_stop(eth_dev, pf->fdir.txq->queue_id);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR, \"Failed to stop TX queue.\");\n+\n+\terr = ice_fdir_rx_queue_stop(eth_dev, pf->fdir.rxq->queue_id);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR, \"Failed to stop RX queue.\");\n+\n+\tice_tx_queue_release(pf->fdir.txq);\n+\tpf->fdir.txq = NULL;\n+\tice_rx_queue_release(pf->fdir.rxq);\n+\tpf->fdir.rxq = NULL;\n+\tice_release_vsi(vsi);\n+\tpf->fdir.fdir_vsi = NULL;\n+}\n+\n static int\n ice_init_fdir_filter(struct ice_adapter *ad)\n {\n@@ -128,8 +159,17 @@ ice_init_fdir_filter(struct ice_adapter *ad)\n \treturn ret;\n }\n \n+static void\n+ice_uninit_fdir_filter(struct ice_adapter *ad)\n+{\n+\tstruct ice_pf *pf = &ad->pf;\n+\n+\tice_fdir_teardown(pf);\n+}\n+\n static struct ice_flow_engine ice_fdir_engine = {\n \t.init = ice_init_fdir_filter,\n+\t.uninit = ice_uninit_fdir_filter,\n \t.type = ICE_FLOW_ENGINE_FDIR,\n };\n \ndiff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c\nindex bd802e350..e41fcb194 100644\n--- a/drivers/net/ice/ice_rxtx.c\n+++ b/drivers/net/ice/ice_rxtx.c\n@@ -748,6 +748,63 @@ ice_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n \treturn 0;\n }\n \n+int\n+ice_fdir_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n+{\n+\tstruct ice_rx_queue *rxq;\n+\tint err;\n+\tstruct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\n+\trxq = pf->fdir.rxq;\n+\n+\terr = ice_switch_rx_queue(hw, rxq->reg_idx, FALSE);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to switch FDIR RX queue %u off\",\n+\t\t\t    rx_queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\tice_rx_queue_release_mbufs(rxq);\n+\n+\treturn 0;\n+}\n+\n+int\n+ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n+{\n+\tstruct ice_tx_queue *txq;\n+\tstruct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\tstruct ice_vsi *vsi = pf->main_vsi;\n+\tenum ice_status status;\n+\tuint16_t q_ids[1];\n+\tuint32_t q_teids[1];\n+\tuint16_t q_handle = tx_queue_id;\n+\n+\ttxq = pf->fdir.txq;\n+\tif (!txq) {\n+\t\tPMD_DRV_LOG(ERR, \"TX queue %u is not available\",\n+\t\t\t    tx_queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\tvsi = txq->vsi;\n+\n+\tq_ids[0] = txq->reg_idx;\n+\tq_teids[0] = txq->q_teid;\n+\n+\t/* Fix me, we assume TC always 0 here */\n+\tstatus = ice_dis_vsi_txq(hw->port_info, vsi->idx, 0, 1, &q_handle,\n+\t\t\t\t q_ids, q_teids, ICE_NO_RESET, 0, NULL);\n+\tif (status != ICE_SUCCESS) {\n+\t\tPMD_DRV_LOG(DEBUG, \"Failed to disable Lan Tx queue\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tice_tx_queue_release_mbufs(txq);\n+\n+\treturn 0;\n+}\n+\n int\n ice_rx_queue_setup(struct rte_eth_dev *dev,\n \t\t   uint16_t queue_idx,\ndiff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h\nindex 450db0244..24376c0d5 100644\n--- a/drivers/net/ice/ice_rxtx.h\n+++ b/drivers/net/ice/ice_rxtx.h\n@@ -151,6 +151,8 @@ int ice_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int ice_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int ice_fdir_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int ice_fdir_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n+int ice_fdir_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n+int ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n void ice_rx_queue_release(void *rxq);\n void ice_tx_queue_release(void *txq);\n void ice_clear_queues(struct rte_eth_dev *dev);\n",
    "prefixes": [
        "02/12"
    ]
}