Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160470 Details for
Bug 250497
eHCA infiniband adapter works only for IPoIB
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
libehca_user_space_support_for_rhel5.patch
libehca_user_space_support_for_rhel5.patch (text/plain), 5.12 KB, created by
Scott Moser
on 2007-08-01 22:00:57 UTC
(
hide
)
Description:
libehca_user_space_support_for_rhel5.patch
Filename:
MIME Type:
Creator:
Scott Moser
Created:
2007-08-01 22:00:57 UTC
Size:
5.12 KB
patch
obsolete
>diff -Nurp ofa_user-1.2_orig/src/userspace/libehca/src/ehca_uclasses.h ofa_user-1.2/src/userspace/libehca/src/ehca_uclasses.h >--- ofa_user-1.2_orig/src/userspace/libehca/src/ehca_uclasses.h 2007-06-21 16:39:11.000000000 +0200 >+++ ofa_user-1.2/src/userspace/libehca/src/ehca_uclasses.h 2007-08-01 17:13:35.000000000 +0200 >@@ -191,6 +191,8 @@ struct ehcau_create_cq_resp { > u32 cq_number; > u32 token; > struct ipzu_queue_resp ipz_queue; >+ u32 fw_handle_ofs; >+ u32 dummy; > }; > > struct ehcau_create_cq_resp_abiver5 { >@@ -209,7 +211,7 @@ struct ehcau_create_qp_resp { > u32 qkey; > /* qp_num assigned by ehca: sqp0/1 may have got different numbers */ > u32 real_qp_num; >- u32 dummy; /* padding for 8 byte alignment */ >+ u32 fw_handle_ofs; > struct ipzu_queue_resp ipz_squeue; > struct ipzu_queue_resp ipz_rqueue; > }; >diff -Nurp ofa_user-1.2_orig/src/userspace/libehca/src/ehca_uinit.c ofa_user-1.2/src/userspace/libehca/src/ehca_uinit.c >--- ofa_user-1.2_orig/src/userspace/libehca/src/ehca_uinit.c 2007-06-21 16:39:11.000000000 +0200 >+++ ofa_user-1.2/src/userspace/libehca/src/ehca_uinit.c 2007-08-01 17:17:01.000000000 +0200 >@@ -61,6 +61,9 @@ > > #include "ehca_uclasses.h" > >+/* default 4096, will be set by ehca_uinit() */ >+unsigned long kpage_size = 4096; >+ > static struct ibv_context_ops ehcau_ctx_ops = { > .query_device = ehcau_query_device, > .query_port = ehcau_query_port, >@@ -266,6 +269,8 @@ void __attribute__ ((constructor)) ehcau > libehca_trace_on = (*value) - '0'; > } > >+ kpage_size = sysconf(_SC_PAGESIZE); >+ > #ifdef HAVE_IBV_REGISTER_DRIVER > ibv_register_driver("ehca", ehca_driver_init); > #endif >diff -Nurp ofa_user-1.2_orig/src/userspace/libehca/src/ehca_umain.c ofa_user-1.2/src/userspace/libehca/src/ehca_umain.c >--- ofa_user-1.2_orig/src/userspace/libehca/src/ehca_umain.c 2007-06-21 16:39:11.000000000 +0200 >+++ ofa_user-1.2/src/userspace/libehca/src/ehca_umain.c 2007-08-01 17:24:01.000000000 +0200 >@@ -58,6 +58,8 @@ > > #define EHCA_PAGESIZE 4096 > >+extern unsigned long kpage_size; >+ > static int cq_assign_qp(struct ehcau_cq *cq, struct ehcau_qp *qp) > { > unsigned int qp_num = qp->real_qp_num; >@@ -304,6 +306,7 @@ struct ibv_cq *ehcau_create_cq(struct ib > my_cq->cq_number); > goto create_cq_exit2; > } >+ my_cq->galpas.kernel.fw_handle |= resp.fw_handle_ofs; > > /* access queue mem to fill page cache */ > memset(my_cq->ipz_queue.queue, 0, my_cq->ipz_queue.queue_length); >@@ -359,6 +362,7 @@ int ehcau_destroy_cq(struct ibv_cq *cq) > struct ehcau_cq *my_cq; > int cq_num; > int ret; >+ unsigned long fw_handle; > > my_cq = container_of(cq, struct ehcau_cq, ib_cq); > cq_num = my_cq->cq_number; >@@ -368,7 +372,9 @@ int ehcau_destroy_cq(struct ibv_cq *cq) > "queue=%p", ret, cq_num, my_cq->ipz_queue.queue); > return ret; > } >- ret = munmap((void*)(unsigned long)my_cq->galpas.kernel.fw_handle, EHCA_PAGESIZE); >+ fw_handle = (unsigned long)my_cq->galpas.kernel.fw_handle; >+ fw_handle &= ~(kpage_size - 1); >+ ret = munmap((void*)fw_handle, EHCA_PAGESIZE); > if (ret) { > ehca_err(cq->context->device, "munmap() failed rc=%x cq_num=%x " > "fw_handle=%p", ret, cq_num, >@@ -485,6 +491,7 @@ struct ibv_qp *ehcau_create_qp(struct ib > struct ibv_create_qp cmd; > struct ehcau_create_qp_resp resp; > struct ibv_context *context; >+ u64 fw_handle; > > context = pd->context; > my_qp = malloc(sizeof(*my_qp)); >@@ -546,16 +553,17 @@ struct ibv_qp *ehcau_create_qp(struct ib > my_qp->ipz_squeue.pagesize = resp.ipz_squeue.pagesize; > my_qp->ipz_squeue.toggle_state = resp.ipz_squeue.toggle_state; > /* right most cast is required to avoid gcc warning in 32 bit mode */ >- my_qp->galpas.kernel.fw_handle = (u64)(unsigned long) >+ fw_handle = (u64)(unsigned long) > mmap64(NULL, EHCA_PAGESIZE, > PROT_READ | PROT_WRITE, MAP_SHARED, > context->cmd_fd, > ((u64)my_qp->token << 32) | 0x21000000); >- if (!my_qp->galpas.kernel.fw_handle) { >+ if (!fw_handle) { > ehca_err(pd->context->device, "mmap64() failed qp_num=%x", > my_qp->qp_num); > goto create_qp_exit3; > } >+ my_qp->galpas.kernel.fw_handle = fw_handle | (u64)resp.fw_handle_ofs; > > /* access queue mem to fill page cache */ > memset(my_qp->ipz_squeue.queue, 0, >@@ -585,7 +593,7 @@ struct ibv_qp *ehcau_create_qp(struct ib > return &my_qp->ib_qp; > > create_qp_exit4: >- ret = munmap((void*)(unsigned long)my_qp->galpas.kernel.fw_handle, EHCA_PAGESIZE); >+ ret = munmap((void*)(unsigned long)fw_handle, EHCA_PAGESIZE); > if (ret) > ehca_err(pd->context->device, "munmap() failed rc=%x qp_num=%x " > "fw_handle=%p", ret, my_qp->qp_num, >@@ -713,6 +721,7 @@ int ehcau_destroy_qp(struct ibv_qp *qp) > int ret; > struct ehcau_qp *my_qp; > u32 qp_num; >+ unsigned long fw_handle; > > my_qp = container_of(qp, struct ehcau_qp, ib_qp); > qp_num = my_qp->qp_num; >@@ -741,7 +750,9 @@ int ehcau_destroy_qp(struct ibv_qp *qp) > "squeue=%p", ret, qp_num, my_qp->ipz_squeue.queue); > return ret; > } >- ret = munmap((void*)(unsigned long)my_qp->galpas.kernel.fw_handle, EHCA_PAGESIZE); >+ fw_handle = (unsigned long)my_qp->galpas.kernel.fw_handle; >+ fw_handle &= ~(kpage_size - 1); >+ ret = munmap(fw_handle, EHCA_PAGESIZE); > if (ret) { > ehca_err(qp->context->device, "munmap() failed rc=%x qp_num=%x " > "fw_handle=%p", ret, qp_num,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250497
: 160470