[ewg] [PATCH] IB/qib: initialize new portinfo link_layer field

2010-09-03 Thread Ralph Campbell
Vlad,

Please pull:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit acb980471b90f883eac1a7815a9980e045f47bf7
Author: Ralph Campbell (QLogic) 
Date:   Fri Sep 3 10:01:09 2010 -0700

IB/qib: initialize new portinfo link_layer field

The RoCE changes added a new field to struct ib_port_attr which
was uninitialized. This patch fixes that.

Signed-off-by: Ralph Campbell 
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: add recent kernel.org fixes

2010-08-04 Thread Ralph Campbell
Vlad,

Please pull the following for OFED-1.5.2:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit 0669da697c7779955806ef3dae3db4ecf68618cc
Author: Ralph Campbell (QLogic) 
Date:   Wed Aug 4 10:07:43 2010 -0700

IB/qib: add recent kernel.org fixes

Add the following patches to qib and fix up backports:
IB/qib: limit the number of packets processed per interrupt
IB/qib: fix race between qib_error_qp() and receive packet processing
IB/qib: if qib_init() fails, driver fails to clean up properly

Signed-off-by: Ralph Campbell 


Thanks!

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] Qlogic IB sources

2010-07-08 Thread Ralph Campbell
download
http://www.openfabrics.org/downloads/OFED/ofed-1.5.2/OFED-1.5.2-rc2.tgz

tar zxf OFED-1.5.2-rc2.tgz
cd OFED-1.5.2-rc2/SRPMS
rpm -ivh ofa_kernel-1.5.2-OFED.1.5.2.rc2.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bp ofa_kernel.spec
cd ../BUILD/ofa_kernel-1.5.2
ofed_scripts/ofed_patch.sh --with-backport=2.6.18-EL5.3

Change "2.6.18-EL5.3" to match the kernel you want to
install on.

You should see the qib source in:

drivers/infiniband/hw/qib/


The alternative is to:

git clone git://git.openfabrics.org/ofed_1_5/linux-2.6.git
cd linux-2.6
ofed_scripts/ofed_makedist.sh

The above will construct tar files for all the backported
kernel sources.

On Thu, 2010-07-08 at 17:31 -0700, Rajouri Jammu wrote:
> I was hoping to see the actual source tree in
>  drivers/infiniband/hw/qib instead of a set of patches.
> Is there a way to generate a clean source tree?
> 
> Here are the configure options from /etc/inifiniband/info
> 
> 
> echo "Configure options: --with-core-mod --with-user_mad-mod
> --with-user_access-mod --with-addr_trans-mod --with-mthca-mod
> --with-mlx4-mod --with-mlx4_en-mod --with-cxgb3-mod --with-nes-mod
> --with-ipoib-mod --with-sdp-mod --with-srp-mod --with-srp-target-mod
> --with-rds-mod --with-qib-mod --with-nfsrdma-mod"
> 
> 
> 
> 
> On Thu, Jul 8, 2010 at 11:53 AM, Vladimir Sokolovsky
>  wrote:
> 
> Rajouri Jammu wrote:
> I'm looking for the sources for the QIB driver.
> When I installed the
>  ofa_kernel-1.5.2-OFED.1.5.2.rc2.src.rpm I could not
> find the qib source.
> Is there a separate RPM?
> 
> 
> 
> 
> 
> QIB driver is a part of ofa_kernel source RPM. It can be found
> as a set of patches under kernel_patches/fixes/qib_*.
> To get the sources you should run configure script with
> corresponding parameters. See /etc/infiniband/info (after OFED
> installation).
> 
> Regards,
> Vladimir
> 
> 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] git tree for ofed docs

2010-07-02 Thread Ralph Campbell
git://git.openfabrics.org/~tziporet/docs.git


On Fri, 2010-07-02 at 15:15 -0700, Hefty, Sean wrote:
> Can someone point me to the git tree that contains the release notes/docs 
> that get pulled into the OFED releases?
> ___
> ewg mailing list
> ewg@lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] ofed_scripts/install.pl: Allow ib_qib to be installed on SLES 11 sp1

2010-06-30 Thread Ralph Campbell
This patch modifies the install.pl script so that the
ib_qib driver will be installed on 2.6.32 kernels.
In particular, for SLES 11 sp1.

Signed-off-by: Ralph Campbell 

diff --git a/install.pl b/install.pl
index 86a94e4..4b2ca6d 100755
--- a/install.pl
+++ b/install.pl
@@ -1713,7 +1713,7 @@ sub set_availability
 if ($arch =~ m/x86_64/) {
$packages_info{'infinipath-psm'}{'available'} = 1;
$packages_info{'infinipath-psm-devel'}{'available'} = 1;
-   if ($kernel =~ 
m/2\.6\.9-(67|78|89)|2\.6\.18-8[4-9]\..*el5|2\.6\.18-9[0-9]\..*el5|2\.6\.18-1[0-9][0-9]\..*el5|2\.6\.16\.[6-9][0-9]-.*-.*|2\.6\.27\..*-.*/)
 {
+   if ($kernel =~ 
m/2\.6\.9-(67|78|89)|2\.6\.18-[0-9]*\..*el5|2\.6\.16\.[6-9][0-9]-.*-.*|2\.6\.(27|32)\..*-.*/)
 {
$kernel_modules_info{'qib'}{'available'} = 1;
$packages_info{'libipathverbs'}{'available'} = 1;
$packages_info{'libipathverbs-devel'}{'available'} = 1;


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: initialize serdes for mezzanine cards

2010-06-30 Thread Ralph Campbell
IB/qib: initialize serdes for mezzanine cards

A number of QLogic mezzanine cards need to know which slot they are
connected to in order to set the serdes parameters correctly.
This is because there is no QSFP EEPROM to indicate the trace length
to the switch. The fix is to use dmidecode to get the blade slot number
and set the serdes accordingly.

Signed-off-by: Ralph Campbell 
---

Vlad,
You can pull this change from:
git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5


 ofed_scripts/ofa_kernel.spec |5 +
 ofed_scripts/openibd |   11 ++
 ofed_scripts/truescale.cmds  |  228 ++
 3 files changed, 244 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 ofed_scripts/openibd
 create mode 100644 ofed_scripts/truescale.cmds


diff --git a/ofed_scripts/ofa_kernel.spec b/ofed_scripts/ofa_kernel.spec
index e89a7b0..88dcb9f 100755
--- a/ofed_scripts/ofa_kernel.spec
+++ b/ofed_scripts/ofa_kernel.spec
@@ -333,6 +333,10 @@ install -m 0644 
$RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/mlx4_en.conf $R
 touch $RPM_BUILD_ROOT/%{IB_CONF_DIR}/connectx.conf
 %endif
 
+%if %{build_qib}
+install -m 0644 
$RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/truescale.cmds 
$RPM_BUILD_ROOT/%{IB_CONF_DIR}
+%endif
+
 %if %{build_ipoib}
 install -d $RPM_BUILD_ROOT/sbin
 install -m 0755 
$RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ib_ipoib_sysctl 
$RPM_BUILD_ROOT/sbin
@@ -737,6 +741,7 @@ fi
 %endif
 %if %{build_qib}
 %{LIB_MOD_DIR_INF}/hw/qib
+%config(noreplace) %{IB_CONF_DIR}/truescale.cmds
 %endif
 %if %{build_ipath}
 %{LIB_MOD_DIR_INF}/hw/ipath
diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
old mode 100755
new mode 100644
index 6d79c9d..034216c
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -2,6 +2,7 @@
 
 #
 # Copyright (c) 2006 Mellanox Technologies. All rights reserved.
+# Copyright (c) 2010 QLogic Corporation. All rights reserved.
 #
 # This Software is licensed under one of the following licenses:
 #
@@ -302,6 +303,7 @@ STATUS_MODULES="$STATUS_MODULES ib_qib"
 
 ipoib_ha_pidfile=/var/run/ipoib_ha.pid
 srp_daemon_pidfile=/var/run/srp_daemon.pid
+_truescale=/etc/infiniband/truescale.cmds
 
 get_interfaces()
 {
@@ -837,6 +839,8 @@ start()
 my_rc=$?
 if [ $my_rc -ne 0 ]; then
 echo_failure $"Loading QLogic QIB driver: "
+   elif [ -s ${_truescale} ]; then
+. ${_truescale} start
 fi
 RC=$[ $RC + $my_rc ]
 fi
@@ -1153,6 +1157,13 @@ unload()
${modprobe} -v -r $mod > /dev/null 2>&1
sleep 2
;;
+   ib_qib)
+   if [ -s ${_truescale} ]; then
+. ${_truescale} stop
+   fi
+rm_mod $mod
+   sleep 2
+   ;;
ib_mthca | mlx4_ib | ib_ehca | iw_cxgb3 | iw_nes)
 rm_mod $mod
sleep 2
diff --git a/ofed_scripts/truescale.cmds b/ofed_scripts/truescale.cmds
new file mode 100644
index 000..dc88107
--- /dev/null
+++ b/ofed_scripts/truescale.cmds
@@ -0,0 +1,228 @@
+# Copyright (c) 2010 QLogic Corporation.
+# All rights reserved.
+#
+# This software is available to you under a choice of one of two
+# licenses.  You may choose to be licensed under the terms of the GNU
+# General Public License (GPL) Version 2, available from the file
+# COPYING in the main directory of this source tree, or the
+# OpenIB.org BSD license below:
+#
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+#
+#  - Redistributions of source code must retain the above
+#copyright notice, this list of conditions and the following
+#disclaimer.
+#
+#  - Redistributions in binary form must reproduce the above
+#copyright notice, this list of conditions and the following
+#disclaimer in the documentation and/or other materials
+#provided with the distribution.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+# This script does truescale (qib) adapter-specific actions, and is
+# sourced from the /etc/init.d/openibd script after the ib_qib module
+# is loaded, and before it is unloaded, and is passed the corresponding
+# start

Re: [ewg] [PATCH 1/2] ofed_scripts: add chkconfig comments for openibd

2010-06-24 Thread Ralph Campbell
OK. I missed that.

On Thu, 2010-06-24 at 01:53 -0700, Vladimir Sokolovsky wrote:
> Ralph Campbell wrote:
> > The /etc/init.d/openibd script doesn't have the magic comments that
> > chkconfig looks for when enabling/disabling services. This patch
> > adds the comments.
> > 
> > Signed-off-by: Ralph Campbell 
> > ---
> > 
> 
> Hi Ralph,
> These chkconfig comments being added to the openibd script during kernel-ib 
> RPM installation.
> See ofa_kernel.spec file.
> Note that these comments have different format for SLES and RedHat OSes.
> 
> Regards,
> Vladimir
> 
> 
> >  ofed_scripts/openibd |   11 +++
> >  1 files changed, 11 insertions(+), 0 deletions(-)
> > 
> > diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
> > index fa65611..8d6da99 100755
> > --- a/ofed_scripts/openibd
> > +++ b/ofed_scripts/openibd
> > @@ -2,6 +2,7 @@
> >  
> >  #
> >  # Copyright (c) 2006 Mellanox Technologies. All rights reserved.
> > +# Copyright (c) 2010 QLogic Corporation. All rights reserved.
> >  #
> >  # This Software is licensed under one of the following licenses:
> >  #
> > @@ -29,6 +30,16 @@
> >  #
> >  #  $Id: openibd 9139 2006-08-29 14:03:38Z vlad $
> >  #
> > +### BEGIN INIT INFO
> > +# Provides:openibd
> > +# Required-Start:
> > +# Required-Stop:
> > +# Default-Start:   2 3 5
> > +# Default-Stop:0 1 6
> > +# Short-Description: InfiniBand kernel modules and services
> > +# Description:   Start InfiniBand and IWARP services, and configure 
> > InfiniBand
> > +#   network interfaces and other services.
> > +### END INIT INFO
> >  
> >  # config: /etc/infiniband/openib.conf
> >  CONFIG="/etc/infiniband/openib.conf"
> > 
> > 
> 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: sync kernel.org qib changes for OFED 1.5.2

2010-06-23 Thread Ralph Campbell
Vlad,

Please pull:
git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit dcf46324da0b1cc28a34fc78dce32ed2e0340646
Author: Ralph Campbell (QLogic) 
Date:   Wed Jun 23 14:12:58 2010 -0700

IB/qib: sync 2.6.35 kernel.org qib changes for OFED 1.5.2

This patch adds the following from linux-rdma.

IB/qib: clear eager buffer memory for each new process
IB/qib: avoid a rare 7322 chip problem by not marking VL15 bufs as WC
IB/qib: mask hardware error during link reset
IB/qib: allow PSM to select from multiple port assignment algorithms
IB/qib: turn off IB latency mode
IB/qib: completion queue callback needs to be single threaded

Signed-off-by: Ralph Campbell 
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH 2/2] ofed_scripts: add iw_cm to the list of modules to unload

2010-06-23 Thread Ralph Campbell
The list of Infiniband modules to unload when stopping the driver
didn't include iw_cm. This can cause other modules to fail to unload.

Signed-off-by: Ralph Campbell 
---

 ofed_scripts/openibd |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index 8d6da99..832fa7e 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -305,7 +305,7 @@ UNLOAD_MODULES="ib_mthca mlx4_ib ib_ipath ipath_core 
ib_ehca iw_nes iw_cxgb3 cxg
 UNLOAD_MODULES="$UNLOAD_MODULES ib_qib"
 UNLOAD_MODULES="$UNLOAD_MODULES ib_ipoib ib_madeye ib_rds"
 UNLOAD_MODULES="$UNLOAD_MODULES rds_rdma rds_tcp rds ib_ucm kdapl 
ib_srp_target scsi_target ib_srpt ib_srp ib_iser ib_sdp"
-UNLOAD_MODULES="$UNLOAD_MODULES rdma_ucm rdma_cm ib_addr ib_cm ib_local_sa 
findex"
+UNLOAD_MODULES="$UNLOAD_MODULES rdma_ucm rdma_cm ib_addr iw_cm ib_cm 
ib_local_sa findex"
 UNLOAD_MODULES="$UNLOAD_MODULES ib_sa ib_uverbs ib_umad ib_mad ib_core"
 
 STATUS_MODULES="rdma_ucm ib_rds rds rds_rdma rds_tcp ib_srpt ib_srp qlgc_vnic 
ib_sdp rdma_cm ib_addr ib_local_sa findex ib_ipoib ib_ehca ib_ipath ipath_core 
mlx4_core mlx4_ib mlx4_en ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad 
ib_core iw_cxgb3 iw_nes"

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH 1/2] ofed_scripts: add chkconfig comments for openibd

2010-06-23 Thread Ralph Campbell
The /etc/init.d/openibd script doesn't have the magic comments that
chkconfig looks for when enabling/disabling services. This patch
adds the comments.

Signed-off-by: Ralph Campbell 
---

 ofed_scripts/openibd |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index fa65611..8d6da99 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -2,6 +2,7 @@
 
 #
 # Copyright (c) 2006 Mellanox Technologies. All rights reserved.
+# Copyright (c) 2010 QLogic Corporation. All rights reserved.
 #
 # This Software is licensed under one of the following licenses:
 #
@@ -29,6 +30,16 @@
 #
 #  $Id: openibd 9139 2006-08-29 14:03:38Z vlad $
 #
+### BEGIN INIT INFO
+# Provides:openibd
+# Required-Start:
+# Required-Stop:
+# Default-Start:   2 3 5
+# Default-Stop:0 1 6
+# Short-Description: InfiniBand kernel modules and services
+# Description:   Start InfiniBand and IWARP services, and configure 
InfiniBand
+#   network interfaces and other services.
+### END INIT INFO
 
 # config: /etc/infiniband/openib.conf
 CONFIG="/etc/infiniband/openib.conf"

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: more fixes for OFED 1.5.2

2010-04-28 Thread Ralph Campbell
Vlad,

Please pull for OFED-1.5.2:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit 489dfc902a7b1e8f60ad996fec00113642301225
Author: Ralph Campbell (QLogic) 
Date:   Wed Apr 28 16:12:30 2010 -0700

IB/qib: more fixes for OFED 1.5.2

More serdes tuning changes for interop.
Fix a MR reference count bug with UC RDMA writes with immediate.
Fix a deadlock race when registering more than one device with DCA.

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: fix qib backport to RHEL 5.5

2010-04-26 Thread Ralph Campbell
Vlad,

Please pull the fix for OFED bug 2041.

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit e59e4bc5fe76a5a8d9bdfa9407746d5227873bd9
Author: Ralph Campbell (QLogic) 
Date:   Mon Apr 26 10:58:37 2010 -0700

IB/qib: fix qib backport to RHEL 5.5

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: backport fixes for OFED 1.5.2

2010-04-20 Thread Ralph Campbell
Vlad,
This should fix the nightly build issues.

Please pull for OFED-1.5.2:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit aaf5a11f6b1d466b5aaf2c9dd40b43dbe8f389bc
Author: Ralph Campbell (QLogic) 
Date:   Tue Apr 20 17:20:16 2010 -0700

IB/qib: backport fixes for OFED 1.5.2

Update the backport patches for OFED 1.5.2.

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH]

2010-04-19 Thread Ralph Campbell
Vlad,

Please pull for OFED-1.5.2:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5


commit b48db55de53486afcdf0422d79684627045731de
Author: Ralph Campbell (QLogic) 
Date:   Mon Apr 19 11:35:04 2010 -0700

IB/qib: fixes for OFED 1.5.2

This updates the QDR HCA serdes settings to improve reliability
and is needed for the next IB interoperability event.

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: update release notes for OFED 1.5.1

2010-03-16 Thread Ralph Campbell
Vlad,

Please pull for OFED 1.5.1:

git://git.openfabrics.org/~ralphc/docs/.git ofed_1_5

commit 603664ee21f55b7c642e41475469f870ce98a7ea
Author: Ralph Campbell (QLogic) 
Date:   Tue Mar 16 15:33:01 2010 -0700

IB/qib: update release notes for OFED 1.5.1

Update release notes for OFED 1.5.1.

Signed-off-by: Ralph Campbell 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] ipoib: Fix lockup of the tx queue

2010-03-11 Thread Ralph Campbell
On Thu, 2010-03-11 at 13:52 -0800, Roland Dreier wrote:
> > Sorry, I was referring to my patch not Eli's.
> 
> Heh, I never would have said anything about your patch was "obvious".
> I skimmed yours once but I do want to read it more carefully.
> 
> Did you ever say what test case you are using to provoke the problem you're 
> fixing?

I think I did but it is just UDP stress tests in general.
Throwing in some link failures and switching between connected
and datagram modes helps too. netperf, qperf, etc. should work.
Anything which causes the connected mode QP to fail should
exercise the fix too.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] ipoib: Fix lockup of the tx queue

2010-03-11 Thread Ralph Campbell
Sorry, I was referring to my patch not Eli's.

On Thu, 2010-03-11 at 13:41 -0800, Ralph Campbell wrote:
> On Thu, 2010-03-11 at 13:38 -0800, Roland Dreier wrote:
> > good debugging, applied thanks.
> > 
> > I do worry (as Moni mentioned) that this doesn't explain why you would
> > get send failures in this case, but the patch itself is well-explained
> > and looks "obviously correct" so I think we should apply it.
> 
> Well, after more testing it seems there may still be a problem.
> I haven't isolated it yet though. I could definitely use help
> reviewing the code changes.
> 
> ___
> ewg mailing list
> ewg@lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] ipoib: Fix lockup of the tx queue

2010-03-11 Thread Ralph Campbell
On Thu, 2010-03-11 at 13:38 -0800, Roland Dreier wrote:
> good debugging, applied thanks.
> 
> I do worry (as Moni mentioned) that this doesn't explain why you would
> get send failures in this case, but the patch itself is well-explained
> and looks "obviously correct" so I think we should apply it.

Well, after more testing it seems there may still be a problem.
I haven't isolated it yet though. I could definitely use help
reviewing the code changes.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: clear symbol error counters on link UP

2010-03-09 Thread Ralph Campbell
Vlad,

Please pull:
git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

Thanks.

commit 0ff7a6e94e7e98a8f10d1c01e70c6f26d776c4ee
Author: Ralph Campbell (QLogic) 
Date:   Tue Mar 9 16:09:47 2010 -0800

IB/qib: clear symbol error counters on link UP

Clear symbol error counters on link UP.

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] perftest/ib_send_bw: bidirectional tests have too small completion queue

2010-03-05 Thread Ralph Campbell
When ib_send_bw -b is run, too few completion queue entries are created
since client and server may each have rx_depth + tx_depth posted work
queue entries outstanding. The consequence is that CQ entries can be
lost due to the queue being full and the test hangs.

Signed-off-by: Ralph Campbell 

diff --git a/send_bw.c b/send_bw.c
index ddd2b73..37219cd 100644
--- a/send_bw.c
+++ b/send_bw.c
@@ -743,6 +743,9 @@ static struct pingpong_context *pp_init_ctx(struct 
ibv_device *ib_dev,
return NULL;
}
}
+   if (user_parm->duplex) {
+   cq_rx_depth += tx_depth;
+   }
if (user_parm->use_mcg && !user_parm->servername) {
cq_rx_depth *= user_parm->num_of_clients_mcg;
}


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: fix spinlock deadlock in completion queue callbacks

2010-02-22 Thread Ralph Campbell
Vlad,

Please pull:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit 57af4d2e570550affd97306aa65c14f1a0bf9ace
Author: Ralph Campbell (QLogic) 
Date:   Mon Feb 22 17:22:43 2010 -0800

IB/qib: fix spinlock deadlock in completion queue callbacks

The problem is that ipoib_cm_handle_tx_wc() assumes it is always
being called from a soft IRQ context and calls netif_tx_lock() expecting
that netif_tx_lock_bh() will prevent completion callbacks from happening.
In QIB, the callback is done in a tasklet which is not stopped
by netif_tx_lock_bh(). The fix is to call local_bh_disable() and
local_bh_enable() around the completion callback.

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: update driver for OFED 1.5.1

2010-02-18 Thread Ralph Campbell
Vlad,

Please pull from:

git://git.openfabrics.org/~ralphc/linux-2.6 ofed_kernel_1_5

commit bbf2471eac44a9cf2db05803a212162da3898ca4
Author: Ralph Campbell (QLogic) 
Date:   Thu Feb 18 13:53:24 2010 -0800

IB/qib: update driver for OFED 1.5.1

This patch rolls up several fixes for the QIB driver to improve
serdes settings, minor bug fixes, and copyright updates.
It also adds a vendor specific performance MAD for returning some
congestion statistics.

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: set serdes parameters based on QSFP data and attenuation

2009-12-16 Thread Ralph Campbell
Vlad, these two patches are needed for the interop cable testing that is 
scheduled
to happen soon.

Please pull:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_1_5

commit 47542fd9bd8a6893a465a553209674d83f3f661e
Author: Ralph Campbell (QLogic) 
Date:   Wed Dec 16 17:19:55 2009 -0800

IB/qib: fix RHEL 4 U8 backport for /dev/ipath

The /dev/ipath* files were not being created by udev because
a "dev" file in /sys/class/ipath/... was not created. Newer versions
of udev don't seem to have this requirement. Also, vmalloc_to_page()
doesn't seem to check for zero and panics the system so fix that too.

Signed-off-by: Ralph Campbell 

commit 52bda772f225ec11a011f05c61ca97d85e6024db
Author: Ralph Campbell (QLogic) 
Date:   Wed Dec 16 17:18:22 2009 -0800

IB/qib: set serdes parameters based on QSFP data and attenuation

The code to set the serdes parameters was rather ad-hoc and based
on early releases of vendor's cables before the full QSFP data was
programmed. This patch makes the process more robust and uses the
attenuation field if available.

Signed-off-by: Ralph Campbell 
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] install: enable QIB to compile on RHEL 4 U8

2009-12-11 Thread Ralph Campbell
Vlad,
Please pull this one line change to ofed_scripts.
It can be pulled from here:

git://git.openfabrics.org/~ralphc/ofed_scripts/.git ofed_1_5

commit 0080ff44bbc00dcf229d6892905aa30ef2766b44
Author: Ralph Campbell (QLogic) 
Date:   Fri Dec 11 18:34:44 2009 -0800

install: enable QIB to compile on RHEL 4 U8

Signed-off-by: Ralph Campbell 

diff --git a/install.pl b/install.pl
index f5894ff..91509fd 100755
--- a/install.pl
+++ b/install.pl
@@ -1674,7 +1674,7 @@ sub set_availability
 #($arch =~ m/x86_64/ and
 # $kernel =~ m/2.6.9-42|2.6.9-55|2.6.9-67|2.6.9-78|2.6.16.[0-9.]*-[
 if ($arch =~ m/x86_64/ and
-$kernel =~ 
m/2.6.9-67|2.6.9-78|2\.6\.18-8[4-9]\..*el5.*|2\.6\.18-9[0-9]\..*el5.*|2\.6\.18-1[0-9][0-9]\..*el5.*|2\.6\.16\.[6-9][0-9]-.*-.*|2\.6\.27\..*-.*/)
 {
+$kernel =~ 
m/2\.6\.9-(67|78|89)|2\.6\.18-8[4-9]\..*el5|2\.6\.18-9[0-9]\..*el5|2\.6\.18-1[0-9][0-9]\..*el5|2\.6\.16\.[6-9][0-9]-.*-.*|2\.6\.27\..*-.*/)
 {
 $kernel_modules_info{'qib'}{'available'} = 1;
 $packages_info{'libipathverbs'}{'available'} = 1;
 $packages_info{'libipathverbs-devel'}{'available'} = 1;

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: fix backport patches for RHEL 5

2009-12-09 Thread Ralph Campbell
Vlad, please pull the following since I made a minor
error in one of the backport patches from yesterday.

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit 5f541de203009c2bcc13c110f8b70cb976b0e0d2
Author: Ralph Campbell (QLogic) 
Date:   Wed Dec 9 12:16:03 2009 -0800

IB/qib: fix backport patches for RHEL 5

The RHEL 5 backports for the IPoIB device stop deadlock commit had
a bug where the wrong work queue was being flushed.
This updates the patches to use the correct flush.

Signed-off-by: Ralph Campbell 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: fix IPoIB device stop deadlock

2009-12-08 Thread Ralph Campbell
Vlad, please pull 4 more fixes to the qib driver from:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

commit 70f277ec61809c15b3352aa6b650882ebef05235
Author: Ralph Campbell (QLogic) 
Date:   Tue Dec 8 17:14:43 2009 -0800

IB/qib: fix IPoIB device stop deadlock

We create our own workqueue mainly because we want to be
able to flush it when devices are being removed.  We can't
use schedule_work()/flush_scheduled_work() because both
unregister_netdev() and linkwatch_event take the rtnl lock,
so flush_scheduled_work() can deadlock during device removal.

Signed-off-by: Mitko Haralanov 

commit 9e829f8742501afefc49c1b16945322cd6577dfd
Author: Ralph Campbell (QLogic) 
Date:   Tue Dec 8 17:12:02 2009 -0800

IB/qib: serdes changes for QME7342 serdes

Because we now have different values of H1 all over, I redid the h1_vals
code that we weren't really using, changed it to a single h1_val,
and initialized for the board types that need different values.

Signed-off-by: Dave Olson 

commit 52cb89d80698f6cfdf7d58f0b0bbef85cd70dc69
Author: Ralph Campbell (QLogic) 
Date:   Tue Dec 8 17:11:22 2009 -0800

IB/qib: added missing code to report if 7322 memory BIST failed

Don't clear the memory built-in-self-test error bit so it gets reported.

Signed-off-by: Dave Olson 

commit 56d291199ea1479a441af974ab3f311b4703c897
Author: Ralph Campbell (QLogic) 
Date:   Tue Dec 8 17:10:35 2009 -0800

IB/qib: improve twsi error messages for human beings

Some people were confused by TWSI, so make messages somewhat clearer.

Signed-off-by: Dave Olson 



___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] IB/qib: latest QIB driver fixes

2009-12-02 Thread Ralph Campbell
No reason not to wait unless it goes beyond OFED-1.5
ship date. I don't think waiting until the last minute
is a good idea. Note that this interface is between ib_qib
and ib_core so if the final form accepted upstream is
different, it can be changed without impact since the kernel
modules are all compiled at the same time. I don't think
this is likely to happen since it fixes Roland's original
concern with exporting struct ib_port.

On Tue, 2009-12-01 at 01:48 -0800, Or Gerlitz wrote:
> Ralph Campbell wrote:
> > Vlad, please pull from
> >   
> Ralph, Tziporet, any reason not to wait till this core patch is accepted 
> to the mainline kernel?
> 
> Or.
> 
> > commit 840bbefeda26d21bffae6b7cdc88e981fcfb0a45
> > Author: Ralph Campbell (QLogic) 
> > Date:   Mon Nov 30 14:09:34 2009 -0800
> >
> > IB/core: allow HCAs to create IB port sysfs files
> > This patch adds a new function to sysfs.c so that HCAs can
> > create files in /sys/class/infiniband//ports//.
> > There is no need for an unregister function since the kobject
> >     reference will go to zero when ib_unregister_device() is called.
> > 
> > Signed-off-by: Ralph Campbell 
> >
> >   
> 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: latest QIB driver fixes

2009-11-30 Thread Ralph Campbell
Vlad, please pull from

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

for the following changes:

commit 2b4ea21146db9d57dc2ac496149f8b047b5b6fa5
Author: Ralph Campbell (QLogic) 
Date:   Mon Nov 30 14:16:11 2009 -0800

IB/qib: merge latest driver fixes

This patch fixes several bugs found during testing.

Signed-off-by: Ralph Campbell 

commit bbb6332fa221f8acaf30a984625ded6219565f2d
Author: Ralph Campbell (QLogic) 
Date:   Mon Nov 30 14:11:37 2009 -0800

IB/ipath: Remove support for QLogic PCIe QLE devices

The ib_qib driver is replacing the support for QLogic PCIe QLE devices
and is removed from ib_ipath by this patch. The ib_ipath driver
only supports the obsolete QLogic Hyper-Transport IB host channel
adapter (model QHT7140).

Signed-off-by: Ralph Campbell 

commit 840bbefeda26d21bffae6b7cdc88e981fcfb0a45
Author: Ralph Campbell (QLogic) 
Date:   Mon Nov 30 14:09:34 2009 -0800

IB/core: allow HCAs to create IB port sysfs files
This patch adds a new function to sysfs.c so that HCAs can
create files in /sys/class/infiniband//ports//.
There is no need for an unregister function since the kobject
reference will go to zero when ib_unregister_device() is called.

Signed-off-by: Ralph Campbell 

commit 829706f52d9182fdd82fee9b939e7db6b3dfb9cd
Author: Ralph Campbell (QLogic) 
Date:   Mon Nov 30 14:06:07 2009 -0800

backport: export kobject_create_and_add() and kobject_init_and_add()

Export the functions kobject_create_and_add() and kobject_init_and_add()
so other modules can use them.

Signed-off-by: Ralph Campbell 
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] max_mr limit with ipath and QLOGIC 7240

2009-11-19 Thread Ralph Campbell
You can edit /etc/modprobe.conf (or /etc/modprobe.conf.local on SLES)
and edit or add the line:

options ib_ipath lkey_table_size=16

The number is a power of 2 to set the table size.
Then restart the driver ("service openibd restart").

On Thu, 2009-11-19 at 08:09 -0800, Roberto Rey Exposito wrote:
> I have a problem with the Qlogic 7240 card because I can only register
> 4096 memory regions. The ibv_deinfo -v output is:
> 
> -bash-3.2$ ibv_devinfo -v
> hca_id:ipath0
> fw_ver:0.0.0
> node_guid:0011:7500:00ff:6857
> sys_image_guid:0011:7500:00ff:6857
> vendor_id:0x1175
> vendor_part_id:29216
> hw_ver:0x2
> board_id:InfiniPath_QLE7240
> phys_port_cnt:1
> max_mr_size:0x
> page_size_cap:0x1000
> max_qp:16384
> max_qp_wr:16383
> device_cap_flags:0x3d06
> max_sge:96
> max_sge_rd:0
> max_cq:131071
> max_cqe:196607
> max_mr:4096
> ...
> 
> The attribute max_mr is only 4096, and in other cards (Mellanox for
> example) this value is 131072.
> 
> Can I change this max_mr value? 
> 
> Sorry for my english
> 
> Bye
> 
> -- 
> Roberto Rey Expósito
> 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] Re: New source release of libipathverbs-1.2.tar.gz

2009-11-17 Thread Ralph Campbell
The tar file I previously announced was built incorrectly.
I have updated the tar file and the ipath/README.
The correct version has a sha1sum of
462c07f85b4d568ef72846865ee48ba0af4bb015.

On Mon, 2009-11-16 at 17:50 -0800, Ralph Campbell wrote:
> I have updated the latest released source tarball for libipathverbs
> which can be found at:
> 
> http://www.openfabrics.org/downloads/libipathverbs/libipathverbs-1.2.tar.gz
> 
> Vlad, please update OFED-1.5 to include this version.
> 
> --
> 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

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] New source release of libipathverbs-1.2.tar.gz

2009-11-16 Thread Ralph Campbell
I have updated the latest released source tarball for libipathverbs
which can be found at:

http://www.openfabrics.org/downloads/libipathverbs/libipathverbs-1.2.tar.gz

Vlad, please update OFED-1.5 to include this version.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/perftest: print bidirectional ib_send_bw statistics for UC/UD

2009-10-29 Thread Ralph Campbell
Print statistics on the server side for ib_send_bw when doing
bidirectional tests similar to ib_send_lat.

Signed-off-by: Ralph Campbell 

diff --git a/send_bw.c b/send_bw.c
index 9624cfe..2f0a29d 100644
--- a/send_bw.c
+++ b/send_bw.c
@@ -1448,9 +1448,10 @@ int main(int argc, char *argv[])
if(run_iter_uni(ctx, &user_param, rem_dest, 
size))
return 17;
}
-   if (user_param.servername) {
+   if (user_param.servername || user_param.duplex)
print_report(user_param.iters, size, 
user_param.duplex, tposted, tcompleted, noPeak, no_cpu_freq_fail);
-   /* sync again for the sake of UC/UC */
+   if (user_param.servername) {
+   /* sync again for the sake of UC/UD */
rem_dest = pp_client_exch_dest(sockfd, 
&my_dest, &user_param);
} else
rem_dest = pp_server_exch_dest(sockfd, 
&my_dest, &user_param);


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/perftest: increase CQ size to avoid overflow

2009-10-29 Thread Ralph Campbell
When running the ib_send_bw test bidirectional, there can be
ctx->rx_depth + ctx->tx_depth/2 number of outstanding posted work
queue entries but the (shared) completion queue is only size
ctx->rx_depth. This can lead to completions being lost and the test
hanging. Since memory isn't limited in the microbenchmark test and
I think the ctx->tx_depth/2 send limit should probably be ctx->tx_depth,
make the CQ size be ctx->rx_depth + ctx->tx_depth.

Signed-off-by: Ralph Campbell 

diff --git a/send_bw.c b/send_bw.c
index f842fb9..9624cfe 100644
--- a/send_bw.c
+++ b/send_bw.c
@@ -489,7 +489,8 @@ static struct pingpong_context *pp_init_ctx(struct 
ibv_device *ib_dev,
}
}
 
-   ctx->cq = ibv_create_cq(ctx->context, ctx->rx_depth, NULL, 
ctx->channel, 0);
+   ctx->cq = ibv_create_cq(ctx->context, ctx->rx_depth + ctx->tx_depth,
+   NULL, ctx->channel, 0);
if (!ctx->cq) {
fprintf(stderr, "Couldn't create CQ\n");
return NULL;


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: update driver with latest fixes

2009-09-11 Thread Ralph Campbell
Vlad,

Please pull for OFED-1.5

git://git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel_1_5

commit 4fc3bd26b6bca72cdc1c06c326ead7aa61aa240d
Author: Ralph Campbell (QLogic) 
Date:   Fri Sep 11 10:54:29 2009 -0700

IB/qib: update driver with latest fixes

This patch updates the QIB driver with the latest bug fixes
and updates the backport patches to match.

Signed-off-by: Ralph Campbell 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] ib_send_bw: print server statistics if bidirectional test

2009-08-14 Thread Ralph Campbell
The results of a bidirectional test are not displayed without
this patch.

Signed-off-by: Ralph Campbell 

diff --git a/send_bw.c b/send_bw.c
index f842fb9..d6fa394 100755
--- a/send_bw.c
+++ b/send_bw.c
@@ -1447,7 +1447,7 @@ int main(int argc, char *argv[])
if(run_iter_uni(ctx, &user_param, rem_dest, 
size))
return 17;
}
-   if (user_param.servername) {
+   if (user_param.servername || user_param.duplex) {
print_report(user_param.iters, size, 
user_param.duplex, tposted, tcompleted, noPeak, no_cpu_freq_fail);
/* sync again for the sake of UC/UC */
rem_dest = pp_client_exch_dest(sockfd, 
&my_dest, &user_param);


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] RE: [ofa-general] [PATCH] ib_send_bw -b can hang due to too few CQ entries

2009-08-06 Thread Ralph Campbell
On Thu, 2009-08-06 at 14:56 -0700, Sean Hefty wrote:
> >Sure. Just above the call to ibv_create_cq(), ctx->rx_depth is set to
> > ctx->rx_depth = rx_depth + tx_depth
> >but the rest of the code does ibv_post_send() and ibv_post_recv()
> >based on ctx->tx_depth and ctx->rx_depth which means the CQ needs
> >to be ctx->tx_depth + ctx->rx_depth big.
> 
> If the tx_depth is the same on both sides, why would there ever be more than 
> the
> initial tx_depth and rx_depth completions on the CQ?  How many receive
> completions can there be on the CQ, and what throttles the sender? 
> 
> - Sean

Remember that this fix only affects the bi-directional test.
Both client and sever are going to post ctx->rx_depth receives
and ctx->tx_depth sends and then check for completions.
It won't post more sends or receives until the completions are
seen.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] RE: [ofa-general] [PATCH] ib_send_bw -b can hang due to too few CQ entries

2009-08-06 Thread Ralph Campbell
On Thu, 2009-08-06 at 14:37 -0700, Sean Hefty wrote:
> >-ctx->cq = ibv_create_cq(ctx->context, ctx->rx_depth, NULL, ctx->channel,
> >0);
> >+ctx->cq = ibv_create_cq(ctx->context, ctx->tx_depth + ctx->rx_depth,
> >+NULL, ctx->channel, 0);
> 
> I'm looking at a windows port of this test, but at least there, rx_depth is 
> set
> to rx_depth + tx_depth.

Sure. Just above the call to ibv_create_cq(), ctx->rx_depth is set to
ctx->rx_depth = rx_depth + tx_depth
but the rest of the code does ibv_post_send() and ibv_post_recv()
based on ctx->tx_depth and ctx->rx_depth which means the CQ needs
to be ctx->tx_depth + ctx->rx_depth big.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] ib_send_bw -b can hang due to too few CQ entries

2009-08-06 Thread Ralph Campbell
When ib_send_bw is run in bi-directional mode (-b), it doesn't
create enough completion queue entries for both the send *and*
the receive completions. Thus, CQ entries are lost due to the
queue being full and the test can hang.

Signed-off-by: Ralph Campbell 

diff --git a/send_bw.c b/send_bw.c
index f842fb9..d5c4e63 100755
--- a/send_bw.c
+++ b/send_bw.c
@@ -489,7 +489,8 @@ static struct pingpong_context *pp_init_ctx(struct 
ibv_device *ib_dev,
}
}
 
-   ctx->cq = ibv_create_cq(ctx->context, ctx->rx_depth, NULL, 
ctx->channel, 0);
+   ctx->cq = ibv_create_cq(ctx->context, ctx->tx_depth + ctx->rx_depth,
+   NULL, ctx->channel, 0);
if (!ctx->cq) {
fprintf(stderr, "Couldn't create CQ\n");
return NULL;


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH]

2009-07-17 Thread Ralph Campbell
Vlad,

Please use git://git.openfabrics.org/~ralphc/libipathverbs/.git ofed_1_5

for OFED-1.5.

The only change from OFED-1.4 is the following commit:

commit 3978e32b233c0f5a8977082a33df50ffba96dc26
Author: Ralph Campbell (QLogic) 
Date:   Fri Jul 17 16:30:49 2009 -0700

IB/libipathverbs: change PathScale to QLogic

The spec file used to construct RPMs is updated to change PathScale to 
QLogic

Signed-off-by: Ralph Campbell 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/qib: fix compiler errors for 2.6.30

2009-07-09 Thread Ralph Campbell
Vlad,

Please pull:
git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

This should fix the 2.6.30 build errors.

commit 4047cc3120a7c9b36fbddc3158ae0c01ec6636d9
Author: Ralph Campbell (QLogic) 
Date:   Thu Jul 9 15:47:02 2009 -0700

IB/qib: backport QIB from 2.6.30 to 2.6.27

Signed-off-by: Ralph Campbell 

commit 7251f2dbf99d0a97ea936f277d85baecbeafa1fd
Author: Ralph Campbell (QLogic) 
Date:   Thu Jul 9 15:43:52 2009 -0700

IB/qib: fix compiler errors for 2.6.30

Signed-off-by: Ralph Campbell 



___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] install.pl: Install QIB driver instead of Ipath

2009-07-08 Thread Ralph Campbell
On Wed, 2009-07-08 at 17:29 -0700, Roland Dreier wrote:
> > This patch installs the qib driver which replaces the ipath driver
>  > in OFED-1.5.
> 
> Maybe I missed some discussion of this.
> 
> But what is the QIB driver?  What are you planning to do to support
> qlogic HCAs for the mainline kernel?
> 
>  - R.

The ib_qib driver is a modified version of the ib_ipath driver
with a lot of changes to support dual ports, APM, QDR, etc.
It supports the older QLogic QLE SDR and DDR cards too.

The plan is to submit the ib_qib driver upstream soon.
It seemed better to rename the driver than try to patch
the old driver since the patches were likely to be larger.
At some point I would expect to remove the ib_ipath driver.
For now, we are just disabling the ib_ipath compile/install.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] install.pl: Install QIB driver instead of Ipath

2009-07-08 Thread Ralph Campbell
Vlad,
Please apply this to your ~vlad/ofed_scripts.git ofed_1_5 repo.

This patch installs the qib driver which replaces the ipath driver
in OFED-1.5.

Signed-off-by: Ralph Campbell 

diff --git a/install.pl b/install.pl
index 7d8036b..92988e5 100755
--- a/install.pl
+++ b/install.pl
@@ -309,7 +309,7 @@ my @suse_ofed_packages = (
 
 # List of all available packages sorted following dependencies
 my @kernel_packages = ("kernel-ib", "kernel-ib-devel", "ib-bonding", 
"ib-bonding-debuginfo");
-my @basic_kernel_modules = ("core", "mthca", "mlx4", "mlx4_en", "cxgb3", 
"nes", "ehca", "ipath", "ipoib");
+my @basic_kernel_modules = ("core", "mthca", "mlx4", "mlx4_en", "cxgb3", 
"nes", "ehca", "qib", "ipoib");
 my @ulp_modules = ("sdp", "srp", "srpt", "rds", "qlgc_vnic", "iser", 
"nfsrdma");
 
 # kernel modules in "technology preview" status can be installed by
@@ -394,6 +394,9 @@ my %kernel_modules_info = (
 'ipath' =>
 { name => "ipath", available => 0, selected => 0,
 included_in_rpm => 0, requires => ["core"], },
+'qib' =>
+{ name => "qib", available => 0, selected => 0,
+included_in_rpm => 0, requires => ["core"], },
 'cxgb3' =>
 { name => "cxgb3", available => 0, selected => 0,
 included_in_rpm => 0, requires => ["core"], },
@@ -1658,11 +1661,9 @@ sub set_availability
 # $kernel =~ 
m/2.6.16.[0-9.]*-[0-9.]*-[A-Za-z0-9.]*|2.6.1[7-9]|2.6.2[0-9]/) or
 #($arch =~ m/x86_64/ and
 # $kernel =~ 
m/2.6.9-42|2.6.9-55|2.6.9-67|2.6.9-78|2.6.16.[0-9.]*-[0-9.]*-[A-Za-z0-9.]*|2.6.1[7-9]|2.6.2[0-9]/)
 ) {
-if ( ($arch =~ m/ppc64/ and
-$kernel =~ m/2.6.30/) or
-   ($arch =~ m/x86_64/ and
+if ( ($arch =~ m/x86_64/ and
 $kernel =~ m/2.6.30/) ) {
-$kernel_modules_info{'ipath'}{'available'} = 1;
+$kernel_modules_info{'qib'}{'available'} = 1;
 $packages_info{'libipathverbs'}{'available'} = 1;
 $packages_info{'libipathverbs-devel'}{'available'} = 1;
 $packages_info{'libipathverbs-debuginfo'}{'available'} = 1;
@@ -2814,6 +2815,9 @@ sub build_kernel_rpm
 elsif ($module eq "ipath") {
 $kernel_configure_options .= " --with-ipath_inf-mod";
 }
+elsif ($module eq "qib") {
+$kernel_configure_options .= " --with-qib-mod";
+}
 elsif ($module eq "srpt") {
 $kernel_configure_options .= " --with-srp-target-mod";
 }


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] Add QIB driver to OFED builds

2009-07-07 Thread Ralph Campbell
Vlad,
This should be applied to your ofabuild.git tree after pulling
the changes to add ib_qib to OFED-1.5.

Signed-off-by: Ralph Campbell 

diff --git a/build_ofa_kernel.sh b/build_ofa_kernel.sh
index 88bf94e..2f5b690 100755
--- a/build_ofa_kernel.sh
+++ b/build_ofa_kernel.sh
@@ -150,6 +150,17 @@ set_packages()
 ;;
 esac
 
+# QIB
+case ${arch} in
+x86_64)
+case ${kern} in
+
*2.6.9-67*|*2.6.9-78*|*2.6.16.60-0.21*|*2.6.18-93*|*2.6.18-128*|*2.6.27*)
+WITH_PACKAGES="${WITH_PACKAGES} --with-qib-mod"
+;;
+esac
+;;
+esac
+
 # srp target
 case ${kern} in
 2.6.16.*-*-*|2.6.18-*fc[56]*|2.6.*.el5|2.6.2[0-9]*|2.6.30)


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] add ib_qib driver to OFED-1.5

2009-07-07 Thread Ralph Campbell
I added one more commit to the previous list:

commit d361b285743ddf30097d0cd0f53c380a8469d2a7
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 17:27:11 2009 -0700

IB/qib: add QIB driver to kernel spec file and init.d script

This adds the QIB driver to the kernel spec file and init.d script.

Signed-off-by: Ralph Campbell 


On Tue, 2009-07-07 at 14:38 -0700, Ralph Campbell wrote:
> Vlad,
> Please pull from:
> 
> git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5
> 
> This contains several commits to add the QIB driver to OFED-1.5.
> 
> commit ea17e8bd08fa7146dcaca85bfb7fed93bec38e2e
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 12:09:23 2009 -0700
> 
> IB/qib: Hooks for adding the QIB driver into the framework
> 
> Signed-off-by: Yannick Cote 
> 
> commit adee339e08f34c34e2c290e326da08a17cb841d3
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:50:23 2009 -0700
> 
>     Add RHEL 4 U6 backport
> 
> Signed-off-by: Ralph Campbell 
> 
> commit cb920591a6ae667407cace4b860559fc7b148143
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:48:55 2009 -0700
> 
> Add 2.6.9_U7 backport patches
> 
> Signed-off-by: Ralph Campbell 
> 
> commit b51f2fbddb008c2d9edb9b81951cf9b2f7043cbf
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:47:50 2009 -0700
> 
> backport: Add typedef for resource_size_t
> 
> This patch adds the typedef for resource_size_t
>     
> Signed-off-by: Ralph Campbell 
> 
> commit 04176fdf76650fd0280d22f2bdeb681794f87b32
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:44:58 2009 -0700
> 
> Add 2.6.16_sles10_sp2 backport patches
> 
> Signed-off-by: Ralph Campbell 
> 
> commit 1e3127d5428c8dfb4f43b50bf028760a13641a08
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:44:03 2009 -0700
> 
> Add 2.6.18-EL5.2 backport patches
> Signed-off-by: Ralph Campbell 
> 
> commit bb9033a39acd8ce9bec0a9253e78f3d66fc12c74
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:43:05 2009 -0700
> 
> backport: use __constant_cpu_to_XXX
> 
> Older compilers don't seem to generate a constant for cpu_to_XXX().
> 
> Signed-off-by: Ralph Campbell 
> 
> commit 366fc3e8f48a0de13793f480578efac100d1a291
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:39:12 2009 -0700
> 
> Add 2.6.18-EL5.3 backport patches
> 
> Signed-off-by: Ralph Campbell 
> 
> commit 51249f294a7631ac0a97a48419439039f44b31e8
> Author: Ralph Campbell (QLogic) 
> Date:   Tue Jul 7 11:37:54 2009 -0700
> 
> IB/qib: Add qib HCA driver
> 
> This is an updated version of the ipath HCA driver which supports the PCIe
> QLE SDR, DDR, and QDR series of HCAs.
> Rather than try to patch the ipath driver to include support for QDR,
> multiple ports, and many other structual changes, the ib_qib driver is
> replacing the ib_ipath driver.
> 
> Signed-off-by: Ralph Campbell 
> 
> commit e4c3d952135ff73bfa05b7a36f4e342bdc0dee48
> Author: Yannick Cote 
> Date:   Mon Jul 6 15:40:09 2009 -0700
> 
> IB/qib: Hooks for adding the QIB driver into the framework
> 
> Signed-off-by: Yannick Cote 
> 
> commit 80a764089732cf9544205e9d7c99a74601888e07
> Author: Yannick Cote 
> Date:   Mon Jul 6 15:37:58 2009 -0700
> 
> ofed_scripts: Add a makefile entry for QIB driver
> 
> Signed-off-by: Yannick Cote 
> 
> commit 2e70d279aefc1c52aadd73c05905a3e1398eea46
> Author: Yannick Cote 
> Date:   Mon Jul 6 15:36:30 2009 -0700
> 
> ofed_scripts: add a QIB driver entry
> 
> Signed-off-by: Yannick Cote 
> 
> 
> ___
> ewg mailing list
> ewg@lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] add ib_qib driver to OFED-1.5

2009-07-07 Thread Ralph Campbell
Vlad,
Please pull from:

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel_1_5

This contains several commits to add the QIB driver to OFED-1.5.

commit ea17e8bd08fa7146dcaca85bfb7fed93bec38e2e
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 12:09:23 2009 -0700

IB/qib: Hooks for adding the QIB driver into the framework

Signed-off-by: Yannick Cote 

commit adee339e08f34c34e2c290e326da08a17cb841d3
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:50:23 2009 -0700

Add RHEL 4 U6 backport

Signed-off-by: Ralph Campbell 

commit cb920591a6ae667407cace4b860559fc7b148143
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:48:55 2009 -0700

Add 2.6.9_U7 backport patches

Signed-off-by: Ralph Campbell 

commit b51f2fbddb008c2d9edb9b81951cf9b2f7043cbf
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:47:50 2009 -0700

backport: Add typedef for resource_size_t

This patch adds the typedef for resource_size_t

Signed-off-by: Ralph Campbell 

commit 04176fdf76650fd0280d22f2bdeb681794f87b32
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:44:58 2009 -0700

Add 2.6.16_sles10_sp2 backport patches

Signed-off-by: Ralph Campbell 

commit 1e3127d5428c8dfb4f43b50bf028760a13641a08
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:44:03 2009 -0700

Add 2.6.18-EL5.2 backport patches
Signed-off-by: Ralph Campbell 

commit bb9033a39acd8ce9bec0a9253e78f3d66fc12c74
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:43:05 2009 -0700

backport: use __constant_cpu_to_XXX

Older compilers don't seem to generate a constant for cpu_to_XXX().

Signed-off-by: Ralph Campbell 

commit 366fc3e8f48a0de13793f480578efac100d1a291
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:39:12 2009 -0700

Add 2.6.18-EL5.3 backport patches

Signed-off-by: Ralph Campbell 

commit 51249f294a7631ac0a97a48419439039f44b31e8
Author: Ralph Campbell (QLogic) 
Date:   Tue Jul 7 11:37:54 2009 -0700

IB/qib: Add qib HCA driver

This is an updated version of the ipath HCA driver which supports the PCIe
QLE SDR, DDR, and QDR series of HCAs.
Rather than try to patch the ipath driver to include support for QDR,
multiple ports, and many other structual changes, the ib_qib driver is
replacing the ib_ipath driver.

Signed-off-by: Ralph Campbell 

commit e4c3d952135ff73bfa05b7a36f4e342bdc0dee48
Author: Yannick Cote 
Date:   Mon Jul 6 15:40:09 2009 -0700

IB/qib: Hooks for adding the QIB driver into the framework

Signed-off-by: Yannick Cote 

commit 80a764089732cf9544205e9d7c99a74601888e07
Author: Yannick Cote 
Date:   Mon Jul 6 15:37:58 2009 -0700

ofed_scripts: Add a makefile entry for QIB driver

Signed-off-by: Yannick Cote 

commit 2e70d279aefc1c52aadd73c05905a3e1398eea46
Author: Yannick Cote 
Date:   Mon Jul 6 15:36:30 2009 -0700

ofed_scripts: add a QIB driver entry

Signed-off-by: Yannick Cote 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] Take ipath out of the build

2009-07-02 Thread Ralph Campbell
commit 076a0993420716eed9fbbd6315793ee00c0c2a09
Author: Ralph Campbell 
Date:   Thu Jul 2 09:46:11 2009 -0700

OFED: Take ipath out of the build

The ipath driver is being replaced by the qib driver in this release.
This patch removes ipath from the build, a subsequent patch will add
qib.

Signed-off-by: Ralph Campbell 

diff --git a/build_ofa_kernel.sh b/build_ofa_kernel.sh
index ad16a75..a4b88c2 100755
--- a/build_ofa_kernel.sh
+++ b/build_ofa_kernel.sh
@@ -125,23 +125,6 @@ set_packages()
 ;;
 esac
 
-# Ipath
-case ${arch} in
-ppc64|powerpc)
-case ${kern} in
-
*2.6.16.[0-9]*-[0-9]*-[A-Za-z0-9]*|*2.6.1[7-9]*|*2.6.2[0-9]*|2.6.30)
-WITH_PACKAGES="${WITH_PACKAGES} 
--with-ipath_inf-mod"
-;;
-esac
-;;
-x86_64)
-case ${kern} in
-
*2.6.9-[4-7]*|*2.6.16.[0-9]*-[0-9]*-[A-Za-z0-9]*|*2.6.1[7-9]*|*2.6.2[0-9]*|2.6.30)
-WITH_PACKAGES="${WITH_PACKAGES} 
--with-ipath_inf-mod"
-;;
-esac
-;;
-esac
 # Iser
 case ${kern} in
 *2.6.16.*-*-*|*2.6.*.el5|*2.6.9-[6-7]*.EL*)


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] OFED 1.4.1 RC4 is delayed to Thursday

2009-05-04 Thread Ralph Campbell
On Sun, 2009-05-03 at 04:09 -0700, Tziporet Koren wrote:
> Ralph Campbell wrote:
> > Comment #8 already identified the problem and a solution.
> > I think we would need to change the default value for
> > net.ipv4.neigh.ib0.unres_qlen to make it "permanent".
> >   
> Can you send a patch for this?
> 
> Thanks
> Tziporet

I am not very familiar with the networking code so
I would rather not submit this patch.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] OFED 1.4.1 RC4 is delayed to Thursday

2009-04-30 Thread Ralph Campbell
Comment #8 already identified the problem and a solution.
I think we would need to change the default value for
net.ipv4.neigh.ib0.unres_qlen to make it "permanent".

On Thu, 2009-04-30 at 04:12 -0700, Tziporet Koren wrote:
> Rupert Dance wrote:
> >
> > Hi Tziporet,
> >
> > Thanks for the update. Can we also get bug 1287 
> >  resolved? The OFA 
> > Interop Event has begun and this causes a failure that will have to be 
> > reported as part of the results on the OFA Logo site. We have both 
> > vendors and end users who seem to be concerned about IPoIB dropping 
> > packets and I think we should address it – it is a known problem 
> > discovered approximately one year ago.
> >
> Hi Rupert,
> We have discussed this bug on Apr-6 meeting and I said that Mellanox 
> will not be able to assign anyone to debug this now.
> Qlogic said they will see if they can assign someone.
> I cc John Russo from Qlogic - maybe they can help
> 
> Tziporet
> 
> 
> 
> 
> ___
> ewg mailing list
> ewg@lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] libibverbs version increment.

2009-04-16 Thread Ralph Campbell
On Thu, 2009-04-16 at 15:09 -0700, Steve Wise wrote:
> Ralph Campbell wrote:
> > You are confusing the version number used for the libibverbs library
> > and the name of the source tar file for libipathverbs.
> > The later is what is being changed from libipathverbs-1.1.tar.gz
> > to libipathverbs-1.1.1.tar.gz since there was a minor source code
> > in OFED-1.4.1-rc3.
> > Yan said 1.2 because I misremembered the file name and misled him.
> >
> >   
> 
> So you're really talking about libipathverbs, not libibverbs, yes?

Correct.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] libibverbs version increment.

2009-04-16 Thread Ralph Campbell
You are confusing the version number used for the libibverbs library
and the name of the source tar file for libipathverbs.
The later is what is being changed from libipathverbs-1.1.tar.gz
to libipathverbs-1.1.1.tar.gz since there was a minor source code
in OFED-1.4.1-rc3.
Yan said 1.2 because I misremembered the file name and misled him.

On Thu, 2009-04-16 at 14:45 -0700, Jeff Squyres wrote:
> Does this correspond with Roland's version number?
> 
> If so, is it exactly the same as Roland's version?  If not, why not,  
> and how will you differentiate the two?
> 
> I'm not a git expert, so I could well be getting this wrong, but  
> looking at
> 
>http://git.kernel.org/?p=libs/infiniband/libibverbs.git;a=summary
> 
> I only see version 1.1.2.  Did OFED choose to label included verbs as  
> "1.2[.x]"?  Did Roland agree not to use those numbers?
> 
> (I apologize in advance if all this stuff has been worked out already;  
> I freely admit to jumping into the middle of a conversation here...)
> 
> 
> 
> On Apr 16, 2009, at 5:39 PM, Yannick Cote wrote:
> 
> > Vlad,
> >
> > could you please increment the tarball version of the libibverbs from
> > 1.2 to 1.2.1 please ? That is for the OFED 1.4.1 release of course.
> >
> > Thanks,
> >
> >  - Yan
> > ___
> > ewg mailing list
> > ewg@lists.openfabrics.org
> > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
> 
> 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH ofed-1.4.1] Fix backport patch which causes phys_state to show 5:

2009-04-03 Thread Ralph Campbell
If you cat /sys/class/infiniband//ports/1/phys_state,
you will see it returns "5: ".
This is because the backport patch core_z0010_sysfs_race.patch
changed "return sprintf(...);" to "ret = sprintf(...);"
without adding "break;". Thus, the last sprintf has effect.

Signed-off-by: Ralph Campbell 

diff -up a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
--- a/drivers/infiniband/core/sysfs.c   2009-04-03 12:18:38.0 -0700
+++ b/drivers/infiniband/core/sysfs.c   2009-04-03 12:02:31.0 -0700
@@ -246,14 +246,29 @@ static ssize_t phys_state_show(struct ib
ret = ib_query_port(p->ibdev, p->port_num, &attr);
if (!ret) {
switch (attr.phys_state) {
-   case 1:  ret = sprintf(buf, "1: Sleep\n");
-   case 2:  ret = sprintf(buf, "2: Polling\n");
-   case 3:  ret = sprintf(buf, "3: Disabled\n");
-   case 4:  ret = sprintf(buf, "4: 
PortConfigurationTraining\n");
-   case 5:  ret = sprintf(buf, "5: LinkUp\n");
-   case 6:  ret = sprintf(buf, "6: LinkErrorRecovery\n");
-   case 7:  ret = sprintf(buf, "7: Phy Test\n");
-   default: ret = sprintf(buf, "%d: \n", 
attr.phys_state);
+   case 1:
+   ret = sprintf(buf, "1: Sleep\n");
+   break;
+   case 2:
+   ret = sprintf(buf, "2: Polling\n");
+   break;
+   case 3:
+   ret = sprintf(buf, "3: Disabled\n");
+   break;
+   case 4:
+   ret = sprintf(buf, "4: 
PortConfigurationTraining\n");
+   break;
+   case 5:
+   ret = sprintf(buf, "5: LinkUp\n");
+   break;
+   case 6:
+   ret = sprintf(buf, "6: LinkErrorRecovery\n");
+   break;
+   case 7:
+   ret = sprintf(buf, "7: Phy Test\n");
+   break;
+   default:
+   ret = sprintf(buf, "%d: \n", 
attr.phys_state);
}
}
}


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] Moving to new server

2009-03-30 Thread Ralph Campbell
I have copied the libipathverbs library to the new
server and it looks OK.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/libipathverbs: fix memory leak in error path

2009-03-12 Thread Ralph Campbell
Vlad,

Please pull for OFED-1.4.1:

git://git.openfabrics.org/~ralphc/libipathverbs/.git ofed_1_4

commit 337df3c1cbe43c3e9cb58e7f6e91f44603dd23fb
Author: Patrick Latifi 
Date:   Thu Mar 12 12:46:25 2009 -0700

IB/libipathverbs: fix memory leak in error path

If the CQ or QP is created but the queue cannot be mmapped, be sure
to delete the allocated CQ or QP.

Signed-off-by: Patrick Latifi 

diff --git a/src/verbs.c b/src/verbs.c
index dcd8efb..b73b7f7 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -182,6 +182,7 @@ struct ibv_cq *ipath_create_cq(struct ibv_context *context, 
int cqe,
cq->queue = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
 context->cmd_fd, resp.offset);
if ((void *) cq->queue == MAP_FAILED) {
+   ibv_cmd_destroy_cq(&cq->ibv_cq);
free(cq);
return NULL;
}
@@ -338,6 +339,7 @@ struct ibv_qp *ipath_create_qp(struct ibv_pd *pd, struct 
ibv_qp_init_attr *attr)
  PROT_READ | PROT_WRITE, MAP_SHARED,
  pd->context->cmd_fd, resp.offset);
if ((void *) qp->rq.rwq == MAP_FAILED) {
+   ibv_cmd_destroy_qp(&qp->ibv_qp);
free(qp);
return NULL;
}
@@ -532,6 +534,7 @@ struct ibv_srq *ipath_create_srq(struct ibv_pd *pd,
srq->rq.rwq = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
   pd->context->cmd_fd, resp.offset);
if ((void *) srq->rq.rwq == MAP_FAILED) {
+   ibv_cmd_destroy_srq(&srq->ibv_srq);
free(srq);
return NULL;
}


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] libibumad: get_ca() can call release_ca() with uninitialized data

2009-02-02 Thread Ralph Campbell
In umad.c, get_ca(), the error path when the call to
scandir() fails calls release_ca(ca) when the structure
has not yet been initialized. This can cause free() to
be called on random memory addresses.
The fix is to initialize ca->numports and ca->ports
earlier in get_ca().

Signed-off-by: Ralph Campbell 

diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c
index 78b956d..4f877e9 100644
--- a/libibumad/src/umad.c
+++ b/libibumad/src/umad.c
@@ -361,6 +361,8 @@ get_ca(char *ca_name, umad_ca_t *ca)
int r, i, ret;
int portnum;
 
+   ca->numports = 0;
+   memset(ca->ports, 0, sizeof ca->ports);
strncpy(ca->ca_name, ca_name, sizeof ca->ca_name);
 
snprintf(dir_name, sizeof(dir_name), "%s/%s", SYS_INFINIBAND,
@@ -394,8 +396,6 @@ get_ca(char *ca_name, umad_ca_t *ca)
}
 
ret = 0;
-   ca->numports = 0;
-   memset(ca->ports, 0, sizeof ca->ports);
for (i = 0; i < r; i++) {
portnum = 0;
if (!strcmp(".", namelist[i]->d_name) ||


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH 1-3] IB/ipath -- fixes for 2.6.28/29

2008-10-27 Thread Ralph Campbell
Vald, Please pull the three ib_ipath changes submitted to
[EMAIL PROTECTED] from:

git://git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel

commit b6ab27c66a9c58216ba250b6585ac328e8652eb2
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Sat Oct 25 10:11:05 2008 -0700

IB/ipath - Added recent patches from 2.6.28

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>


Thanks!

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] OFED/ipath - add two minor fixes until 1.4 pulls from kernel.org again.

2008-08-15 Thread Ralph Campbell
I sent two minor fixes to Roland which were accepted for 2.6.27.
I would like these to be in the OFED-1.4 beta so I have put these
patches into kernel_patches/fixes/ until the next pull from
kernel.org obsoletes them.

Vlad, you can pull these from:
git://git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel

---

IB/ipath - fix lost UD send work request

From: Ralph Campbell <[EMAIL PROTECTED]>

If a UD QP has some work requests queued to be sent by the DMA engine
followed by a local loopback work request, we have to wait for
the previous work requests to finish or the completion for the
local loopback work request would be generated out of order. The
problem was that the work request queue pointer was already updated
so that the request would not be processed when the DMA queue drained.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>
---

 drivers/infiniband/hw/ipath/ipath_ud.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c 
b/drivers/infiniband/hw/ipath/ipath_ud.c
index 36aa242..729446f 100644
--- a/drivers/infiniband/hw/ipath/ipath_ud.c
+++ b/drivers/infiniband/hw/ipath/ipath_ud.c
@@ -267,6 +267,7 @@ int ipath_make_ud_req(struct ipath_qp *qp)
u16 lrh0;
u16 lid;
int ret = 0;
+   int next_cur;
 
spin_lock_irqsave(&qp->s_lock, flags);
 
@@ -290,8 +291,9 @@ int ipath_make_ud_req(struct ipath_qp *qp)
goto bail;
 
wqe = get_swqe_ptr(qp, qp->s_cur);
-   if (++qp->s_cur >= qp->s_size)
-   qp->s_cur = 0;
+   next_cur = qp->s_cur + 1;
+   if (next_cur >= qp->s_size)
+   next_cur = 0;
 
/* Construct the header. */
ah_attr = &to_iah(wqe->wr.wr.ud.ah)->attr;
@@ -315,6 +317,7 @@ int ipath_make_ud_req(struct ipath_qp *qp)
qp->s_flags |= IPATH_S_WAIT_DMA;
goto bail;
}
+   qp->s_cur = next_cur;
spin_unlock_irqrestore(&qp->s_lock, flags);
ipath_ud_loopback(qp, wqe);
spin_lock_irqsave(&qp->s_lock, flags);
@@ -323,6 +326,7 @@ int ipath_make_ud_req(struct ipath_qp *qp)
}
}
 
+   qp->s_cur = next_cur;
extra_bytes = -wqe->length & 3;
nwords = (wqe->length + extra_bytes) >> 2;
 
IB/ipath - Fixed incorrect check for max physical address in TID

From: Dave Olson <[EMAIL PROTECTED]>

The check for max physical address was incorrect, 
thus limiting the range of allowed physical addresses.

Signed-off-by: Dave Olson <[EMAIL PROTECTED]>
---

 drivers/infiniband/hw/ipath/ipath_iba7220.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_iba7220.c 
b/drivers/infiniband/hw/ipath/ipath_iba7220.c
index d90f5e9..9839e20 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba7220.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba7220.c
@@ -1720,7 +1720,7 @@ static void ipath_7220_put_tid(struct ipath_devdata *dd, 
u64 __iomem *tidptr,
 "not 2KB aligned!\n", pa);
return;
}
-   if (pa >= (1UL << IBA7220_TID_SZ_SHIFT)) {
+   if (chippa >= (1UL << IBA7220_TID_SZ_SHIFT)) {
ipath_dev_err(dd,
  "BUG: Physical page address 0x%lx "
  "larger than supported\n", pa);


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH 1/2]libibvers: add create_qp_expanded

2008-08-11 Thread Ralph Campbell
Is there a man page for ibv_create_qp_expanded()?
It helps to know how to use it, especially since it
isn't part of the IBTA verbs document.

Minor nits inline below.

On Tue, 2008-08-12 at 01:35 +, Ron Livne wrote:
> 1. This patch adds a new capability flags to the enum ibv_device_cap_flags
> IBV_DEVICE_BLOCK_MULTICAST_LOOPBACK.
> which implies that the device is capable of blocking multicast
> loopback packets.
> 
> 2. This patch also adds a new verb to the libibverbs:
> struct ibv_qp *ibv_create_qp_expanded(struct ibv_pd *pd,
>struct ibv_qp_init_attr *qp_init_attr,
>uint32_t create_flags);
> which works similarly to ibv_create_qp, except for that it now
> takes another argument: uint32_t create_flags
> these creation flags should be aligned with those in the ib_verbs.h
> in the kernel.
> 
> 3. New creation flags added:
> IBV_QP_CREATE_IPOIB_UD_LSO, IBV_MULTICAST_LOOPBACK_BLOCK
> 
> Signed-off-by: Ron Livne <[EMAIL PROTECTED]>
> 
> diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
> index f8138ef..ea824c8 100644
> --- a/include/infiniband/driver.h
> +++ b/include/infiniband/driver.h
> @@ -155,6 +155,11 @@ int ibv_cmd_reg_xrc_rcv_qp(struct ibv_xrc_domain 
> *xrc_domain,
>  uint32_t xrc_qp_num);
>  int ibv_cmd_unreg_xrc_rcv_qp(struct ibv_xrc_domain *xrc_domain,
>uint32_t xrc_qp_num);
> +int ibv_cmd_create_qp_expanded(struct ibv_pd *pd,
> + struct ibv_qp *qp, struct ibv_qp_init_attr *attr,
> + uint32_t create_flags,
> + struct ibv_create_qp_expanded *cmd, size_t cmd_size,
> + struct ibv_create_qp_resp *resp, size_t resp_size);
> 
>  /*
>   * sysfs helper functions
> diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h
> index 8b5cd9a..1d4aa95 100644
> --- a/include/infiniband/kern-abi.h
> +++ b/include/infiniband/kern-abi.h
> @@ -94,6 +94,7 @@ enum {
>   IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP,
>   IB_USER_VERBS_CMD_REG_XRC_RCV_QP,
>   IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP,
> + IB_USER_VERBS_CMD_CREATE_QP_EXPANDED,
>  };
> 
>  /*
> @@ -459,6 +460,30 @@ struct ibv_create_qp {
>   __u64 driver_data[0];
>  };
> 
> +struct ibv_create_qp_expanded {
> + __u32 command;
> + __u16 in_words;
> + __u16 out_words;
> + __u64 response;
> + __u64 user_handle;
> + __u32 pd_handle;
> + __u32 send_cq_handle;
> + __u32 recv_cq_handle;
> + __u32 srq_handle;
> + __u32 max_send_wr;
> + __u32 max_recv_wr;
> + __u32 max_send_sge;
> + __u32 max_recv_sge;
> + __u32 max_inline_data;
> + __u8  sq_sig_all;
> + __u8  qp_type;
> + __u8  is_srq;
> + __u8  reserved;
> + __u32 reserved1;
> + __u32 create_flags;
> + __u64 driver_data[0];
> +};
> +
>  struct ibv_create_qp_resp {
>   __u32 qp_handle;
>   __u32 qpn;
> @@ -945,6 +970,7 @@ enum {
>   IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP_V2 = -1,
>   IB_USER_VERBS_CMD_REG_XRC_RCV_QP_V2 = -1,
>   IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP_V2 = -1,
> + IB_USER_VERBS_CMD_CREATE_QP_EXPANDED_V2 = -1,
>  };
> 
>  struct ibv_destroy_cq_v1 {
> diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
> index 31d1f64..583403a 100644
> --- a/include/infiniband/verbs.h
> +++ b/include/infiniband/verbs.h
> @@ -93,7 +93,8 @@ enum ibv_device_cap_flags {
>   IBV_DEVICE_RC_RNR_NAK_GEN   = 1 << 12,
>   IBV_DEVICE_SRQ_RESIZE   = 1 << 13,
>   IBV_DEVICE_N_NOTIFY_CQ  = 1 << 14,
> - IBV_DEVICE_XRC  = 1 << 20
> + IBV_DEVICE_XRC  = 1 << 20,
> + IBV_DEVICE_BLOCK_MULTICAST_LOOPBACK = 1 << 22
>  };

What happened to bit 21?
I see some other gaps so perhaps it isn't important.

>  enum ibv_atomic_cap {
> @@ -634,6 +635,13 @@ enum {
>   IBV_SYSFS_PATH_MAX  = 256
>  };
> 
> +/*
> +   This enum must be alligned with ib_qp_create_flags

Spelling: aligned
but better phrased as "This enum must match ib_qp_create_flags"

> +   in include/rdma/ib_verbs.h
> +*/
> +enum ibv_qp_create_flags {
> + IBV_QP_CREATE_MULTICAST_LOOPBACK_BLOCK= 1 << 1
> +};
>  struct ibv_device {
>   struct ibv_device_ops   ops;
>   enum ibv_node_type  node_type;
> @@ -671,6 +679,9 @@ struct ibv_more_ops {
> uint32_t xrc_qp_num);
>   int (*unreg_xrc_rcv_qp)(struct ibv_xrc_domain 
> *xrc_domain,
>   uint32_t xrc_qp_num);
> + struct ibv_qp * (*create_qp_expanded)(struct ibv_pd *pd,
> + struct ibv_qp_init_attr *attr,
> + uint32_t create_flags);
> 
>  };
> 
> @@ -1032,6 +1043,13 @@ struct ibv_qp *ibv_create

[ewg] [PATCH] BACKPORT - add new cycle_kernel_lock() function

2008-08-07 Thread Ralph Campbell
I think this really does fix the ib_ipath compile problems :-)

I was able to get the basic driver to load and run IPoIB
on a RHEL4-U4 system (which tests most of the backport patches)
although I had to hand tweak infiniband/core/cm.c for the call
to class_device_create() in cm_add_one().

Vlad, please pull from:

git://git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel

commit b185a6df881df335babceed2a6086f43b156ae8e
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Thu Aug 7 14:16:56 2008 -0700

BACKPORT - add new cycle_kernel_lock() function

This backports the function cycle_kernel_lock() which was added in
2.6.27 by commit 0b2806768899dba5967bcd4a3b93eaed9a1dc4f3 and
f2b9857eee17797541b845782ade4d7a9d50f843

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] backport patches for ib_ipath for 2.6.26

2008-08-06 Thread Ralph Campbell
These two commits allow ib_ipath to compile again.
Vlad, please pull from:

git://git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel

commit 76185d73a6cc500e7199e3a153d67fac8f9818dc
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Wed Aug 6 13:48:15 2008 -0700

BACKPORT - ipath dma_map_error() change

This patch undoes the changes made by commit ID
8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit 1eecfce46ff31717c8803d6fd59ca54137e1d13a
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Wed Aug 6 13:43:35 2008 -0700

BACKPORT - add new file rculist.h

This was added in 2.6.27

    Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] Re: ipath backport patches for ofed-1.4

2008-08-06 Thread Ralph Campbell
On Wed, 2008-08-06 at 11:23 -0700, Ralph Campbell wrote:
> On Wed, 2008-08-06 at 14:45 +0300, Vladimir Sokolovsky wrote:
> > Hi Ralph,
> > Please prepare ipath backport patches for ofed-1.4:
> > 
> > git://git.openfabrics.org/ofed_1_4 ofed_kernel
> > 
> > The new backport patches required after merge with 2.6.27-rc1.
> > 
> > Regards,
> > Vladimir
> 
> I can make individual backport patches for just the ipath
> driver but I also see that some changes like commit
> 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 change ipath and
> core kernel and infiniband files. Sometimes a single
> backport patch is created by someone else that undoes this
> sort of change for all drivers and sometimes it is up to the
> individual driver owners.
> 
> So, how do we assign ownership?

It looks like this commit has already been split into separate
patches for IB core and mthca so I will make an ipath backport
patch with the appropriate change.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] Re: ipath backport patches for ofed-1.4

2008-08-06 Thread Ralph Campbell
On Wed, 2008-08-06 at 14:45 +0300, Vladimir Sokolovsky wrote:
> Hi Ralph,
> Please prepare ipath backport patches for ofed-1.4:
> 
> git://git.openfabrics.org/ofed_1_4 ofed_kernel
> 
> The new backport patches required after merge with 2.6.27-rc1.
> 
> Regards,
> Vladimir

I can make individual backport patches for just the ipath
driver but I also see that some changes like commit
8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 change ipath and
core kernel and infiniband files. Sometimes a single
backport patch is created by someone else that undoes this
sort of change for all drivers and sometimes it is up to the
individual driver owners.

So, how do we assign ownership?

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] IB/core: Add support for Receive Core Affinity

2008-08-05 Thread Ralph Campbell
On Tue, 2008-08-05 at 09:10 +0300, Eli Cohen wrote:
> > >  
> > > +int ib_create_qp_range(struct ib_pd *pd, struct ib_qp_init_attr 
> > > *qp_init_attr,
> > > +int nqps, int align, struct ib_qp *list[])
> > 
> > It just seems wrong to me to require the caller to specify the alignment
> > restrictions. Isn't this HCA specific?
> I agree with you about this, but since my previous posts on the issue
> did not receive too much attention, I did not want to change my
> implementation before the issue has been discussed.
> 
> >  Is IPoIB really going to know
> > whether or not the QP numbers returned by this call are "aligned"
> > or not? What if I call ib_create_qp_range() with nqps=3 and align=0?
> I am not sure I understand your argument here: in this case you create 3
> consecutive QPs with no other restrictions on the number of of the
> first. 

My point is that I am guessing that the ib_modify_qp() will return
an error unless the QPs are created with the right alignment
but the caller has no way of knowing what the right alignment value
is and it shouldn't need to know since the ib_create_qp_range()
could have an argument or flag which says the created QPs should be
usable for receive affinity. The HCA driver can then use whatever
alignment is needed and mark the QP struct as being part of a group.
The ib_modify_qp() probably only needs a flag to say enable
receive affinity.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [PATCH] IB/core: Add support for Receive Core Affinity

2008-08-04 Thread Ralph Campbell
On Tue, 2008-07-15 at 19:13 +0300, Eli Cohen wrote:
> Add the capability flag IB_DEVICE_IPOIB_RCA to denote devices which
> support distribution of received packects to multiple receive queues.
> This results in better utilization of the system CPU cores by
> distributing interrupt handling between the cores. The patch adds a
> new verb, ib_create_qp_range(), to create a list range of QPs with
> specific alignment requirements that should be used by a consumer to
> for the different receive queues.
> 
> Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
> ---
>  drivers/infiniband/core/verbs.c |   39 
> ++-
>  include/rdma/ib_verbs.h |   30 +-
>  2 files changed, 67 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index a7da9be..871fb1e 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -280,6 +280,39 @@ EXPORT_SYMBOL(ib_destroy_srq);
>  
>  /* Queue pairs */
>  
> +int ib_create_qp_range(struct ib_pd *pd, struct ib_qp_init_attr 
> *qp_init_attr,
> +int nqps, int align, struct ib_qp *list[])

It just seems wrong to me to require the caller to specify the alignment
restrictions. Isn't this HCA specific? Is IPoIB really going to know
whether or not the QP numbers returned by this call are "aligned"
or not? What if I call ib_create_qp_range() with nqps=3 and align=0?

Also, in ib_verbs.h, struct ib_qp_attr now has a struct rca_attr field.
I don't see why the struct rca_attr field is needed for ib_modify_qp().
It seems to me that this information should be stored as part of the
QP info when creating the N QPs. Why should the verbs caller need to
know about this? The values are determined by the HCA when the QPs
are created.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/ipath backport patches for OFED-1.4 for 2.6.9 kernels

2008-07-18 Thread Ralph Campbell
Vlad, please pull the following commit which fixes ib_ipath
on the 2.6.9 kernels for OFED-1.4.

git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel

commit d6523d7b5565bf882ad35c85828d4e27f4d03e89
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Fri Jul 18 13:09:47 2008 -0700

BACKPORT - backport iowrite32_copy to 2.6.15 and earlier
BACKPORT - other backport changes for 2.6.9 kernels

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] backport patches for ib_ipath

2008-07-15 Thread Ralph Campbell
The following changes allow ib_ipath to compile on everything
except RHEL4.

Vlad, please pull from:

git.openfabrics.org/~ralphc/ofed-1.4-linux-2.6/.git ofed_kernel

commit a6415e3fb0f09bbfff15d4f37cd8709a614a1482
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:25:59 2008 -0700

BACKPORT - fix minor warnings for 2.6.16 and older kernels

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit d1560bfbd84e0a4c359438a492c77f130dd98bc9
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:25:20 2008 -0700

BACKPORT - change signature of ipath_get_sb for 2.6.17 and earlier

    Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit 2b2f4ec8098928ba0ed323770c1060d06566c222
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:24:50 2008 -0700

BACKPORT - don't clear memory a second time
    
Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit 3c65e7f89b5d2daf1d1addc46ca9fa690fbc0ece
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:24:04 2008 -0700

BACKPORT - avoid using vmalloc_user() in 2.6.18 due to bugs.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit 436d3d94a211f4766345ecee4925e6740b5a3eca
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:22:35 2008 -0700

BACKPORT - use old HT IRQ infrastructure on 2.6.18 and earlier

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit c0d89ab2a968137020cbf48ea393b560329974e9
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:21:58 2008 -0700

BACKPORT - Use writev instead of aio_write in 2.6.18 and older kernels

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit b7882e7868c87160de13d808f42f909783c1a973
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:21:19 2008 -0700

IB/ipath - revert struct vm_operations_struct nopage to fault rename

This patch reverts commit 3c8450860ba9d6279dbc969633eacf99161860d9 in 2.6.25

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit dfa49c798bcd79a9c1f7084ea1d234d68e947a4f
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:20:40 2008 -0700

BACKPORT - revert to older code for creating sysfs driver groups

This reverts commit 23b9c1ab5baf368a32b7242bf110ef1f48700d04 in 2.6.25

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit 27c62b169696746a12860c5faab712226a3613ad
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:19:50 2008 -0700

BACKPORT - revert struct class_dev to device
    
    This patch reverts commit f4e91eb4a81559da87a3843758a641b5cc590b65 in 2.6.26

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

commit e8762cc6a8be9f2f2b64cd6801fe414d5838483e
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Tue Jul 15 18:19:09 2008 -0700

BACKPORT - revert pid_t to struct pid pointer change

This reverts commit 40d97692fbfe52ef68fa771d8121394b2210fd67 in 2.6.26.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/libipathverbs - add support for 7322 HCA

2008-06-20 Thread Ralph Campbell
Vlad, please pull libipathverbs for OFED 1.4 from:

git://git.openfabrics.org/~ralphc/libipathverbs ofed_1_4


commit 65e5701dbe7b511f796cb0026b0cd51831a62318
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Fri Jun 20 15:49:29 2008 -0700

IB/libipathverbs - add support for 7322 HCA

Added support for recognizing the QLogic 7322 HCA PCI device number and
removed support for an obsolete Pathscale HCA.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/src/ipathverbs.c b/src/ipathverbs.c
index 55d8dcf..2ae1689 100644
--- a/src/ipathverbs.c
+++ b/src/ipathverbs.c
@@ -55,10 +55,6 @@
 #define PCI_VENDOR_ID_QLOGIC   0x1077
 #endif
 
-#ifndef PCI_DEVICE_ID_INFINIPATH_SPINNERET
-#define PCI_DEVICE_ID_INFINIPATH_SPINNERET 0x000a
-#endif
-
 #ifndef PCI_DEVICE_ID_INFINIPATH_HT
 #define PCI_DEVICE_ID_INFINIPATH_HT0x000d
 #endif
@@ -75,21 +71,23 @@
 #define PCI_DEVICE_ID_INFINIPATH_7220  0x7220
 #endif
 
-#define HCA(v, d, t) \
+#ifndef PCI_DEVICE_ID_INFINIPATH_7322
+#define PCI_DEVICE_ID_INFINIPATH_7322  0x7322
+#endif
+
+#define HCA(v, d) \
{ .vendor = PCI_VENDOR_ID_##v,  \
- .device = PCI_DEVICE_ID_INFINIPATH_##d,   \
- .type = IPATH_##t }
+ .device = PCI_DEVICE_ID_INFINIPATH_##d }
 
 struct {
unsignedvendor;
unsigneddevice;
-   enum ipath_hca_type type;
 } hca_table[] = {
-   HCA(PATHSCALE,  SPINNERET, SPINNERET),
-   HCA(PATHSCALE,  HT,   HT),
-   HCA(PATHSCALE,  PE800,PE800),
-   HCA(QLOGIC, 6220, 7220),
-   HCA(QLOGIC, 7220, 7220),
+   HCA(PATHSCALE,  HT),
+   HCA(PATHSCALE,  PE800),
+   HCA(QLOGIC, 6220),
+   HCA(QLOGIC, 7220),
+   HCA(QLOGIC, 7322),
 };
 
 static struct ibv_context_ops ipath_ctx_ops = {
@@ -215,7 +213,6 @@ found:
}
 
dev->ibv_dev.ops = ipath_dev_ops;
-   dev->hca_type= hca_table[i].type;
dev->abi_version = abi_version;
 
return &dev->ibv_dev;
diff --git a/src/ipathverbs.h b/src/ipathverbs.h
index 803ca70..3493807 100644
--- a/src/ipathverbs.h
+++ b/src/ipathverbs.h
@@ -51,16 +51,8 @@
 
 #define PFX"ipath: "
 
-enum ipath_hca_type {
-   IPATH_SPINNERET,
-   IPATH_HT,
-   IPATH_PE800,
-   IPATH_7220,
-};
-
 struct ipath_device {
struct ibv_device   ibv_dev;
-   enum ipath_hca_type hca_type;
int abi_version;
 };
 


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] How to create ofa_kernel-1.4.src.rpm from GIT?

2008-06-18 Thread Ralph Campbell
On Thu, 2008-06-19 at 01:38 +0530, Amar Mudrankit wrote:
> What is the method to create an OFED-1.4.tgz package out of its GIT
> branch? Currently, it would be enough if I could get
> ofa_kernel-1.x.src.rpm.
> 
> Is there any standard script available which will extract the source
> from given GIT branch and prepare source rpms? I have OFED-1.4 GIT
> ofed_kernel branch cloned on my local setup
> (git://git.openfabrics.org/ofed_1_4/linux-2.6.git) and I tried to run
> ofed_scripts/ofed_makedist.sh script which actually creates a set of
> .tgz corresponding to each distribution. Is it the right way?
> 
> So, a script which would package sources into ofa_kernel-1.4.src.rpm
> by extracting them from GIT branch would be helpful.
> 
> Thanks and Regards,
> Amar

Just run ofed_scripts/ofed_makedist.sh in your git tree.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/ipath - fix UC receive completion opcode

2008-05-15 Thread Ralph Campbell
Vlad, please pull one small fix for OFED-1.3.1 that has been
submitted and taken for 2.6.26.

git://git.openfabrics.org/~ralphc/linux-2.6/.git ofed_kernel


When I fixed the RC receive completion opcode, I forgot to fix UC
which had the same problem for RDMA write with immediate returning
the wrong opcode.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff -up a/drivers/infiniband/hw/ipath/ipath_uc.c 
b/drivers/infiniband/hw/ipath/ipath_uc.c
--- a/drivers/infiniband/hw/ipath/ipath_uc.c2008-05-15 16:07:53.0 
-0700
+++ b/drivers/infiniband/hw/ipath/ipath_uc.c2008-05-15 16:12:23.0 
-0700
@@ -408,12 +408,11 @@ void ipath_uc_rcv(struct ipath_ibdev *de
dev->n_pkt_drops++;
goto done;
}
-   /* XXX Need to free SGEs */
+   wc.opcode = IB_WC_RECV;
last_imm:
ipath_copy_sge(&qp->r_sge, data, tlen);
wc.wr_id = qp->r_wr_id;
wc.status = IB_WC_SUCCESS;
-   wc.opcode = IB_WC_RECV;
wc.qp = &qp->ibqp;
wc.src_qp = qp->remote_qpn;
wc.slid = qp->remote_ah_attr.dlid;
@@ -515,6 +514,7 @@ void ipath_uc_rcv(struct ipath_ibdev *de
goto done;
}
wc.byte_len = qp->r_len;
+   wc.opcode = IB_WC_RECV_RDMA_WITH_IMM;
goto last_imm;
 
case OP(RDMA_WRITE_LAST):


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH ofed-1.3.1] IB/ipath - update ipath driver to include fixes being sent to 2.6.26

2008-05-07 Thread Ralph Campbell
This patch includes a number of fixes for OFED-1.3.1
which have been or soon will be submitted to 2.6.26.

They can be pulled or accessed at:

git://git.openfabrics.org/~ralphc/linux-2.6/.git

commit 21f5def290d9840ee16973d00c12aad4cf542bb5
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Wed May 7 11:14:55 2008 -0700

IB/ipath - rename patch so it is applied before the others.

commit b1a9e3e6a81ac19f4241166e5853ae4e6a4d4c8f
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Wed May 7 10:58:05 2008 -0700

IB/ipath - update ipath driver to include fixes being sent to 2.6.26

This patch includes a number of fixes which have been
or soon will be submitted to 2.6.26.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] OFED-1.4 makedist failure?

2008-05-06 Thread Ralph Campbell
I made a fresh clone of git://git.openfabrics.org/ofed_1_4/linux-2.6.git
and tried ofed_scripts/ofed_makedist.sh from the top level directory
and got:

[EMAIL PROTECTED]:~/scm/linux-2.6$ ofed_scripts/ofed_makedist.sh 
git clone -q -s -n
--reference /home/vlad/scm/ofed_kernel.git /home/ralphc/scm/linux-2.6 
/tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11
Initialized empty Git repository
in /tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11/.git/
pushd /tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11
/tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11 ~/scm/linux-2.6
/home/ralphc/scm/linux-2.6/ofed_scripts/ofed_checkout.sh
6002e5e4a9ee0661ca6a5bc9feb191bef3b52e66
6002e5e4a9ee0661ca6a5bc9feb191bef3b52e66
>> /tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11.log
/home/ralphc/scm/linux-2.6/ofed_scripts/ofed_patch.sh
--with-backport=2.6.11
>> /tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11.log
Failed executing /home/ralphc/scm/linux-2.6/ofed_scripts/ofed_patch.sh
--with-backport=2.6.11
>> /tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11.log
Hunk #5 succeeded at 673 (offset -17 lines).
Hunk #6 succeeded at 683 (offset -17 lines).
Hunk #7 succeeded at 720 (offset -17 lines).
patching file drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Hunk #3 succeeded at 653 with fuzz 1 (offset 1 line).
Hunk #4 succeeded at 668 (offset 1 line).
Hunk #5 succeeded at 683 (offset 1 line).
Patch ipoib_0100_to_2.6.21.patch does not apply (enforce with -f)

Failed executing /usr/bin/quiltBuild failed
in /tmp/build-ofed_kernel-oPkNjv
See log file /tmp/build-ofed_kernel-oPkNjv/ofed_kernel-2.6.11.log


Is this a known problem or am I doing something wrong?

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/ipath - fix for bugs 951 and 874

2008-02-21 Thread Ralph Campbell
Vlad, you can pull the following two patches from
git://git.openfabrics.org/~ralphc/linux-2.6/.git


commit 2fe8a2701da5cd024eeb47d8096ab8cf5e8878f3
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Thu Feb 21 17:48:51 2008 -0800

IB/ipath - reset retry counter if a good response is seen

An RDMA read response is also a valid ACK up to that point so it should
reset the retry counter.  This fixes bug 874.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/kernel_patches/fixes/ipath_0430_dapl_rdma_read.patch b/kernel_patches/fixes/ipath_0430_dapl_rdma_read.patch
new file mode 100644
index 000..3605d14
--- /dev/null
+++ b/kernel_patches/fixes/ipath_0430_dapl_rdma_read.patch
@@ -0,0 +1,21 @@
+IB/ipath - reset retry counter if a good response is seen
+
+An RDMA read response is also a valid ACK up to that point so it should
+reset the retry counter.  This fixes bug 874.
+
+Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>
+
+diff -up a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
+--- a/drivers/infiniband/hw/ipath/ipath_rc.c	2008-02-21 17:28:20.0 -0800
 b/drivers/infiniband/hw/ipath/ipath_rc.c	2008-02-21 17:32:15.0 -0800
+@@ -1226,6 +1226,10 @@ static inline void ipath_rc_rcv_resp(str
+ 			list_move_tail(&qp->timerwait,
+    &dev->pending[dev->pending_index]);
+ 		spin_unlock(&dev->pending_lock);
++
++		if (opcode == OP(RDMA_READ_RESPONSE_MIDDLE))
++			qp->s_retry = qp->s_retry_cnt;
++
+ 		/*
+ 		 * Update the RDMA receive state but do the copy w/o
+ 		 * holding the locks and blocking interrupts.
commit 6780c7436219055063dd7942a1bb4426116b57b4
Author: Ralph Campbell (QLogic) <[EMAIL PROTECTED]>
Date:   Thu Feb 21 17:24:35 2008 -0800

IB/ipath - fix 4k MTU with IPoIB

This patch fixes a problem with using 4K MTUs on the QLE7140 QLogic HCA.
The fix is to make sure a 4K send buffer is used.
This fixes bug 951.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/kernel_patches/fixes/ipath_0420_ipoib_4k_mtu.patch b/kernel_patches/fixes/ipath_0420_ipoib_4k_mtu.patch
new file mode 100644
index 000..dd5496c
--- /dev/null
+++ b/kernel_patches/fixes/ipath_0420_ipoib_4k_mtu.patch
@@ -0,0 +1,193 @@
+IB/ipath - fix 4k MTU with IPoIB
+
+This patch fixes a problem with using 4K MTUs on the QLE7140 QLogic HCA.
+The fix is to make sure a 4K send buffer is used.
+
+Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>
+
+diff -up a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c
+--- a/drivers/infiniband/hw/ipath/ipath_diag.c	2008-02-21 10:17:02.0 -0800
 b/drivers/infiniband/hw/ipath/ipath_diag.c	2008-02-21 14:36:28.0 -0800
+@@ -444,7 +444,9 @@ static ssize_t ipath_diagpkt_write(struc
+ 		goto bail;
+ 	}
+ 
+-	piobuf = ipath_getpiobuf(dd, &pbufn);
++	plen >>= 2;		/* in dwords */
++
++	piobuf = ipath_getpiobuf(dd, plen, &pbufn);
+ 	if (!piobuf) {
+ 		ipath_cdbg(VERBOSE, "No PIO buffers avail unit for %u\n",
+ 			   dd->ipath_unit);
+@@ -454,9 +456,6 @@ static ssize_t ipath_diagpkt_write(struc
+ 	/* disarm it just to be extra sure */
+ 	ipath_disarm_piobufs(dd, pbufn, 1);
+ 
+-
+-	plen >>= 2;		/* in dwords */
+-
+ 	if (ipath_debug & __IPATH_PKTDBG)
+ 		ipath_cdbg(VERBOSE, "unit %u 0x%x+1w pio%d\n",
+ 			   dd->ipath_unit, plen - 1, pbufn);
+diff -up a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
+--- a/drivers/infiniband/hw/ipath/ipath_driver.c	2008-02-21 10:17:02.0 -0800
 b/drivers/infiniband/hw/ipath/ipath_driver.c	2008-02-21 14:48:02.0 -0800
+@@ -340,7 +340,7 @@ static void ipath_verify_pioperf(struct 
+ 	u32 *addr;
+ 	u64 msecs, emsecs;
+ 
+-	piobuf = ipath_getpiobuf(dd, &pbnum);
++	piobuf = ipath_getpiobuf(dd, 0, &pbnum);
+ 	if (!piobuf) {
+ 		dev_info(&dd->pcidev->dev,
+ 			"No PIObufs for checking perf, skipping\n");
+@@ -1620,24 +1620,35 @@ rescan:
+ /**
+  * ipath_getpiobuf - find an available pio buffer
+  * @dd: the infinipath device
++ * @plen: the size of the PIO buffer needed in 32-bit words
+  * @pbufnum: the buffer number is placed here
+  * Searches the allocated driver range.
+  */
+-u32 __iomem *ipath_getpiobuf(struct ipath_devdata *dd, u32 *pbufnum)
++u32 __iomem *ipath_getpiobuf(struct ipath_devdata *dd, u32 plen, u32 *pbufnum)
+ {
+ 	u32 __iomem *buf;
+ 	u32 pnum, nbufs;
++	u32 first, lasti;
+ 
++	if (plen + 1 >= IPATH_SMALLBUF_DWORDS) {
++		first = dd->ipath_piobcnt2k;
++		lasti = dd->ipath_lastpioindexl;
++	} else {
++		first = 0;
++		lasti = dd->ipath_lastpioindex;
++	}
+ 	nbufs = dd->ipath_piobcnt2k + dd->ipath_piobcnt4k;
+-	buf = ipath_getpiobuf_range(dd, &pnum, 0, nbufs,
+-dd->ipath_lastpioindex);
++	buf = ipath_getpiobuf_range(dd, &pnum, firs

Re: [ewg] [Fwd: Re: [ofa-general] IPOIB/CM increase retry counts]

2008-02-14 Thread Ralph Campbell
The setup is two nodes, any QLogic HCA, running IPoIB-CM with
65520 MTU running netperf, iperf, etc.
I haven't tried mixed sets of QLogic & Mellanox but I wouldn't
be surprised to find similar results.
It does vary somewhat from distro to distro, kernel
version, TCP parameters, etc. but is easily reproducible.
I also haven't had time to investigate the causes.

On Thu, 2008-02-14 at 10:40 +0200, Or Gerlitz wrote:
> Ralph Campbell wrote:
> > Yes. I see RNR NAKs with IPoIB connected mode quite often.
> 
> What is the setup one needs to make it happen? is it only when each node 
> has different HCA or it happens also on a homogeneous setup?
> 
> Or

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [Fwd: Re: [ofa-general] IPOIB/CM increase retry counts]

2008-02-13 Thread Ralph Campbell
On Wed, 2008-02-13 at 09:08 +0200, Or Gerlitz wrote:
> Did anyone at Cisco, Qlogic, Mellanox, Voltaire noticed the phenomena 
> reported by Shirley on their testing?
> 
> Or.

Yes. I see RNR NAKs with IPoIB connected mode quite often.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/ipath for OFED 1.3 RC5

2008-02-12 Thread Ralph Campbell
Vlad, please pull from git://git.openfabrics.org/~ralphc/linux-2.6/.git
in the ofed_kernel branch.

This has a number of commits to kernel_patches/backports for the
QLogic ib_ipath driver and one new file in
kernel_patches/fixes/ipath_0410_update.patch to update the driver
with the latest fixes.

We are still working on bug 874 so this isn't fixed yet.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] Re: [PATCH] IB/ipoib: bug fix creation of own_ah

2008-02-11 Thread Ralph Campbell
I tried this out on RHEL 5 (2.6.18-8.el5) and it works OK.

Acked-by: Ralph Campbell <[EMAIL PROTECTED]>


On Sun, 2008-02-10 at 17:08 +0200, Eli Cohen wrote:
> [PATCH] IB/ipoib: bug fix creation of own_ah
> 
> Create own ah after the port is queried. This also handles
> cases when a port change event occurs (which includes lid
> change event).
> 
> Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
> ---
> 
> Ralph, Arlin,
> 
> I think this patch should fix the problem you were seeing. Could you
> check if it does? I pushed this to ofed 1.3 tree.
> 
> 
>   kernel_patches/fixes/ipoib_0190_unsig_udqp.patch |  169 
> +-
>   1 files changed, 99 insertions(+), 70 deletions(-)
> 
> diff --git a/kernel_patches/fixes/ipoib_0190_unsig_udqp.patch 
> b/kernel_patches/fixes/ipoib_0190_unsig_udqp.patch
> index 1ffb78a..2a1062d 100644
> --- a/kernel_patches/fixes/ipoib_0190_unsig_udqp.patch
> +++ b/kernel_patches/fixes/ipoib_0190_unsig_udqp.patch
> @@ -13,7 +13,7 @@ Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
>   Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib.h
>   ===
>   --- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib.h   2008-02-10 
> 10:04:06.097933000 +0200
> -+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib.h 2008-02-10 
> 10:08:46.941535000 +0200
>  ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib.h 2008-02-10 
> 14:11:45.097178000 +0200
>   @@ -373,6 +373,7 @@ struct ipoib_dev_priv {
> 
>   struct ib_wc ibwc[IPOIB_NUM_WC];
> @@ -39,10 +39,18 @@ Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib.h
> 
>struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
>struct ib_pd *pd, struct ib_ah_attr *attr);
> +@@ -534,6 +536,7 @@ int ipoib_pkey_dev_delay_open(struct net
> + void ipoib_drain_cq(struct net_device *dev);
> +
> + void ipoib_set_ethtool_ops(struct net_device *dev);
> ++void destroy_own_ah(struct ipoib_dev_priv *priv);
> +
> + #ifdef CONFIG_INFINIBAND_IPOIB_CM
> +
>   Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
>   ===
>   --- ofed_kernel.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> 2008-02-10 10:04:06.092935000 +0200
> -+++ ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c  2008-02-10 
> 10:09:59.703873000 +0200
>  ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c  2008-02-10 
> 14:11:45.086179000 +0200
>   @@ -254,12 +254,10 @@ repost:
>  "for buf %d\n", wr_id);
>}
> @@ -83,7 +91,9 @@ Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
>   test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
>   netif_wake_queue(dev);
>   +}
> -+
> +
> +-if (need_lock)
> +-spin_unlock_irqrestore(&priv->tx_lock, flags);
>   +static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
>   +{
>   +   struct ipoib_dev_priv *priv = netdev_priv(dev);
> @@ -96,9 +106,7 @@ Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
>   +   _ipoib_ib_handle_tx_wc(dev, i);
>   +   } while (i++ != wr_id);
>   +   priv->tx_poll = i & (ipoib_sendq_size - 1);
> -
> --if (need_lock)
> --spin_unlock_irqrestore(&priv->tx_lock, flags);
> ++
>   +   if (unlikely(wc->status != IB_WC_SUCCESS &&
>   +wc->status != IB_WC_WR_FLUSH_ERR))
> 
> @@ -128,7 +136,7 @@ Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
>}
> 
>int ipoib_poll(struct napi_struct *napi, int budget)
> -@@ -361,11 +372,63 @@ void ipoib_ib_rx_completion(struct ib_cq
> +@@ -361,11 +372,66 @@ void ipoib_ib_rx_completion(struct ib_cq
>   netif_rx_schedule(dev, &priv->napi);
>}
> 
> @@ -161,7 +169,8 @@ Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
>   +   spin_lock_irqsave(&priv->tx_lock, flags);
>   +   if (((int)priv->tx_tail - (int)priv->tx_head < 0) &&
>   +   time_after(jiffies, dev->trans_start + 10) &&
> -+priv->tx_outstanding < ipoib_sendq_size) {
> ++priv->tx_outstanding < ipoib_sendq_size &&
> ++priv->own_ah) {
>   +   wrid = priv->tx_head & (ipoib_sendq_size - 1);
>   +   priv->tx_ring[wrid].skb = NULL;
>   +   if (post_zlen_send_wr(priv, wrid))
> @@ -173,8 +182,7 @@ Index: ofed_kernel/drivers/infiniband/ulp/ipoib/ipoib_ib.c
>   +   }
>   +   poll_tx(priv);
>   +   spin_unlock_irqrestore(&priv->tx_lock, flags);
> -
> --poll_tx(priv,

[ewg] [PATCH] IB/ipoib - Problem with latest OFED 1.3 build... IPoIB and iPATH

2008-02-08 Thread Ralph Campbell
Here is a suggested patch for ib_ipoib for fixing the OFED-1.3 RC4
problem with ib_ipath.

Note that I'm not completely familiar with all the ib_ipoib changes.
In particular, I haven't checked that IB_EVENT_LID_CHANGE correctly
updates priv->own_ah.


--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c   2008-02-07 17:51:06.0 
-0800
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c   2008-02-08 11:33:06.0 
-0800
@@ -664,8 +664,8 @@ void ipoib_reap_ah(struct work_struct *w
 
 static int create_own_ah(struct ipoib_dev_priv *priv)
 {
+   struct ib_port_attr pattr;
struct ib_ah_attr attr = {
-   .dlid = priv->local_lid,
.port_num = priv->port,
};
 
@@ -673,6 +673,9 @@ static int create_own_ah(struct ipoib_de
ipoib_dbg(priv, "own ah already exists\n");
return -EINVAL;
}
+   if (ib_query_port(priv->ca, priv->port, &pattr))
+   return -EINVAL;
+   attr.dlid = pattr.lid;
priv->own_ah = ib_create_ah(priv->pd, &attr);
return IS_ERR(priv->own_ah);
 }


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [Fwd: Re: [ofa-general] Problem with latest OFED 1.3 build... IPoIB and iPATH]

2008-02-07 Thread Ralph Campbell
On Thu, 2008-02-07 at 08:29 -0800, Shirley Ma wrote:
> On Thu, 2008-02-07 at 18:16 -0800, Ralph Campbell wrote:
> > # cat /etc/*release
> > Red Hat Enterprise Linux Server release 5 (Tikanga)
> > # uname -r
> > 2.6.18-8.el5
> > 
> > 4K PAGE_SIZE
> I don't have ipath driver here. Otherwise I could try them out. 
> 
> A couple suggestions here, could you please try out?
> 
> 1. try this on 64K page size, like RHEL5U1 to see whether you have the
> same issue.

We don't have any systems with 64K page size at hand.

> 2. Can you put a debug message in ipath_create_ah() to see whether this
> is a memory allocation failure?

I'm working on it.

> 3. How many IB cards in your system? If you have severals, just leave
> one ipath there to see whether you can hit this problem.

only one card with one IB port.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


Re: [ewg] [Fwd: Re: [ofa-general] Problem with latest OFED 1.3 build... IPoIB and iPATH]

2008-02-07 Thread Ralph Campbell
On Thu, 2008-02-07 at 08:11 -0800, Shirley Ma wrote:
> Hello Ralph,
> 
> What's ifconfig ib0 output?

# ifconfig ib0 ib-iqa-77 mtu 65520
ib0: bringing up interface
ib0: failed to create own ah
SIOCSIFFLAGS: Invalid argument

> > > We can reproduce the problem here.
> > > We haven't made any ib_ipath driver changes between RC3 and RC4
> > > so some recent patch has broken us.
> > > I'm in the process of looking at it.
> > > 
> > > On Wed, 2008-02-06 at 17:17 -0800, Arlin Davis wrote:
> > > > I cannot ifconfig ib0 on ipath with using the latest build
> > > > (ofed20080206).
> > > >  
> > > > ifup ib0
> > > > SIOCSIFFLAGS: Invalid argument
> > > > Failed to bring up ib0.
> > > > 
> > > > >>>  ib0: failed to create own ah
> 
> int ipoib_ib_dev_open(struct net_device *dev)
> {
> struct ipoib_dev_priv *priv = netdev_priv(dev);
> int ret;
> 
> if (ib_find_pkey(priv->ca, priv->port, priv->pkey,
> &priv->pkey_index)) {
> ipoib_warn(priv, "P_Key 0x%04x not found\n",
> priv->pkey);
> clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
> return -1;
> }
> set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
> 
> ret = create_own_ah(priv);
> if (ret) {
> priv->own_ah = NULL;
> ipoib_warn(priv, "failed to create own ah\n");
> return -1;
> }
> 
> Looks like the ipath driver returns error from create_own_ah() call. Are
> you sure there is no ipath driver changes between RC3 and RC4?

Yes.

> Which kernel did you hit this problem? What's the kernel PAGE_SIZE?

# cat /etc/*release
Red Hat Enterprise Linux Server release 5 (Tikanga)
# uname -r
2.6.18-8.el5

4K PAGE_SIZE

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [Fwd: Re: [ofa-general] Problem with latest OFED 1.3 build... IPoIB and iPATH]

2008-02-07 Thread Ralph Campbell
I forgot to CC EWG on my reply to Arlin Davis.
--- Begin Message ---
We can reproduce the problem here.
We haven't made any ib_ipath driver changes between RC3 and RC4
so some recent patch has broken us.
I'm in the process of looking at it.

On Wed, 2008-02-06 at 17:17 -0800, Arlin Davis wrote:
> I cannot ifconfig ib0 on ipath with using the latest build
> (ofed20080206).
>  
> ifup ib0
> SIOCSIFFLAGS: Invalid argument
> Failed to bring up ib0.
> 
> >>>  ib0: failed to create own ah
>  
> CA 'ipath0'
> CA type: InfiniPath_QLE7140
> Number of ports: 1
> Firmware version:
> Hardware version: 2
> Node GUID: 0x001175ffd75b
> System image GUID: 0x001175ffd75b
> Port 1:
> State: Active
> Physical state: LinkUp
> Rate: 10
> Base lid: 14
> LMC: 0
> SM lid: 1
> Capability mask: 0x02010800
> Port GUID: 0x001175ffd75b
>  
> It works fine on mthca adapters. Anyone else see this problem?
> 
> 
> -arlin
> 
> 
>  
> ___
> general mailing list
> [EMAIL PROTECTED]
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
--- End Message ---
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Re: [ewg] RDS problematic on RC2

2008-01-17 Thread Ralph Campbell
Attached is the patch I sent to Olaf.
It basically exchanges calls like dma_map_sg() to ib_dma_map_sg()
so that the InfiniPath driver can intercept the DMA mapping
calls and use kernel virtual addresses instead of physical addresses.
The InfiniPath driver uses the host CPU to copy data in most cases
instead of DMA.  I doubt this will fix or change the other issues
Olaf is working on for RDS.

On Thu, 2008-01-17 at 14:06 +0200, Or Gerlitz wrote:
> Johann George wrote:
> >> Oh, and if you're using RDMA - does this happen to be with
> >> qlogic HCAs?  If so, I just received a patch from Ralph
> >> Campbell with some fixes to the way we set up out DMA
> >> mapping.
> > 
> > RDS in OFED 1.3 does not currently work on the QLogic HCAs
> > due to the way you are setting up DMA mapping.  We already
> > discovered that and the patch that Ralph sent will hopefully
> > fix the problem.
> 
> Olaf, Johan, may we (rds-devel) see the patch from Ralph?
> 
> Or.
> 
> ___
> ewg mailing list
> ewg@lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 669ec7b..9c75767 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -70,7 +70,7 @@ struct rds_ib_connection {
 	struct rds_ib_work_ring	i_send_ring;
 	struct rds_message	*i_rm;
 	struct rds_header	*i_send_hdrs;
-	dma_addr_t 		i_send_hdrs_dma;
+	u64			i_send_hdrs_dma;
 	struct rds_ib_send_work *i_sends;
 
 	/* rx */
@@ -79,7 +79,7 @@ struct rds_ib_connection {
 	struct rds_ib_incoming	*i_ibinc;
 	u32			i_recv_data_rem;
 	struct rds_header	*i_recv_hdrs;
-	dma_addr_t 		i_recv_hdrs_dma;
+	u64			i_recv_hdrs_dma;
 	struct rds_ib_recv_work *i_recvs;
 	struct rds_page_frag	i_frag;
 	dma_addr_t 		i_addr;
@@ -96,7 +96,7 @@ struct rds_ib_connection {
 	struct rds_header	*i_ack;
 	struct ib_send_wr	i_ack_wr;
 	struct ib_sge		i_ack_sge;
-	dma_addr_t 		i_ack_dma;
+	u64			i_ack_dma;
 	unsigned long		i_ack_queued;
  
  	/* sending congestion bitmaps */
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 41fa294..d962239 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -111,6 +111,7 @@ static void rds_ib_qp_event_handler(struct ib_event *event, void *data)
 static int rds_ib_setup_qp(struct rds_connection *conn)
 {
 	struct rds_ib_connection *ic = conn->c_transport_data;
+	struct ib_device *dev = ic->i_cm_id->device;
 	struct ib_qp_init_attr attr;
 	struct rds_ib_device *rds_ibdev;
 	int ret;
@@ -120,11 +121,11 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 	 * for each.  If that fails for any reason, it will not register
 	 * the rds_ibdev at all.
 	 */
-	rds_ibdev = ib_get_client_data(ic->i_cm_id->device, &rds_ib_client);
+	rds_ibdev = ib_get_client_data(dev, &rds_ib_client);
 	if (rds_ibdev == NULL) {
 		if (printk_ratelimit())
 			printk(KERN_NOTICE "RDS/IB: No client_data for device %s\n",
-	ic->i_cm_id->device->name);
+	dev->name);
 		return -EOPNOTSUPP;
 	}
 
@@ -132,8 +133,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 	ic->i_pd = rds_ibdev->pd;
 	ic->i_mr = rds_ibdev->mr;
 
-	ic->i_send_cq = ib_create_cq(ic->i_cm_id->device,
- rds_ib_send_cq_comp_handler,
+	ic->i_send_cq = ib_create_cq(dev, rds_ib_send_cq_comp_handler,
  rds_ib_cq_event_handler, conn,
  ic->i_send_ring.w_nr + 1, 0);
 	if (IS_ERR(ic->i_send_cq)) {
@@ -143,8 +143,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 		goto out;
 	}
 
-	ic->i_recv_cq = ib_create_cq(ic->i_cm_id->device,
- rds_ib_recv_cq_comp_handler,
+	ic->i_recv_cq = ib_create_cq(dev, rds_ib_recv_cq_comp_handler,
  rds_ib_cq_event_handler, conn,
  ic->i_recv_ring.w_nr, 0);
 	if (IS_ERR(ic->i_recv_cq)) {
@@ -190,32 +189,31 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 		goto out;
 	}
 
-	ic->i_send_hdrs = dma_alloc_coherent(ic->i_cm_id->device->dma_device,
+	ic->i_send_hdrs = ib_dma_alloc_coherent(dev,
 	   ic->i_send_ring.w_nr *
 	   	sizeof(struct rds_header),
 	   &ic->i_send_hdrs_dma, GFP_KERNEL);
 	if (ic->i_send_hdrs == NULL) {
 		ret = -ENOMEM;
-		rdsdebug("dma_alloc_coherent send failed\n");
+		rdsdebug("ib_dma_alloc_coherent send failed\n");
 		goto out;
 	}
 
-	ic->i_recv_hdrs = dma_alloc_coherent(ic->i_cm_id->device->dma_device,
+	ic->i_recv_hdrs = ib_dma_alloc_coherent(dev,
 	   ic->i_recv_ring.w_nr *
 	   	sizeof(struct rds_header),
 	   &ic->i_recv_hdrs_dma, GFP_KERNEL);
 	if (ic->i_recv_hdrs == NULL) {
 		ret = -ENOMEM;
-		rdsdebug("dma_alloc_coherent recv failed\n");
+		rdsdebug("ib_dma_alloc_coherent recv failed\n");
 		goto out;
 	}
 
-	ic->i_ack = dma_alloc_coherent(ic->i_cm_id->device-&g

[ewg] [PATCH] IB/sdp - Fix NULL pointer oops when calling put_page()

2008-01-03 Thread Ralph Campbell
put_page() does not check for NULL pointers so SDP should check this
before calling it.

Note that this probably has spaces instead of tabs but I'm using
a web email interface and I'm not sure how to preserve tabs.
I assume the current SDP owner will apply this.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
sdp_main.c
index 809f7b8..35c4dd3 100644
--- a/drivers/infiniband/ulp/sdp/sdp_main.c
+++ b/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -1212,7 +1212,8 @@ static inline struct bzcopy_state *sdp_bz_cleanup(struct b
zcopy_state *bz)
 
if (bz->pages) {
for (i = bz->cur_page; i < bz->page_cnt; i++)
-   put_page(bz->pages[i]);
+   if (bz->pages[i])
+   put_page(bz->pages[i]);
 
kfree(bz->pages);
}
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

[ewg] [PATCH] IB/core - ib_wr_opcode change to add IB_WR_LSO breaks ib_ipath

2008-01-03 Thread Ralph Campbell
Vlad, please pull from git.openfabrics.org/~ralphc/linux-2.6.git in
the ofed_kernel_2_6_24_rc1 branch. This is an up-to-date clone
of git://git.openfabrics.org/ofed_1_3/linux-2.6.git with the
following change:


The ib_ipath driver depends on /usr/include/infiniband/verbs.h
enum ibv_wr_opcode matching the kernel's ib_verbs.h
enum ib_wr_opcode. The recent change to add IB_WR_LSO breaks this.

Now, you may argue that the kernel should not depend on this equivalence
but you would then need to define IBV_WR_RDMA_WRITE, etc. in some
kernel header file and do a table look up to map from user to
kernel opcode values. Since I don't see any other code which depends
on the value of IB_WR_LSO, I think the following patch is the right
fix.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/kernel_patches/fixes/core_0030_lso.patch 
b/kernel_patches/fixes/core_0030_lso.patch
index 3f6af37..94a91b4 100644
--- a/kernel_patches/fixes/core_0030_lso.patch
+++ b/kernel_patches/fixes/core_0030_lso.patch
@@ -27,14 +27,16 @@ Index: ofed_kernel/include/rdma/ib_verbs.h
  /*
   * Set value of IB_WC_RECV so consumers can test if a completion is a
   * receive by testing (opcode & IB_WC_RECV).
-@@ -609,6 +611,7 @@ enum ib_wr_opcode {
-   IB_WR_RDMA_WRITE,
-   IB_WR_RDMA_WRITE_WITH_IMM,
-   IB_WR_SEND,
-+  IB_WR_LSO,
+@@ -612,7 +614,8 @@ enum ib_wr_opcode {
IB_WR_SEND_WITH_IMM,
IB_WR_RDMA_READ,
IB_WR_ATOMIC_CMP_AND_SWP,
+-  IB_WR_ATOMIC_FETCH_AND_ADD
++  IB_WR_ATOMIC_FETCH_AND_ADD,
++  IB_WR_LSO
+ };
+ 
+ enum ib_send_flags {
 @@ -621,7 +624,8 @@ enum ib_send_flags {
IB_SEND_SOLICITED   = (1<<2),
IB_SEND_INLINE  = (1<<3),
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

[ewg] [PATCH] IB/sdp Fix a kernel panic in put_page() that was passing NULL

2007-11-30 Thread Ralph Campbell
The new bzcopy_state() was trying to free unset bz->pages[i]
entries.

Signed-off-by: Dave Olson <[EMAIL PROTECTED]>

diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c 
b/drivers/infiniband/ulp/sdp/sdp_main.c
index 809f7b8..35c4dd3 100644
--- a/drivers/infiniband/ulp/sdp/sdp_main.c
+++ b/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -1212,7 +1212,8 @@ static inline struct bzcopy_state *sdp_bz_cleanup(struct 
bzcopy_state *bz)
 
if (bz->pages) {
for (i = bz->cur_page; i < bz->page_cnt; i++)
-   put_page(bz->pages[i]);
+   if (bz->pages[i])
+   put_page(bz->pages[i]);
 
kfree(bz->pages);
}


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/libipathverbs - Use the same error return codes as the kernel

2007-11-16 Thread Ralph Campbell
The ib_post_*() functions return EINVAL when posting too many SGEs
and ENOMEM when posting too many WRs.  This patch matches the
kernel's return values and is consistent with the libibverbs man pages.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/src/verbs.c b/src/verbs.c
index 5424e82..dcd8efb 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -466,13 +466,17 @@ static int post_recv(struct ipath_rq *rq, struct 
ibv_recv_wr *wr,
rwq = rq->rwq;
head = rwq->head;
for (i = wr; i; i = i->next) {
-   if ((unsigned) i->num_sge > rq->max_sge)
+   if ((unsigned) i->num_sge > rq->max_sge) {
+   ret = EINVAL;
goto bad;
+   }
wqe = get_rwqe_ptr(rq, head);
if (++head >= rq->size)
head = 0;
-   if (head == rwq->tail)
+   if (head == rwq->tail) {
+   ret = ENOMEM;
goto bad;
+   }
wqe->wr_id = i->wr_id;
wqe->num_sge = i->num_sge;
for (n = 0; n < wqe->num_sge; n++)
@@ -485,7 +489,6 @@ static int post_recv(struct ipath_rq *rq, struct 
ibv_recv_wr *wr,
goto done;
 
 bad:
-   ret = -ENOMEM;
if (bad_wr)
*bad_wr = i;
 done:


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/libipathverbs - Limit amount of memory ibv_cmd_post_send() needs

2007-11-16 Thread Ralph Campbell
The gen2_basic test program attempts to post thousands of WRs
in one call. The ibv_cmd_post_send() function then tried to allocate
enough memory on the stack in order to write this to the kernel.
This patch limits the amount of memory needed by posting WRs in
smaller groups.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/src/ipathverbs.c b/src/ipathverbs.c
index 293dba8..eb16fb0 100644
--- a/src/ipathverbs.c
+++ b/src/ipathverbs.c
@@ -119,7 +119,7 @@ static struct ibv_context_ops ipath_ctx_ops = {
.modify_qp  = ipath_modify_qp,
.destroy_qp = ipath_destroy_qp,
 
-   .post_send  = ibv_cmd_post_send,
+   .post_send  = ipath_post_send,
.post_recv  = ipath_post_recv,
 
.create_ah  = ipath_create_ah,
diff --git a/src/verbs.c b/src/verbs.c
index 57c78dd..5424e82 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -419,6 +419,40 @@ int ipath_destroy_qp_v1(struct ibv_qp *ibqp)
return ret;
 }
 
+int ipath_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr,
+   struct ibv_send_wr **bad_wr)
+{
+   unsigned wr_count;
+   struct ibv_send_wr *i;
+
+   /* Sanity check the number of WRs being posted */
+   for (i = wr, wr_count = 0; i; i = i->next)
+   if (++wr_count > 10)
+   goto iter;
+
+   return ibv_cmd_post_send(qp, wr, bad_wr);
+
+iter:
+   do {
+   struct ibv_send_wr *next;
+   int ret;
+
+   next = i->next;
+   i->next = NULL;
+   ret = ibv_cmd_post_send(qp, wr, bad_wr);
+   i->next = next;
+   if (ret)
+   return ret;
+   if (next == NULL)
+   break;
+   wr = next;
+   for (i = wr, wr_count = 0; i->next; i = i->next)
+   if (++wr_count > 2)
+   break;
+   } while (1);
+   return 0;
+}
+
 static int post_recv(struct ipath_rq *rq, struct ibv_recv_wr *wr,
 struct ibv_recv_wr **bad_wr)
 {


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] Re: [PATCH] libibverbs - return valid bad_wr from ibv_cmd_post_send()

2007-11-13 Thread Ralph Campbell
On Tue, 2007-11-13 at 14:50 -0800, Roland Dreier wrote:
>  > +  } else if (ret)
>  > +  *bad_wr = wr;
> 
> Hmm... it seems a little strange to pick the first WR for no reason
> when the kernel didn't point at a particular work request.  Maybe it
> would make more sense to set bad_wr to NULL in this case?

Well, ibv_cmd_post_send() isn't going to know if the EINVAL is due
to the size of the write being different from what the kernel expects
(i.e., unrelated to WRs) or if the ID of the address handle
is invalid and thus it is related to the WR. Now that I look
at ib_uverbs_post_send() again, it seems that this later case should
set resp.bad_wr and copy out the index of the WR that had the error.

But even if there is an error not related to any WR directly,
it is still the first WR that is not sent. I guess NULL could
be used to give slightly more information to the caller but
I don't really expect most application error recovery code to
make the distinction.

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] libibverbs - return valid bad_wr from ibv_cmd_post_send()

2007-11-12 Thread Ralph Campbell
There are error cases in ib_uverbs_post_send() where the return
value is negative (i.e., an error) and yet a non-zero resp.bad_wr
is not written back to ibv_cmd_post_send().  In this case,
ibv_cmd_post_send() should still set the bad_wr pointer.

It seems to me that this should go into OFED 1.3.
I will leave the mechanics of how that happens to Roland and Vlad.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/src/cmd.c b/src/cmd.c
index 6d4331f..305e263 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -884,7 +884,8 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct 
ibv_send_wr *wr,
while (--wr_count)
i = i->next;
*bad_wr = i;
-   }
+   } else if (ret)
+   *bad_wr = wr;
 
return ret;
 }


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] OFED/kernel_addons - add for_each_sg() macro

2007-11-01 Thread Ralph Campbell
The ib_ipath driver calls the for_each_sg() macro so define it in the
kernel_addons include directory for 2.6.23 and earlier kernels.

This can be pulled from git://git.openfabrics.org/~ralphc/linux-2.6/.git

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/kernel_addons/backport/2.6.23/include/linux/scatterlist.h 
b/kernel_addons/backport/2.6.23/include/linux/scatterlist.h
index 6e1fbf5..2bdbb18 100644
--- a/kernel_addons/backport/2.6.23/include/linux/scatterlist.h
+++ b/kernel_addons/backport/2.6.23/include/linux/scatterlist.h
@@ -6,4 +6,7 @@
 #define sg_init_table(a, b)
 #define sg_set_page(a, b) ((a)->page) = (b)
 
+#define for_each_sg(sglist, sg, nr, __i)   \
+   for (__i = 0, sg = (sglist); __i < (nr); __i++, sg++)
+
 #endif


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] OFED/scripts - Not all systems create a ".pc" file

2007-11-01 Thread Ralph Campbell
The ofed_makedist.sh assumes that a ".pc" file is created and at least
on the Fedora Core 6 system, this is not true.  This patch checks
to see if the file is present before attempting to chmod it.

This can be pulled from git://git.openfabrics.org/~ralphc/linux-2.6/.git

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/ofed_scripts/ofed_makedist.sh b/ofed_scripts/ofed_makedist.sh
index 907f9fd..e5f661f 100755
--- a/ofed_scripts/ofed_makedist.sh
+++ b/ofed_scripts/ofed_makedist.sh
@@ -50,8 +50,11 @@ do
 $CWD/ofed_scripts/ofed_patch.sh --with-backport=$backport
#Some QUILT versions create files with 0 permissions
#work around this
-   ex "" chmod -R u+rw .pc
-   ex "" chmod -R o+r .pc
+   if [ -f .pc ]
+   then
+   ex "" chmod -R u+rw .pc
+   ex "" chmod -R o+r .pc
+   fi
ex "" cd $tmpdir
ex "" tar czf $tmpdir/$project-$backport.tgz $project-$backport
ex "" popd


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/madeye - Fix a minor output alignment printk

2007-10-18 Thread Ralph Campbell
The hop pointer and hop count values are not printed in the same
column as the other fields.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/drivers/infiniband/util/madeye.c b/drivers/infiniband/util/madeye.c
index afe..c91d3bb 100644
--- a/drivers/infiniband/util/madeye.c
+++ b/drivers/infiniband/util/madeye.c
@@ -359,8 +359,8 @@ static void print_smp(struct ib_smp *smp)
printk("Status.0x%02x\n", be16_to_cpu(smp->status));
if (smp->status)
print_status_details(be16_to_cpu(smp->status));
-   printk("Hop pointer...0x%01x\n", smp->hop_ptr);
-   printk("Hop counter...0x%01x\n", smp->hop_cnt);
+   printk("Hop pointer0x%01x\n", smp->hop_ptr);
+   printk("Hop counter0x%01x\n", smp->hop_cnt);
printk("Trans ID...0x%llx\n", smp->tid);
printk("Attr ID0x%02x (%s)\n", be16_to_cpu(smp->attr_id),
get_smp_attr(smp->attr_id));


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] Re: RFC: modify upstream code to make backporting easier

2007-09-11 Thread Ralph Campbell
Looks OK to me from the InfiniPath side.
Keeping the backported code as close as possible to the
upstream code is a good thing in my view.

On Tue, 2007-09-11 at 09:28 +0300, Michael S. Tsirkin wrote:
> Roland, Ralph, all,
> I'd like to get your opinion on the following matter:
> OFED is backporting upstream rdma code to older kernels.
> While doing so, I really take pains to keep the ported
> code as close as possible to upstream original,
> mostly by using preprocessor to implement, as closely
> as possible, the APIs from recent kernels on top of
> older ones.
> 
> As an example where this works well, see my backport of the
> new workqueue API to 2.6.19:
> http://www.openfabrics.org/git/?p=ofed_1_3/linux-2.6.git;a=blob;f=kernel_addons/backport/2.6.19/include/linux/workqueue.h;hb=HEAD
> 
> However, sometimes I am forced to patch the upstream code. Here's an
> example of the patch needed to make ipath build on
> 2.6.22:
> 
> 
> diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c 
> b/drivers/infiniband/hw/ipath/ipath_driver.c
> index 09c5fd8..94edb5d 100644
> --- a/drivers/infiniband/hw/ipath/ipath_driver.c
> +++ b/drivers/infiniband/hw/ipath/ipath_driver.c
> @@ -287,6 +287,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
>   struct ipath_devdata *dd;
>   unsigned long long addr;
>   u32 bar0 = 0, bar1 = 0;
> + u8 rev;
>  
>   dd = ipath_alloc_devdata(pdev);
>   if (IS_ERR(dd)) {
> @@ -448,7 +449,13 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
>   dd->ipath_deviceid = ent->device;   /* save for later use */
>   dd->ipath_vendorid = ent->vendor;
>  
> - dd->ipath_pcirev = pdev->revision;
> + ret = pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
> + if (ret) {
> + ipath_dev_err(dd, "Failed to read PCI revision ID unit "
> +   "%u: err %d\n", dd->ipath_unit, -ret);
> + goto bail_regions;  /* shouldn't ever happen */
> + }
> + dd->ipath_pcirev = rev;
>  
>  #if defined(__powerpc__)
>   /* There isn't a generic way to specify writethrough mappings */
> 
> 
> As you can see, there's nothing I can do with macros outside the code
> to make it work without code changes.
> However, the patching mechanism is pretty fragile with respect
> to code reorgs etc.
> I wonder whether it's acceptable in cases such as this to add
> a wrapper in upstream code. For example, upstream could have:
> 
> #ifndef pci_get_revision
> #define pci_get_revision(dev) ((dev)->revision)
> #endif
> 
> and then all a 2.6.22 backport needs to do is define it's own
> pci_get_revision macro.
> 
> Upstream maintainers, can you pls comment ASAP on whether such approach would 
> be
> acceptable e.g. for 2.6.24?  If I could get rid of backport
> patches, it might make sense to start thinking about converting fixes
> patches to git commits, post 1.3, as well.
> 
> Thanks,
> 

___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/libipathverbs - Add recognition for new QLogic device IDs

2007-08-28 Thread Ralph Campbell
This patch adds an additional device ID to recognize a new HCA.

This change has been committed to
git://git.openfabrics.org/~ralphc/libipathverbs/.git
and I would like to see this version of libipathverbs
become part of OFED 1.3.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/src/ipathverbs.c b/src/ipathverbs.c
index f3e2fde..293dba8 100644
--- a/src/ipathverbs.c
+++ b/src/ipathverbs.c
@@ -70,6 +70,10 @@
 #define PCI_DEVICE_ID_INFINIPATH_6220  0x6220
 #endif
 
+#ifndef PCI_DEVICE_ID_INFINIPATH_7220
+#define PCI_DEVICE_ID_INFINIPATH_7220  0x7220
+#endif
+
 #define HCA(v, d, t) \
{ .vendor = PCI_VENDOR_ID_##v,  \
  .device = PCI_DEVICE_ID_INFINIPATH_##d,   \
@@ -83,7 +87,8 @@ struct {
HCA(PATHSCALE,  SPINNERET, SPINNERET),
HCA(PATHSCALE,  HT,   HT),
HCA(PATHSCALE,  PE800,PE800),
-   HCA(QLOGIC, 6220, 6220),
+   HCA(QLOGIC, 6220, 7220),
+   HCA(QLOGIC, 7220, 7220),
 };
 
 static struct ibv_context_ops ipath_ctx_ops = {
diff --git a/src/ipathverbs.h b/src/ipathverbs.h
index 43eee82..803ca70 100644
--- a/src/ipathverbs.h
+++ b/src/ipathverbs.h
@@ -55,7 +55,7 @@ enum ipath_hca_type {
IPATH_SPINNERET,
IPATH_HT,
IPATH_PE800,
-   IPATH_6220,
+   IPATH_7220,
 };
 
 struct ipath_device {


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] IB/ipath - Return the PortGUID of the correct port when responding to a NodeInfo query

2007-08-16 Thread Ralph Campbell
Return the PortGUID of the correct port when responding to a NodeInfo
query.  Returning the SystemImageGUID causes issues when there are
multiple HCAs in a single system.

This patch is in the 2.6.23 kernel but I would like to see it included
in the OFED 1_2_c release.

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c 
b/drivers/infiniband/hw/ipath/ipath_mad.c
index 25908b0..984ec84 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -103,7 +103,7 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp,
/* This is already in network order */
nip->sys_guid = to_idev(ibdev)->sys_image_guid;
nip->node_guid = dd->ipath_guid;
-   nip->port_guid = nip->sys_guid;
+   nip->port_guid = dd->ipath_guid;
nip->partition_cap = cpu_to_be16(ipath_get_npkeys(dd));
nip->device_id = cpu_to_be16(dd->ipath_deviceid);
majrev = dd->ipath_majrev;


___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] OFED_1_2_c backport patch for ipath needs fix

2007-08-16 Thread Ralph Campbell
While testing the current OFED_1_2_c (1.2.5) install, we
found a problem with one of the backport patches which
causes QP and CQ creation to fail in user verbs.
This patch to the patch fixes the problem and the updated
patch is attached.

The file is the same in all these locations:

2.6.16_sles10/ipath-02-dont-leak-info-to-userspace.patch
2.6.16_sles10_sp1/ipath-02-dont-leak-info-to-userspace.patch
2.6.17/ipath-02-dont-leak-info-to-userspace.patch
2.6.5_sles9_sp3/ipath-02-dont-leak-info-to-userspace.patch
2.6.9_U2/ipath-02-dont-leak-info-to-userspace.patch
2.6.9_U3/ipath-02-dont-leak-info-to-userspace.patch
2.6.9_U4/ipath-02-dont-leak-info-to-userspace.patch
2.6.9_U5/ipath-02-dont-leak-info-to-userspace.patch

Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>

diff --git 
a/kernel_patches/backport/2.6.16_sles10/ipath-02-dont-leak-info-to-userspace.patch
 
b/kernel_patches/backport/2.6.16_sles10/ipath-02-dont-leak-info-to-userspace.patch
index 7ad41de..2c5f8e7 100644
--- 
a/kernel_patches/backport/2.6.16_sles10/ipath-02-dont-leak-info-to-userspace.patch
+++ 
b/kernel_patches/backport/2.6.16_sles10/ipath-02-dont-leak-info-to-userspace.patch
@@ -26,7 +26,7 @@ diff -r 8c4252d8d602 drivers/infiniband/hw/ipath/ipath_mmap.c
 +  /*
 +   * Convert the vmalloc address into a struct page.
 +   */
-+  pageptr = (void *)(offset + (vma->vm_pgoff << PAGE_SHIFT));
++  pageptr = (void *)(offset + ip->obj);
 +  page = vmalloc_to_page(pageptr);
 +  if (!page)
 +  goto out;

BACKPORT - Don't leak kernel information to userspace

This is done using vmalloc_user in newer kernels.

diff -r 8c4252d8d602 drivers/infiniband/hw/ipath/ipath_mmap.c
--- a/drivers/infiniband/hw/ipath/ipath_mmap.c	Mon Feb 12 14:45:55 2007 -0800
+++ b/drivers/infiniband/hw/ipath/ipath_mmap.c	Mon Feb 12 14:46:59 2007 -0800
@@ -71,9 +71,40 @@ static void ipath_vma_close(struct vm_ar
 	kref_put(&ip->ref, ipath_release_mmap_info);
 }
 
+/*
+ * ipath_vma_nopage - handle a VMA page fault.
+ */
+static struct page *ipath_vma_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type)
+{
+	struct ipath_mmap_info *ip = vma->vm_private_data;
+	unsigned long offset = address - vma->vm_start;
+	struct page *page = NOPAGE_SIGBUS;
+	void *pageptr;
+
+	if (offset >= ip->size)
+		goto out; /* out of range */
+
+	/*
+	 * Convert the vmalloc address into a struct page.
+	 */
+	pageptr = (void *)(offset + ip->obj);
+	page = vmalloc_to_page(pageptr);
+	if (!page)
+		goto out;
+
+	/* Increment the reference count. */
+	get_page(page);
+	if (type)
+		*type = VM_FAULT_MINOR;
+out:
+	return page;
+}
+
 static struct vm_operations_struct ipath_vm_ops = {
 	.open = ipath_vma_open,
 	.close =ipath_vma_close,
+	.nopage =   ipath_vma_nopage,
 };
 
 /**
@@ -107,10 +138,11 @@ int ipath_mmap(struct ib_ucontext *conte
 		*pp = ip->next;
 		spin_unlock_irq(&dev->pending_lock);
 
-		ret = remap_vmalloc_range(vma, ip->obj, 0);
-		if (ret)
-			goto done;
+		memset(ip->obj, 0, ip->size);
+		ret = 0;
+
 		vma->vm_ops = &ipath_vm_ops;
+		vma->vm_flags |= VM_RESERVED | VM_DONTEXPAND;
 		vma->vm_private_data = ip;
 		ipath_vma_open(vma);
 		goto done;
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg