Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/4367/?format=api
http://patchwork.dpdk.org/api/patches/4367/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1429518150-28098-12-git-send-email-helin.zhang@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<1429518150-28098-12-git-send-email-helin.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1429518150-28098-12-git-send-email-helin.zhang@intel.com", "date": "2015-04-20T08:22:23", "name": "[dpdk-dev,11/18] i40e: support of building both PF and VF driver together", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "20811158468f3723bc12a44345ad18bff6893cdd", "submitter": { "id": 14, "url": "http://patchwork.dpdk.org/api/people/14/?format=api", "name": "Zhang, Helin", "email": "helin.zhang@intel.com" }, "delegate": null, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1429518150-28098-12-git-send-email-helin.zhang@intel.com/mbox/", "series": [], "comments": "http://patchwork.dpdk.org/api/patches/4367/comments/", "check": "pending", "checks": "http://patchwork.dpdk.org/api/patches/4367/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 0F97AC3EA;\n\tMon, 20 Apr 2015 10:23:05 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 15409C3D0\n\tfor <dev@dpdk.org>; Mon, 20 Apr 2015 10:23:02 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 20 Apr 2015 01:23:04 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 20 Apr 2015 01:23:02 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t3K8Mw5r013135;\n\tMon, 20 Apr 2015 16:22:58 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t3K8MtcY028210; Mon, 20 Apr 2015 16:22:57 +0800", "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t3K8MtrZ028206; \n\tMon, 20 Apr 2015 16:22:55 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.11,608,1422950400\"; d=\"scan'208\";a=\"483052561\"", "From": "Helin Zhang <helin.zhang@intel.com>", "To": "dev@dpdk.org", "Date": "Mon, 20 Apr 2015 16:22:23 +0800", "Message-Id": "<1429518150-28098-12-git-send-email-helin.zhang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1429518150-28098-1-git-send-email-helin.zhang@intel.com>", "References": "<1429518150-28098-1-git-send-email-helin.zhang@intel.com>", "Cc": "monica.kenguva@intel.com, steven.j.murray@intel.com,\n\tchiu-pi.shih@intel.com", "Subject": "[dpdk-dev] [PATCH 11/18] i40e: support of building both PF and VF\n\tdriver together", "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>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Macros of PF_DRIVER, VF_DRIVER and INTEGRATED_VF were defined to\nsupport building both PF and VF driver together. PF_DRIVER needs\nto be defined if a build is for PF only, while VF_DRIVER for VF\nonly. PF_DRIVER, VF_DRIVER and INTEGRATED_VF are all needed for\nbuilding PF and VF driver together.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_pmd_i40e/Makefile | 2 +-\n lib/librte_pmd_i40e/i40e/i40e_adminq.c | 14 +++++++-------\n lib/librte_pmd_i40e/i40e/i40e_common.c | 6 ++++--\n lib/librte_pmd_i40e/i40e/i40e_prototype.h | 4 ++--\n 4 files changed, 14 insertions(+), 12 deletions(-)", "diff": "diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile\nindex a921bf1..22f0716 100644\n--- a/lib/librte_pmd_i40e/Makefile\n+++ b/lib/librte_pmd_i40e/Makefile\n@@ -37,7 +37,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n LIB = librte_pmd_i40e.a\n \n CFLAGS += -O3\n-CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF\n \n EXPORT_MAP := rte_pmd_i40e_version.map\n \ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_adminq.c b/lib/librte_pmd_i40e/i40e/i40e_adminq.c\nindex 91b3568..8f9e870 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_adminq.c\n+++ b/lib/librte_pmd_i40e/i40e/i40e_adminq.c\n@@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.\n #include \"i40e_adminq.h\"\n #include \"i40e_prototype.h\"\n \n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n /**\n * i40e_is_nvm_update_op - return true if this is an NVM update operation\n * @desc: API request descriptor\n@@ -48,7 +48,7 @@ STATIC INLINE bool i40e_is_nvm_update_op(struct i40e_aq_desc *desc)\n \t\tdesc->opcode == CPU_TO_LE16(i40e_aqc_opc_nvm_update));\n }\n \n-#endif /* VF_DRIVER */\n+#endif /* PF_DRIVER */\n /**\n * i40e_adminq_init_regs - Initialize AdminQ registers\n * @hw: pointer to the hardware structure\n@@ -559,7 +559,7 @@ enum i40e_status_code i40e_shutdown_arq(struct i40e_hw *hw)\n enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n {\n \tenum i40e_status_code ret_code;\n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n \tu16 eetrack_lo, eetrack_hi;\n \tint retry = 0;\n #endif\n@@ -592,7 +592,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n \tif (ret_code != I40E_SUCCESS)\n \t\tgoto init_adminq_free_asq;\n \n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n #ifdef INTEGRATED_VF\n \t/* VF has no need of firmware */\n \tif (i40e_is_vf(hw))\n@@ -640,13 +640,13 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n \t\t\t\t\t\t I40E_HMC_PROFILE_DEFAULT,\n \t\t\t\t\t\t 0,\n \t\t\t\t\t\t NULL);\n+#endif /* PF_DRIVER */\n \tret_code = I40E_SUCCESS;\n \n-#endif /* VF_DRIVER */\n \t/* success! */\n \tgoto init_adminq_exit;\n \n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n init_adminq_free_arq:\n \ti40e_shutdown_arq(hw);\n #endif\n@@ -1044,7 +1044,7 @@ clean_arq_element_out:\n \t\t*pending = (ntc > ntu ? hw->aq.arq.count : 0) + (ntu - ntc);\n \ti40e_release_spinlock(&hw->aq.arq_spinlock);\n \n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n \tif (i40e_is_nvm_update_op(&e->desc)) {\n \t\tif (hw->aq.nvm_release_on_done) {\n \t\t\ti40e_release_nvm(hw);\ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c\nindex 3dd8f04..7a322f1 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_common.c\n+++ b/lib/librte_pmd_i40e/i40e/i40e_common.c\n@@ -44,7 +44,7 @@ POSSIBILITY OF SUCH DAMAGE.\n * This function sets the mac type of the adapter based on the\n * vendor ID and device ID stored in the hw structure.\n **/\n-#ifdef VF_DRIVER\n+#if defined(INTEGRATED_VF) || defined(VF_DRIVER)\n enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)\n #else\n STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)\n@@ -564,7 +564,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {\n \tI40E_PTT_UNUSED_ENTRY(255)\n };\n \n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n \n /**\n * i40e_init_shared_code - Initialize the shared code\n@@ -4771,6 +4771,8 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,\n \n \treturn status;\n }\n+#endif /* PF_DRIVER */\n+#ifdef VF_DRIVER\n \n /**\n * i40e_aq_send_msg_to_pf\ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_prototype.h b/lib/librte_pmd_i40e/i40e/i40e_prototype.h\nindex 79f4e38..d143183 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_prototype.h\n+++ b/lib/librte_pmd_i40e/i40e/i40e_prototype.h\n@@ -77,7 +77,7 @@ void i40e_resume_aq(struct i40e_hw *hw);\n bool i40e_check_asq_alive(struct i40e_hw *hw);\n enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);\n \n-#ifndef VF_DRIVER\n+#ifdef PF_DRIVER\n \n u32 i40e_led_get(struct i40e_hw *hw);\n void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink);\n@@ -401,7 +401,7 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,\n \t\t\t\t\t struct i40e_nvm_access *cmd,\n \t\t\t\t\t u8 *bytes, int *);\n void i40e_set_pci_config_data(struct i40e_hw *hw, u16 link_status);\n-#endif /* VF_DRIVER */\n+#endif /* PF_DRIVER */\n \n #if defined(I40E_QV) || defined(VF_DRIVER)\n enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw);\n", "prefixes": [ "dpdk-dev", "11/18" ] }{ "id": 4367, "url": "