From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by dpdk.org (Postfix) with ESMTP id 78E6B7FCB for ; Sun, 23 Nov 2014 14:11:40 +0100 (CET) Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 23 Nov 2014 23:22:22 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 23 Nov 2014 23:22:20 +1000 Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 848602CE8052 for ; Mon, 24 Nov 2014 00:22:20 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sANDMCan41681020 for ; Mon, 24 Nov 2014 00:22:20 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sANDLmRs017525 for ; Mon, 24 Nov 2014 00:21:48 +1100 Received: from os_controller.crl.ibm.com ([9.186.57.97]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sANDLYg5017172 for ; Mon, 24 Nov 2014 00:21:47 +1100 From: Chao Zhu To: dev@dpdk.org Date: Sun, 23 Nov 2014 20:22:22 -0500 Message-Id: <1416792142-23132-15-git-send-email-chaozhu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1416792142-23132-1-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1416792142-23132-1-git-send-email-chaozhu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14112313-0029-0000-0000-000000A742B6 Subject: [dpdk-dev] [PATCH v3 14/14] Fix the compiling of test-pmd on IBM Power Architecture X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 13:11:41 -0000 This patch fixes compiling problems on IBM Power architecture and turn on the test-pmd compiling option in configuration file. Actually, this is an big endian compiling fix. Signed-off-by: Chao Zhu --- app/test-pmd/config.c | 33 +++++++++++++++++++-------------- config/common_linuxapp_powerpc | 6 +++--- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 9bc08f4..ba26da1 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -612,8 +612,13 @@ ring_dma_zone_lookup(const char *ring_name, uint8_t port_id, uint16_t q_id) union igb_ring_dword { uint64_t dword; struct { +#ifdef RTE_ARCH_BIG_ENDIAN + uint32_t lo; + uint32_t hi; +#else uint32_t hi; uint32_t lo; +#endif } words; }; @@ -656,23 +661,23 @@ ring_rx_descriptor_display(const struct rte_memzone *ring_mz, /* 32 bytes RX descriptor, i40e only */ struct igb_ring_desc_32_bytes *ring = (struct igb_ring_desc_32_bytes *)ring_mz->addr; + ring[desc_id].lo_dword.dword = rte_le_to_cpu_64(ring[desc_id].lo_dword.dword); + ring_rxd_display_dword(ring[desc_id].lo_dword); + ring[desc_id].hi_dword.dword = rte_le_to_cpu_64(ring[desc_id].hi_dword.dword); + ring_rxd_display_dword(ring[desc_id].hi_dword); + ring[desc_id].resv1.dword = rte_le_to_cpu_64(ring[desc_id].resv1.dword); + ring_rxd_display_dword(ring[desc_id].resv1); + ring[desc_id].resv2.dword = rte_le_to_cpu_64(ring[desc_id].resv2.dword); + ring_rxd_display_dword(ring[desc_id].resv2); - ring_rxd_display_dword(rte_le_to_cpu_64( - ring[desc_id].lo_dword)); - ring_rxd_display_dword(rte_le_to_cpu_64( - ring[desc_id].hi_dword)); - ring_rxd_display_dword(rte_le_to_cpu_64( - ring[desc_id].resv1)); - ring_rxd_display_dword(rte_le_to_cpu_64( - ring[desc_id].resv2)); return; } #endif /* 16 bytes RX descriptor */ - ring_rxd_display_dword(rte_le_to_cpu_64( - ring[desc_id].lo_dword)); - ring_rxd_display_dword(rte_le_to_cpu_64( - ring[desc_id].hi_dword)); + ring[desc_id].lo_dword.dword = rte_le_to_cpu_64(ring[desc_id].lo_dword.dword); + ring_rxd_display_dword(ring[desc_id].lo_dword); + ring[desc_id].hi_dword.dword = rte_le_to_cpu_64(ring[desc_id].hi_dword.dword); + ring_rxd_display_dword(ring[desc_id].hi_dword); } static void @@ -682,8 +687,8 @@ ring_tx_descriptor_display(const struct rte_memzone *ring_mz, uint16_t desc_id) struct igb_ring_desc_16_bytes txd; ring = (struct igb_ring_desc_16_bytes *)ring_mz->addr; - txd.lo_dword = rte_le_to_cpu_64(ring[desc_id].lo_dword); - txd.hi_dword = rte_le_to_cpu_64(ring[desc_id].hi_dword); + txd.lo_dword.dword = rte_le_to_cpu_64(ring[desc_id].lo_dword.dword); + txd.hi_dword.dword = rte_le_to_cpu_64(ring[desc_id].hi_dword.dword); printf(" 0x%08X - 0x%08X / 0x%08X - 0x%08X\n", (unsigned)txd.lo_dword.words.lo, (unsigned)txd.lo_dword.words.hi, diff --git a/config/common_linuxapp_powerpc b/config/common_linuxapp_powerpc index d230a0b..68f1b6b 100644 --- a/config/common_linuxapp_powerpc +++ b/config/common_linuxapp_powerpc @@ -146,8 +146,8 @@ CONFIG_RTE_NIC_BYPASS=n # # Compile burst-oriented IGB & EM PMD drivers # -CONFIG_RTE_LIBRTE_EM_PMD=n -CONFIG_RTE_LIBRTE_IGB_PMD=n +CONFIG_RTE_LIBRTE_EM_PMD=y +CONFIG_RTE_LIBRTE_IGB_PMD=y CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n @@ -389,6 +389,6 @@ CONFIG_RTE_APP_TEST=y # # Compile the PMD test application # -CONFIG_RTE_TEST_PMD=n +CONFIG_RTE_TEST_PMD=y CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n -- 1.7.1