List patch comments

GET /api/patches/240/comments/?format=api&order=-date
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/240/comments/?format=api&order=-date&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/240/comments/?format=api&order=-date&page=1>; rel="last"
Vary: Accept
[ { "id": 525, "web_url": "https://patches.dpdk.org/comment/525/", "msgid": "<C37D651A908B024F974696C65296B57B0F27E532@SHSMSX101.ccr.corp.intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/C37D651A908B024F974696C65296B57B0F27E532@SHSMSX101.ccr.corp.intel.com", "date": "2014-08-27T17:26:59", "subject": "Re: [dpdk-dev] [PATCH RFC 2/3] eal: don't call\n\trte_eal_iopl_init\tunconditionnally", "submitter": { "id": 16, "url": "https://patches.dpdk.org/api/people/16/?format=api", "name": "Huawei Xie", "email": "huawei.xie@intel.com" }, "content": "Acked-by: Huawei Xie <huawei.xie@intel.com>\n\n> -----Original Message-----\n> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand\n> Sent: Tuesday, August 26, 2014 10:12 PM\n> To: dev@dpdk.org\n> Subject: [dpdk-dev] [PATCH RFC 2/3] eal: don't call rte_eal_iopl_init\n> unconditionnally\n> \n> There is no need for ioport access for applications that won't use virtio pmds.\n> Make rte_eal_iopl_init() non-static so that it is called from pmds that need it.\n> \n> Signed-off-by: David Marchand <david.marchand@6wind.com>\n> ---\n> lib/librte_eal/bsdapp/eal/eal.c | 5 +----\n> lib/librte_eal/common/include/rte_eal.h | 14 +++++++++++---\n> lib/librte_eal/linuxapp/eal/eal.c | 11 ++++-------\n> lib/librte_pmd_virtio/virtio_ethdev.c | 15 ++++++++-------\n> 4 files changed, 24 insertions(+), 21 deletions(-)\n> \n> diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\n> index 0697b05..dad9e0c 100644\n> --- a/lib/librte_eal/bsdapp/eal/eal.c\n> +++ b/lib/librte_eal/bsdapp/eal/eal.c\n> @@ -803,7 +803,7 @@ int rte_eal_has_hugepages(void)\n> }\n> \n> /* Abstraction for port I/0 privilege */\n> -static int\n> +int\n> rte_eal_iopl_init(void)\n> {\n> \tint fd = -1;\n> @@ -864,9 +864,6 @@ rte_eal_init(int argc, char **argv)\n> \n> \trte_config_init();\n> \n> -\tif (rte_eal_iopl_init() == 0)\n> -\t\trte_config.flags |= EAL_FLG_HIGH_IOPL;\n> -\n> \tif (rte_eal_cpu_init() < 0)\n> \t\trte_panic(\"Cannot detect lcores\\n\");\n> \n> diff --git a/lib/librte_eal/common/include/rte_eal.h\n> b/lib/librte_eal/common/include/rte_eal.h\n> index 273da9a..8d39cba 100644\n> --- a/lib/librte_eal/common/include/rte_eal.h\n> +++ b/lib/librte_eal/common/include/rte_eal.h\n> @@ -88,9 +88,6 @@ struct rte_config {\n> \tstruct rte_mem_config *mem_config;\n> } __attribute__((__packed__));\n> \n> -/* Flag definitions for rte_config flags */\n> -#define EAL_FLG_HIGH_IOPL 1 /**< indicates high IO privilege in a linux env */\n> -\n> /**\n> * Get the global configuration structure.\n> *\n> @@ -119,6 +116,17 @@ enum rte_lcore_role_t rte_eal_lcore_role(unsigned\n> lcore_id);\n> enum rte_proc_type_t rte_eal_process_type(void);\n> \n> /**\n> + * Request iopl privilege for all RPL.\n> + *\n> + * This function should be called by pmds which need access to ioports.\n> +\n> + * @return\n> + * - On success, returns 0.\n> + * - On failure, returns -1.\n> + */\n> +int rte_eal_iopl_init(void);\n> +\n> +/**\n> * Initialize the Environment Abstraction Layer (EAL).\n> *\n> * This function is to be executed on the MASTER lcore only, as soon\n> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\n> index 2940e69..884aa9b 100644\n> --- a/lib/librte_eal/linuxapp/eal/eal.c\n> +++ b/lib/librte_eal/linuxapp/eal/eal.c\n> @@ -107,8 +107,6 @@\n> \n> #define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10)\n> \n> -#define HIGHEST_RPL 3\n> -\n> #define BITS_PER_HEX 4\n> \n> /* Allow the application to print its usage message too if set */\n> @@ -1060,10 +1058,12 @@ rte_eal_mcfg_complete(void)\n> /*\n> * Request iopl privilege for all RPL, returns 0 on success\n> */\n> -static int\n> +int\n> rte_eal_iopl_init(void)\n> {\n> -\treturn iopl(HIGHEST_RPL);\n> +\tif (iopl(3) != 0)\n> +\t\treturn -1;\n> +\treturn 0;\n> }\n> \n> /* Launch threads, called at application init(). */\n> @@ -1125,9 +1125,6 @@ rte_eal_init(int argc, char **argv)\n> \n> \trte_config_init();\n> \n> -\tif (rte_eal_iopl_init() == 0)\n> -\t\trte_config.flags |= EAL_FLG_HIGH_IOPL;\n> -\n> \tif (rte_eal_pci_init() < 0)\n> \t\trte_panic(\"Cannot init PCI\\n\");\n> \n> diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c\n> b/lib/librte_pmd_virtio/virtio_ethdev.c\n> index 3344ffb..587b746 100644\n> --- a/lib/librte_pmd_virtio/virtio_ethdev.c\n> +++ b/lib/librte_pmd_virtio/virtio_ethdev.c\n> @@ -736,12 +736,6 @@ eth_virtio_dev_init(__rte_unused struct eth_driver\n> *eth_drv,\n> \t\treturn -1;\n> \t}\n> \n> -\tif (!(rte_eal_get_configuration()->flags & EAL_FLG_HIGH_IOPL)) {\n> -\t\tPMD_INIT_LOG(ERR,\n> -\t\t\t\"IOPL call failed in EAL init - cannot use virtio PMD\n> driver\\n\");\n> -\t\treturn -1;\n> -\t}\n> -\n> \teth_dev->dev_ops = &virtio_eth_dev_ops;\n> \teth_dev->tx_pkt_burst = &virtio_xmit_pkts;\n> \n> @@ -896,8 +890,15 @@ static struct eth_driver rte_virtio_pmd = {\n> * Returns 0 on success.\n> */\n> static int\n> -rte_virtio_pmd_init(const char *name __rte_unused, const char *param\n> __rte_unused)\n> +rte_virtio_pmd_init(const char *name __rte_unused,\n> +\t\t const char *param __rte_unused)\n> {\n> +\tif (rte_eal_iopl_init() != 0) {\n> +\t\tPMD_INIT_LOG(ERR, \"IOPL call failed - \"\n> +\t\t\t\t \"cannot use virtio PMD driver\\n\");\n> +\t\treturn -1;\n> +\t}\n> +\n> \trte_eth_driver_register(&rte_virtio_pmd);\n> \treturn 0;\n> }\n> --\n> 1.7.10.4", "headers": { "Return-Path": "<huawei.xie@intel.com>", "Received": [ "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id E637EB38D\n\tfor <dev@dpdk.org>; Wed, 27 Aug 2014 19:24:23 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP; 27 Aug 2014 10:27:27 -0700", "from fmsmsx103.amr.corp.intel.com ([10.19.9.34])\n\tby fmsmga002.fm.intel.com with ESMTP; 27 Aug 2014 10:27:09 -0700", "from fmsmsx120.amr.corp.intel.com (10.19.9.29) by\n\tFMSMSX103.amr.corp.intel.com (10.19.9.34) with Microsoft SMTP Server\n\t(TLS) id 14.3.195.1; Wed, 27 Aug 2014 10:27:08 -0700", "from shsmsx104.ccr.corp.intel.com (10.239.4.70) by\n\tfmsmsx120.amr.corp.intel.com (10.19.9.29) with Microsoft SMTP Server\n\t(TLS) id 14.3.195.1; Wed, 27 Aug 2014 10:27:07 -0700", "from shsmsx101.ccr.corp.intel.com ([169.254.1.198]) by\n\tSHSMSX104.ccr.corp.intel.com ([169.254.5.17]) with mapi id\n\t14.03.0195.001; Thu, 28 Aug 2014 01:27:00 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.04,412,1406617200\"; d=\"scan'208\";a=\"590698206\"", "From": "\"Xie, Huawei\" <huawei.xie@intel.com>", "To": "David Marchand <david.marchand@6wind.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "Thread-Topic": "[dpdk-dev] [PATCH RFC 2/3] eal: don't call rte_eal_iopl_init\n\tunconditionnally", "Thread-Index": "AQHPwTfZIKzaNPehxkGPAQovJ2IJ5pvktAZQ", "Date": "Wed, 27 Aug 2014 17:26:59 +0000", "Message-ID": "<C37D651A908B024F974696C65296B57B0F27E532@SHSMSX101.ccr.corp.intel.com>", "References": "<1409062300-17004-1-git-send-email-david.marchand@6wind.com>\n\t<1409062300-17004-3-git-send-email-david.marchand@6wind.com>", "In-Reply-To": "<1409062300-17004-3-git-send-email-david.marchand@6wind.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "x-originating-ip": "[10.239.127.40]", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "quoted-printable", "MIME-Version": "1.0", "Subject": "Re: [dpdk-dev] [PATCH RFC 2/3] eal: don't call\n\trte_eal_iopl_init\tunconditionnally", "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>", "X-List-Received-Date": "Wed, 27 Aug 2014 17:24:24 -0000" }, "addressed": null } ]