[PATCH 6/6] [ofa_kernel] Add qib_0000_dcache_lock-and-mount-changes.patch
Signed-off-by: Goldwyn Rodrigues --- .../qib__dcache_lock-and-mount-changes.patch | 57 1 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 kernel_patches/backport/3.0_sles11sp2/qib__dcache_lock-and-mount-changes.patch diff --git a/kernel_patches/backport/3.0_sles11sp2/qib__dcache_lock-and-mount-changes.patch b/kernel_patches/backport/3.0_sles11sp2/qib__dcache_lock-and-mount-changes.patch new file mode 100644 index 000..17bbdf2 --- /dev/null +++ b/kernel_patches/backport/3.0_sles11sp2/qib__dcache_lock-and-mount-changes.patch @@ -0,0 +1,57 @@ +From: Goldwyn Rodrigues +Subject: qib: dcache_lock and mount changes + +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/qib/qib_fs.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/qib/qib_fs.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/qib/qib_fs.c +@@ -386,17 +386,14 @@ static int remove_file(struct dentry *pa + goto bail; + } + +- spin_lock(&dcache_lock); + spin_lock(&tmp->d_lock); + if (!(d_unhashed(tmp) && tmp->d_inode)) { +- dget_locked(tmp); ++ dget_dlock(tmp); + __d_drop(tmp); + spin_unlock(&tmp->d_lock); +- spin_unlock(&dcache_lock); + simple_unlink(parent->d_inode, tmp); + } else { + spin_unlock(&tmp->d_lock); +- spin_unlock(&dcache_lock); + } + + ret = 0; +@@ -486,14 +483,14 @@ bail: + return ret; + } + +-static int qibfs_get_sb(struct file_system_type *fs_type, int flags, +- const char *dev_name, void *data, struct vfsmount *mnt) ++static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags, ++const char *dev_name, void *data) + { +- int ret = get_sb_single(fs_type, flags, data, +- qibfs_fill_super, mnt); +- if (ret >= 0) +- qib_super = mnt->mnt_sb; +- return ret; ++struct dentry *ret; ++ret = mount_single(fs_type, flags, data, qibfs_fill_super); ++if (!IS_ERR(ret)) ++qib_super = ret->d_sb; ++return ret; + } + + static void qibfs_kill_super(struct super_block *s) +@@ -534,7 +531,7 @@ int qibfs_remove(struct qib_devdata *dd) + static struct file_system_type qibfs_fs_type = { + .owner =THIS_MODULE, + .name = "ipathfs", +- .get_sb = qibfs_get_sb, ++ .mount =qibfs_mount, + .kill_sb = qibfs_kill_super, + }; + -- 1.7.7 -- Goldwyn -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/6] [ofa_kernel] Add nfsrdma_0000_sysctl-changes.patch
Signed-off-by: Goldwyn Rodrigues --- .../nfsrdma__sysctl-changes.patch | 242 1 files changed, 242 insertions(+), 0 deletions(-) create mode 100644 kernel_patches/backport/3.0_sles11sp2/nfsrdma__sysctl-changes.patch diff --git a/kernel_patches/backport/3.0_sles11sp2/nfsrdma__sysctl-changes.patch b/kernel_patches/backport/3.0_sles11sp2/nfsrdma__sysctl-changes.patch new file mode 100644 index 000..f243b63 --- /dev/null +++ b/kernel_patches/backport/3.0_sles11sp2/nfsrdma__sysctl-changes.patch @@ -0,0 +1,242 @@ +From: Goldwyn Rodrigues +Subject: nfsrdma - sysctl usage changes + +Index: ofa_kernel-1.5.4.1/net/sunrpc/xprtrdma/svc_rdma.c +=== +--- ofa_kernel-1.5.4.1.orig/net/sunrpc/xprtrdma/svc_rdma.c ofa_kernel-1.5.4.1/net/sunrpc/xprtrdma/svc_rdma.c +@@ -80,8 +80,7 @@ struct kmem_cache *svc_rdma_ctxt_cachep; + * current value. + */ + static int read_reset_stat(ctl_table *table, int write, +- struct file *filp, void __user *buffer, size_t *lenp, +- loff_t *ppos) ++ void __user *buffer, size_t *lenp, loff_t *ppos) + { + atomic_t *stat = (atomic_t *)table->data; + +@@ -121,7 +120,6 @@ static ctl_table svcrdma_parm_table[] = + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, +- .strategy = &sysctl_intvec, + .extra1 = &min_max_requests, + .extra2 = &max_max_requests + }, +@@ -131,7 +129,6 @@ static ctl_table svcrdma_parm_table[] = + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, +- .strategy = &sysctl_intvec, + .extra1 = &min_max_inline, + .extra2 = &max_max_inline + }, +@@ -141,7 +138,6 @@ static ctl_table svcrdma_parm_table[] = + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, +- .strategy = &sysctl_intvec, + .extra1 = &min_ord, + .extra2 = &max_ord, + }, +@@ -209,9 +205,7 @@ static ctl_table svcrdma_parm_table[] = + .mode = 0644, + .proc_handler = &read_reset_stat, + }, +- { +- .ctl_name = 0, +- }, ++ { }, + }; + + static ctl_table svcrdma_table[] = { +@@ -220,21 +214,16 @@ static ctl_table svcrdma_table[] = { + .mode = 0555, + .child = svcrdma_parm_table + }, +- { +- .ctl_name = 0, +- }, ++ { }, + }; + + static ctl_table svcrdma_root_table[] = { + { +- .ctl_name = CTL_SUNRPC, + .procname = "sunrpc", + .mode = 0555, + .child = svcrdma_table + }, +- { +- .ctl_name = 0, +- }, ++ { }, + }; + + void svc_rdma_cleanup(void) +Index: ofa_kernel-1.5.4.1/net/sunrpc/xprtrdma/transport.c +=== +--- ofa_kernel-1.5.4.1.orig/net/sunrpc/xprtrdma/transport.c ofa_kernel-1.5.4.1/net/sunrpc/xprtrdma/transport.c +@@ -86,79 +86,63 @@ static struct ctl_table_header *sunrpc_t + + static ctl_table xr_tunables_table[] = { + { +- .ctl_name = CTL_UNNUMBERED, + .procname = "rdma_slot_table_entries", + .data = &xprt_rdma_slot_table_entries, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, +- .strategy = &sysctl_intvec, + .extra1 = &min_slot_table_size, + .extra2 = &max_slot_table_size + }, + { +- .ctl_name = CTL_UNNUMBERED, + .procname = "rdma_max_inline_read", + .data = &xprt_rdma_max_inline_read, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec, +- .strategy = &sysctl_intvec, + }, + { +- .ctl_name = CTL_UNNUMBERED, + .procname = "rdma_max_inline_write", + .data = &xprt_rdma_max_inline_write, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec, +- .strategy = &sysctl_intvec, + }, + { +- .ctl_name = CTL_UNNUMBERED, + .procname
[PATCH 4/6] [ofa_kernel] Add ipath_0000_-sched_and_mount_changes.patch
Signed-off-by: Goldwyn Rodrigues --- .../ipath__-sched_and_mount_changes.patch | 129 1 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 kernel_patches/backport/3.0_sles11sp2/ipath__-sched_and_mount_changes.patch diff --git a/kernel_patches/backport/3.0_sles11sp2/ipath__-sched_and_mount_changes.patch b/kernel_patches/backport/3.0_sles11sp2/ipath__-sched_and_mount_changes.patch new file mode 100644 index 000..4f548d2 --- /dev/null +++ b/kernel_patches/backport/3.0_sles11sp2/ipath__-sched_and_mount_changes.patch @@ -0,0 +1,129 @@ +From: Goldwyn Rodrigues +Subject: [PATCH] ipath - add sched.h and change get_sb to mount + +Add linux/sched.h where required. +commit fc14f2fef682df677d64a145256dbd263df2aa7b convert get_sb_single() users +commit b5c84bf6f6fa3a7dfdcb556023a62953574b60ee fs: dcache remove dcache_lock + +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_file_ops.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/ipath/ipath_file_ops.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_file_ops.c +@@ -40,7 +40,6 @@ + #include + #include + #include +-#include + #include + + #include "ipath_kernel.h" +@@ -1822,7 +1821,6 @@ done: + static int ipath_open(struct inode *in, struct file *fp) + { + /* The real work is performed later in ipath_assign_port() */ +- cycle_kernel_lock(); + fp->private_data = kzalloc(sizeof(struct ipath_filedata), GFP_KERNEL); + return fp->private_data ? 0 : -ENOMEM; + } +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_fs.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/ipath/ipath_fs.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_fs.c +@@ -273,18 +273,14 @@ static int remove_file(struct dentry *pa + goto bail; + } + +- spin_lock(&dcache_lock); + spin_lock(&tmp->d_lock); + if (!(d_unhashed(tmp) && tmp->d_inode)) { +- dget_locked(tmp); ++ dget_dlock(tmp); + __d_drop(tmp); + spin_unlock(&tmp->d_lock); +- spin_unlock(&dcache_lock); + simple_unlink(parent->d_inode, tmp); +- } else { ++ } else + spin_unlock(&tmp->d_lock); +- spin_unlock(&dcache_lock); +- } + + ret = 0; + bail: +@@ -360,13 +356,13 @@ bail: + return ret; + } + +-static int ipathfs_get_sb(struct file_system_type *fs_type, int flags, +- const char *dev_name, void *data, struct vfsmount *mnt) ++static struct dentry *ipathfs_mount(struct file_system_type *fs_type, ++ int flags, const char *dev_name, void *data) + { +- int ret = get_sb_single(fs_type, flags, data, +- ipathfs_fill_super, mnt); +- if (ret >= 0) +- ipath_super = mnt->mnt_sb; ++ struct dentry *ret; ++ ret = mount_single(fs_type, flags, data, ipathfs_fill_super); ++ if (!IS_ERR(ret)) ++ ipath_super = ret->d_sb; + return ret; + } + +@@ -409,7 +405,7 @@ bail: + static struct file_system_type ipathfs_fs_type = { + .owner =THIS_MODULE, + .name = "ipathfs", +- .get_sb = ipathfs_get_sb, ++ .mount =ipathfs_mount, + .kill_sb = ipathfs_kill_super, + }; + +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_intr.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/ipath/ipath_intr.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_intr.c +@@ -33,6 +33,7 @@ + + #include + #include ++#include + + #include "ipath_kernel.h" + #include "ipath_verbs.h" +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_ruc.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/ipath/ipath_ruc.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_ruc.c +@@ -31,6 +31,7 @@ + * SOFTWARE. + */ + ++#include + #include + + #include "ipath_verbs.h" +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_ud.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/ipath/ipath_ud.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_ud.c +@@ -31,6 +31,7 @@ + * SOFTWARE. + */ + ++#include + #include + + #include "ipath_verbs.h" +Index: ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_user_sdma.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/infiniband/hw/ipath/ipath_user_sdma.c ofa_kernel-1.5.4.1/drivers/infiniband/hw/ipath/ipath_user_sdma.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include
[PATCH 3/6] [ofa_kernel] Add cxgb4_0000_correct__netdev_alloc_page.patch
Signed-off-by: Goldwyn Rodrigues --- .../cxgb4__correct__netdev_alloc_page.patch| 16 1 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 kernel_patches/backport/3.0_sles11sp2/cxgb4__correct__netdev_alloc_page.patch diff --git a/kernel_patches/backport/3.0_sles11sp2/cxgb4__correct__netdev_alloc_page.patch b/kernel_patches/backport/3.0_sles11sp2/cxgb4__correct__netdev_alloc_page.patch new file mode 100644 index 000..8d5fe01 --- /dev/null +++ b/kernel_patches/backport/3.0_sles11sp2/cxgb4__correct__netdev_alloc_page.patch @@ -0,0 +1,16 @@ +From: Goldwyn Rodrigues +Subject: Correct __netdev_alloc_page usage + +Index: ofa_kernel-1.5.4.1/drivers/net/cxgb4/sge.c +=== +--- ofa_kernel-1.5.4.1.orig/drivers/net/cxgb4/sge.c ofa_kernel-1.5.4.1/drivers/net/cxgb4/sge.c +@@ -527,7 +527,7 @@ static unsigned int refill_fl(struct ada + #endif + + while (n--) { +- pg = __netdev_alloc_page(adap->port[0], gfp); ++ pg = __netdev_alloc_page(adap->port[0], gfp, NULL); + if (unlikely(!pg)) { + q->alloc_failed++; + break; -- 1.7.7 -- Goldwyn -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/6] [ofa_kernel] Add 3.0_sles11sp2 in get_backport_dir.sh
Add 3.0_sles11sp2 in get_backport_dir.sh These patches were created for SLES11SP2 kernel version 3.0.26-0.5 TODO: Fix ehca,qlgc_vnic, qib Signed-off-by: Goldwyn Rodrigues --- ofed_scripts/get_backport_dir.sh | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ofed_scripts/get_backport_dir.sh b/ofed_scripts/get_backport_dir.sh index a30a2a8..97f3a81 100755 --- a/ofed_scripts/get_backport_dir.sh +++ b/ofed_scripts/get_backport_dir.sh @@ -213,8 +213,16 @@ get_backport_dir() 2.6.39*) echo 2.6.39 ;; -3.0* | 2.6.40*) -echo 3.0 + 2.6.40*) + echo 3.0 + ;; +3.0*) + minor=$(echo $KVERSION | cut -d "." -f 3 | cut -d "-" -f 1) + if [ $minor -gt 25 ]; then + echo 3.0_sles11sp2 + else + echo 3.0 + fi ;; 3.1*) echo 3.1 -- 1.7.7 -- Goldwyn -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: be2net: when can I expect roce support patch will be merged?
From: Roland Dreier Date: Sun, 1 Apr 2012 14:36:18 -0700 > On Sun, Apr 1, 2012 at 12:11 PM, David Miller wrote: >>> Did you get chance to merge below be2net patch for supporing RoCE driver? >>> http://marc.info/?l=linux-rdma&m=133279326217836&w=2 > >> The net-next tree isn't open, so you'll have to resubmit those >> patches to netdev once it is. > > Dave, how would you feel about me merging these two prereq patches > for 3.5, so that I can simply merge the ocrdma itself easily? No problem, feel free to add: Acked-by: David S. Miller -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Proposal to change Node Description naming scheme for HCA's
On 2 April 2012 06:49, Doug Ledford wrote: > I'm fine with this change. If people agree, I'll "make it so" in our > products. > > Sent from my ASUS Eee Pad > > Ira Weiny wrote: > > First, a question: what package installs the openibd script in OFED? For the > life of me I can't find this script in 1.5.4.1 or 3.2 ... :-/ [*] > > Right now the "standard" for node description is, AFAIK, " > HCA-", > where num is simply a counter for the HCA's as they are found in > /sys/class/infiniband. > > The problem is resolving this "random" HCA number to an actual HCA on the > host. I thought about including the node description in ibstat but that seems > a bit short sighted. I think the better solution would be to append the hca > name (ie mlx4_X, qibX, etc) to the hostname for the Node Description. > > Hacking the RHEL start up script is really easy to do this and results in nice > names on the fabric which are easily resolved by the infiniband-diags, > ibverbs, and perftest utilities. > > bash-4.1# ibhosts > Ca : 0x0002c90300325280 ports 1 "ending mlx4_2" > Ca : 0x00117579da38 ports 1 "happy qib0" > Ca : 0x0002c90300108f2e ports 1 "ending mlx4_1" > Ca : 0x00117577d90e ports 2 "ending qib0" > Ca : 0x0002c903004bebda ports 2 "happy mlx4_0" > bash-4.1# hostname > happy > bash-4.1# ibstat mlx4_0 > CA 'mlx4_0' > CA type: MT26428 > Number of ports: 2 > Firmware version: 2.8.600 > ... > bash-4.1# ibv_rc_pingpong -d mlx4_0 > local address: LID 0x0008, QPN 0x16004a, PSN 0x2e8316 > ... > bash-4.1# rdma_bw -d mlx4_0 > 6089: | port=18515 | ib_port=1 | size=65536 | tx_depth=100 | sl=0 | > iters=1000 | duplex=0 | cma=0 | > ... > > I realize this is really a distro thing but it would be nice if we could agree > to change the current "standard". > > I can send a patch for RHEL and OFED (if I someone can point me to the openibd > script or srpm). > > Thoughts? > Ira > > > [*] Last I knew openibd does the same as RHEL's rdma start up script in this > regard. > > -- > Ira Weiny > Member of Technical Staff > Lawrence Livermore National Lab > 925-423-8008 > wei...@llnl.gov > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html I have been doing something similar for a while. Joseph. -- Founder | Director | VP Research Orion Virtualisation Solutions | www.orionvm.com.au | Phone: 1300 56 99 52 | Mobile: 0428 754 846 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: be2net: when can I expect roce support patch will be merged?
On Sun, Apr 1, 2012 at 12:11 PM, David Miller wrote: >> Did you get chance to merge below be2net patch for supporing RoCE driver? >> http://marc.info/?l=linux-rdma&m=133279326217836&w=2 > The net-next tree isn't open, so you'll have to resubmit those > patches to netdev once it is. Dave, how would you feel about me merging these two prereq patches for 3.5, so that I can simply merge the ocrdma itself easily? That saves me having to merge some arbitrary point in net-next history into my tree or other inconvenience for you (like merging ocrdma through your tree). Anyway, I don't have a big problem whatever way you want to go, so just let me know... - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Proposal to change Node Description naming scheme for HCA's
I'm fine with this change. If people agree, I'll "make it so" in our products. Sent from my ASUS Eee Pad Ira Weiny wrote: First, a question: what package installs the openibd script in OFED? For the life of me I can't find this script in 1.5.4.1 or 3.2 ... :-/ [*] Right now the "standard" for node description is, AFAIK, " HCA-", where num is simply a counter for the HCA's as they are found in /sys/class/infiniband. The problem is resolving this "random" HCA number to an actual HCA on the host. I thought about including the node description in ibstat but that seems a bit short sighted. I think the better solution would be to append the hca name (ie mlx4_X, qibX, etc) to the hostname for the Node Description. Hacking the RHEL start up script is really easy to do this and results in nice names on the fabric which are easily resolved by the infiniband-diags, ibverbs, and perftest utilities. bash-4.1# ibhosts Ca : 0x0002c90300325280 ports 1 "ending mlx4_2" Ca : 0x00117579da38 ports 1 "happy qib0" Ca : 0x0002c90300108f2e ports 1 "ending mlx4_1" Ca : 0x00117577d90e ports 2 "ending qib0" Ca : 0x0002c903004bebda ports 2 "happy mlx4_0" bash-4.1# hostname happy bash-4.1# ibstat mlx4_0 CA 'mlx4_0' CA type: MT26428 Number of ports: 2 Firmware version: 2.8.600 ... bash-4.1# ibv_rc_pingpong -d mlx4_0 local address: LID 0x0008, QPN 0x16004a, PSN 0x2e8316 ... bash-4.1# rdma_bw -d mlx4_0 6089: | port=18515 | ib_port=1 | size=65536 | tx_depth=100 | sl=0 | iters=1000 | duplex=0 | cma=0 | ... I realize this is really a distro thing but it would be nice if we could agree to change the current "standard". I can send a patch for RHEL and OFED (if I someone can point me to the openibd script or srpm). Thoughts? Ira [*] Last I knew openibd does the same as RHEL's rdma start up script in this regard. -- Ira Weiny Member of Technical Staff Lawrence Livermore National Lab 925-423-8008 wei...@llnl.gov -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: be2net: when can I expect roce support patch will be merged?
From: Date: Sun, 1 Apr 2012 01:36:50 -0700 > Did you get chance to merge below be2net patch for supporing RoCE driver? > http://marc.info/?l=linux-rdma&m=133279326217836&w=2 The net-next tree isn't open, so you'll have to resubmit those patches to netdev once it is. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libmlx4: Fix a compiler warning
On 10/11/11 00:41, Roland Dreier wrote: > On Mon, Oct 10, 2011 at 10:47 AM, Bart Van Assche wrote: >> - uint32_t hi = *(uint32_t *)(gid->raw); >> - uint32_t lo = *(uint32_t *)(gid->raw + 4); >> - if (hi == htonl(0xfe80) && lo == 0) >> - return 1; >> + uint32_t hi = gid->u32[0]; >> + uint32_t lo = gid->u32[1]; > > Thanks, however I like to keep libmlx4 backwards compatible > if possible. So we can't do this unconditionally. How about the patch below ? [PATCH] libmlx4: Fix a compiler warning Avoid that link_local_gid() triggers the following compiler warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Bart Van Assche --- configure.in | 10 ++ src/verbs.c |5 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index 8aad5ff..eb03820 100644 --- a/configure.in +++ b/configure.in @@ -63,6 +63,16 @@ AM_CONDITIONAL(HAVE_IBV_DEVICE_LIBRARY_EXTENSION, test $IBV_DEVICE_LIBRARY_EXTENSION != IBV_DEVICE_LIBRARY_EXTENSION) AC_SUBST(IBV_DEVICE_LIBRARY_EXTENSION) +# Check whether ibv_gid has a member called u32. + +AC_CHECK_MEMBER([ibv_gid.u32], + [AC_DEFINE([HAVE_IBV_GID_U32], + 1, + [Define to 1 if ibv_gid has a member called u32.]) +], + [], + [#include ]) + AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, [if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then ac_cv_version_script=yes diff --git a/src/verbs.c b/src/verbs.c index 408fc6d..c7a08a5 100644 --- a/src/verbs.c +++ b/src/verbs.c @@ -624,8 +624,13 @@ int mlx4_destroy_qp(struct ibv_qp *ibqp) static int link_local_gid(const union ibv_gid *gid) { +#ifdef HAVE_IBV_GID_M32 + uint32_t hi = gid->u32[0]; + uint32_t lo = gid->u32[1]; +#else uint32_t hi = *(uint32_t *)(gid->raw); uint32_t lo = *(uint32_t *)(gid->raw + 4); +#endif if (hi == htonl(0xfe80) && lo == 0) return 1; -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
be2net: when can I expect roce support patch will be merged?
Hi, Did you get chance to merge below be2net patch for supporing RoCE driver? http://marc.info/?l=linux-rdma&m=133279326217836&w=2 Once this is done, Roland can merge ocrdma RoCE driver addition to his tree. This NIC driver patch is required to merge ocrdma patch. When can I expect this patch to be merged to net-next git tree? Let me know if there any issue with the patch that I got to resolve. Regards, Parav Pandit -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html