* [dpdk-dev] [PATCH 0/3] dpdk/xen:support DPDK running on Xen Dom0 of SUSE Linux
@ 2015-01-23 5:35 Jijiang Liu
2015-01-23 5:35 ` [dpdk-dev] [PATCH 1/3] compilation:fix compilation issues of using gcc-4.3.4 Jijiang Liu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jijiang Liu @ 2015-01-23 5:35 UTC (permalink / raw)
To: dev
Because SUSE linux kernel doesn't not fully follow Linux kernel in main branch, there are some diffirences between them, and DPDK can't run on Xen Dom0 of SUSE Linux. Recently, some customers want us to support this, so we provide this patch set for it.
Now this patch set V1 is not compatible with Linux kernel in main branch, this purpose of sending the patch set is to help those customers who have an urgent need;we probably cooperate with SUSE to eliminate the gap in the future.
The patch set was validated with the following SW version:
SUSE 11 SP3 (Linux Kernel: 3.0.76-0.11-xen)
Hypervisor: XEN 4.2
GCC: gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)
DPDK: 1.8
In addition, users have to a small change in the source codes in SUSE 11 SP3 Linux kernel for this patch set:
comment the 'CONFIG_XEN' define out in ./include/linux/msi.h, or esle there will be some compilation errors.
//#ifndef CONFIG_XEN
struct msi_msg {
u32 address_lo; /* low 32 bits of msi message address */
u32 address_hi; /* high 32 bits of msi message address */
u32 data; /* 16 bits of msi message data */
};
...
//#else /* CONFIG_XEN */
//struct pci_dev;
//struct msi_desc;
//#endif /* CONFIG_XEN */
Jijiang Liu (3):
fix compilation issue
Dom0 driver change
igb_uio driver change
app/test/test.h | 2 +-
config/common_linuxapp | 2 +-
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 8 +++-----
lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c | 10 ++++++----
4 files changed, 11 insertions(+), 11 deletions(-)
--
1.7.7.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* [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
end of thread, other threads:[~2015-01-23 5:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-dev] [PATCH 3/3] lib/eal:igb_uio driver change Jijiang Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).