* [dpdk-dev] [PATCH 1/3] compilation:fix compilation issues of using gcc-4.3.4
2015-01-23 5:35 [dpdk-dev] [PATCH 0/3] dpdk/xen:support DPDK running on Xen Dom0 of SUSE Linux Jijiang Liu
@ 2015-01-23 5:35 ` Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 2/3] lib/xen:DPDK dom0 Driver change Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 3/3] lib/eal:igb_uio driver change Jijiang Liu
2 siblings, 0 replies; 4+ messages in thread
From: Jijiang Liu @ 2015-01-23 5:35 UTC (permalink / raw)
To: dev
Fixed a compilation issue when using gcc-4.3.4 in SUSE Linux 11 SP3.
Signe-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
app/test/test.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/app/test/test.h b/app/test/test.h
index 896f7db..8b76ccf 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -149,7 +149,7 @@ struct test_command {
void add_test_command(struct test_command *t);
#define REGISTER_TEST_COMMAND(t) \
-static void testfn_##t(void);\
+void testfn_##t(void);\
void __attribute__((constructor, used)) testfn_##t(void)\
{\
add_test_command(&t);\
--
1.7.7.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 2/3] lib/xen:DPDK dom0 Driver change
2015-01-23 5:35 [dpdk-dev] [PATCH 0/3] dpdk/xen:support DPDK running on Xen Dom0 of SUSE Linux Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 1/3] compilation:fix compilation issues of using gcc-4.3.4 Jijiang Liu
@ 2015-01-23 5:35 ` Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 3/3] lib/eal:igb_uio driver change Jijiang Liu
2 siblings, 0 replies; 4+ messages in thread
From: Jijiang Liu @ 2015-01-23 5:35 UTC (permalink / raw)
To: dev
Fixed all the compilation issues due to using SUSE Linux 11 SP3.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c
index 543bf57..2715826 100644
--- a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c
+++ b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c
@@ -67,7 +67,7 @@
#include <linux/version.h>
#include <xen/xen.h>
-#include <xen/page.h>
+#include <asm/uaccess.h>
#include <xen/xen-ops.h>
#include <xen/interface/memory.h>
@@ -392,7 +392,7 @@ find_memseg(int count, struct dom0_mm_data * mm_data)
static int
dom0_memory_reserve(uint32_t rsv_size)
{
- uint64_t pfn, vstart, vaddr;
+ uint64_t pfn, mfn, vstart, vaddr;
uint32_t i, num_block, size, allocated_size = 0;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
@@ -429,7 +429,8 @@ dom0_memory_reserve(uint32_t rsv_size)
size -= PAGE_SIZE;
}
- pfn = virt_to_pfn(vstart);
+ mfn = virt_to_mfn(vstart);
+ pfn = mfn_to_pfn(mfn);
rsv_mm_info[i].pfn = pfn;
rsv_mm_info[i].vir_addr = vstart;
rsv_mm_info[i + 1].pfn =
@@ -457,7 +458,8 @@ dom0_memory_reserve(uint32_t rsv_size)
vaddr += PAGE_SIZE;
size -= PAGE_SIZE;
}
- pfn = virt_to_pfn(vstart);
+ mfn = virt_to_mfn(vstart);
+ pfn = mfn_to_pfn(mfn);
rsv_mm_info[i].pfn = pfn;
rsv_mm_info[i].vir_addr = vstart;
}
--
1.7.7.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 3/3] lib/eal:igb_uio driver change
2015-01-23 5:35 [dpdk-dev] [PATCH 0/3] dpdk/xen:support DPDK running on Xen Dom0 of SUSE Linux Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 1/3] compilation:fix compilation issues of using gcc-4.3.4 Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 2/3] lib/xen:DPDK dom0 Driver change Jijiang Liu
@ 2015-01-23 5:35 ` Jijiang Liu
2 siblings, 0 replies; 4+ messages in thread
From: Jijiang Liu @ 2015-01-23 5:35 UTC (permalink / raw)
To: dev
Replace the CONFIG_XEN_DOM0 with the CONFIG_XEN and RTE_LIBRTE_XEN_DOM0 in the driver in order to mmap IO memory correctly.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index ba1364b..7f643be 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -32,7 +32,7 @@
#include <linux/msi.h>
#include <linux/version.h>
-#ifdef CONFIG_XEN_DOM0
+#ifdef CONFIG_XEN
#include <xen/xen.h>
#endif
#include <rte_pci_dev_features.h>
@@ -279,7 +279,7 @@ igbuio_pci_irqhandler(int irq, struct uio_info *info)
return IRQ_HANDLED;
}
-#ifdef CONFIG_XEN_DOM0
+#ifdef RTE_LIBRTE_XEN_DOM0
static int
igbuio_dom0_mmap_phys(struct uio_info *info, struct vm_area_struct *vma)
{
@@ -287,9 +287,7 @@ igbuio_dom0_mmap_phys(struct uio_info *info, struct vm_area_struct *vma)
idx = (int)vma->vm_pgoff;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-#ifdef HAVE_PTE_MASK_PAGE_IOMAP
vma->vm_page_prot.pgprot |= _PAGE_IOMAP;
-#endif
return remap_pfn_range(vma,
vma->vm_start,
@@ -487,7 +485,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
udev->info.version = "0.1";
udev->info.handler = igbuio_pci_irqhandler;
udev->info.irqcontrol = igbuio_pci_irqcontrol;
-#ifdef CONFIG_XEN_DOM0
+#ifdef RTE_LIBRTE_XEN_DOM0
/* check if the driver run on Xen Dom0 */
if (xen_initial_domain())
udev->info.mmap = igbuio_dom0_pci_mmap;
--
1.7.7.6
^ permalink raw reply [flat|nested] 4+ messages in thread