Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/63538/?format=api
http://patches.dpdk.org/api/patches/63538/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191203070318.39620-17-qi.z.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": "<20191203070318.39620-17-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20191203070318.39620-17-qi.z.zhang@intel.com", "date": "2019-12-03T07:03:17", "name": "[16/17] net/iavf: move device state flag", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "7e91c80aae526b49300ae1df65344eeaa3473ac5", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@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/20191203070318.39620-17-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 7716, "url": "http://patches.dpdk.org/api/series/7716/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7716", "date": "2019-12-03T07:03:01", "name": "iavf base code update", "version": 1, "mbox": "http://patches.dpdk.org/series/7716/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/63538/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/63538/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3B423A04B5;\n\tTue, 3 Dec 2019 08:02:57 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 516761BFC4;\n\tTue, 3 Dec 2019 08:00:48 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 422041BFA7\n for <dev@dpdk.org>; Tue, 3 Dec 2019 08:00:40 +0100 (CET)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 02 Dec 2019 23:00:39 -0800", "from dpdk51.sh.intel.com ([10.67.110.245])\n by fmsmga005.fm.intel.com with ESMTP; 02 Dec 2019 23:00:38 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.69,272,1571727600\"; d=\"scan'208\";a=\"410729829\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "xiaolong.ye@intel.com", "Cc": "haiyue.wang@intel.com,\n\tdev@dpdk.org,\n\tQi Zhang <qi.z.zhang@intel.com>", "Date": "Tue, 3 Dec 2019 15:03:17 +0800", "Message-Id": "<20191203070318.39620-17-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20191203070318.39620-1-qi.z.zhang@intel.com>", "References": "<20191203070318.39620-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 16/17] net/iavf: move device state flag", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Move device state flag from ice_hw to ice_adatper since it should\nnot be a part of base code.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/iavf/base/iavf_type.h | 1 -\n drivers/net/iavf/iavf.h | 1 +\n drivers/net/iavf/iavf_ethdev.c | 13 +++++--------\n 3 files changed, 6 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/net/iavf/base/iavf_type.h b/drivers/net/iavf/base/iavf_type.h\nindex fb175e8a6..6f85f8c04 100644\n--- a/drivers/net/iavf/base/iavf_type.h\n+++ b/drivers/net/iavf/base/iavf_type.h\n@@ -332,7 +332,6 @@ struct iavf_hw {\n \tu16 subsystem_device_id;\n \tu16 subsystem_vendor_id;\n \tu8 revision_id;\n-\tbool adapter_stopped;\n \n \t/* capabilities for entire device and PCI func */\n \tstruct iavf_hw_capabilities dev_caps;\ndiff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h\nindex bbd4d75d0..77b706893 100644\n--- a/drivers/net/iavf/iavf.h\n+++ b/drivers/net/iavf/iavf.h\n@@ -127,6 +127,7 @@ struct iavf_adapter {\n \t/* For vector PMD */\n \tbool rx_vec_allowed;\n \tbool tx_vec_allowed;\n+\tbool stopped;\n };\n \n /* IAVF_DEV_PRIVATE_TO */\ndiff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c\nindex 39faf7fac..73927f1f8 100644\n--- a/drivers/net/iavf/iavf_ethdev.c\n+++ b/drivers/net/iavf/iavf_ethdev.c\n@@ -421,12 +421,11 @@ iavf_dev_start(struct rte_eth_dev *dev)\n \tstruct iavf_adapter *adapter =\n \t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);\n-\tstruct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct rte_intr_handle *intr_handle = dev->intr_handle;\n \n \tPMD_INIT_FUNC_TRACE();\n \n-\thw->adapter_stopped = 0;\n+\tadapter->stopped = 0;\n \n \tvf->max_pkt_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;\n \tvf->num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,\n@@ -481,12 +480,11 @@ iavf_dev_stop(struct rte_eth_dev *dev)\n {\n \tstruct iavf_adapter *adapter =\n \t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n-\tstruct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct rte_intr_handle *intr_handle = dev->intr_handle;\n \n \tPMD_INIT_FUNC_TRACE();\n \n-\tif (hw->adapter_stopped == 1)\n+\tif (adapter->stopped == 1)\n \t\treturn;\n \n \tiavf_stop_queues(dev);\n@@ -501,7 +499,7 @@ iavf_dev_stop(struct rte_eth_dev *dev)\n \n \t/* remove all mac addrs */\n \tiavf_add_del_all_mac_addr(adapter, FALSE);\n-\thw->adapter_stopped = 1;\n+\tadapter->stopped = 1;\n }\n \n static int\n@@ -1333,6 +1331,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)\n \thw->hw_addr = (void *)pci_dev->mem_resource[0].addr;\n \thw->back = IAVF_DEV_PRIVATE_TO_ADAPTER(eth_dev->data->dev_private);\n \tadapter->eth_dev = eth_dev;\n+\tadapter->stopped = 1;\n \n \tif (iavf_init_vf(eth_dev) != 0) {\n \t\tPMD_INIT_LOG(ERR, \"Init vf failed\");\n@@ -1393,7 +1392,6 @@ static int\n iavf_dev_uninit(struct rte_eth_dev *dev)\n {\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);\n-\tstruct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn -EPERM;\n@@ -1401,8 +1399,7 @@ iavf_dev_uninit(struct rte_eth_dev *dev)\n \tdev->dev_ops = NULL;\n \tdev->rx_pkt_burst = NULL;\n \tdev->tx_pkt_burst = NULL;\n-\tif (hw->adapter_stopped == 0)\n-\t\tiavf_dev_close(dev);\n+\tiavf_dev_close(dev);\n \n \trte_free(vf->vf_res);\n \tvf->vsi_res = NULL;\n", "prefixes": [ "16/17" ] }{ "id": 63538, "url": "