[PATCH] cxgb4: use the DMA state API instead of the pci equivalents

2010-06-02 Thread FUJITA Tomonori
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori --- dri

Re: [patch 2/2] infiniband/cxgb4: add null check

2010-06-02 Thread Roland Dreier
> I actually think that ep->com.cm_id is always valid when > connect_reply_upcall() is called. But I'd have to test it more. I'd > rather not add this change unless someone convinces me that there > actually is a path where the cm_id null... Then would it make sense to change the code

Re: [patch 2/2] infiniband/cxgb4: add null check

2010-06-02 Thread Steve Wise
Roland Dreier wrote: > if (status < 0) { > - ep->com.cm_id->rem_ref(ep->com.cm_id); > + if (ep->com.cm_id) > + ep->com.cm_id->rem_ref(ep->com.cm_id); Steve, does this make sense? I actually think that ep->com.cm_id is always valid when connect_reply_upca

Re: [patch 1/2] infiniband/cxgb4: remove unneeded assignment

2010-06-02 Thread Steve Wise
Roland Dreier wrote: Looks fine to me... in fact I don't see how this could have avoided a NULL deref here unless the compiler is already optimizing out this assignment, since two lines above is struct sk_buff *skb = NULL; before we do - struct cpl_act_establish *rpl = cplhdr(skb

[PATCH] IB/qib: define max IB ports instead of variable stack allocation

2010-06-02 Thread Ralph Campbell
Rather than use a variable size array allocation on the stack, define a constant for the maximum array size possible. Signed-off-by: Ralph Campbell --- drivers/infiniband/hw/qib/qib.h|3 +++ drivers/infiniband/hw/qib/qib_tx.c |2 +- 2 files changed, 4 insertions(+), 1 deletions(-)

Re: variable length array in qib

2010-06-02 Thread Ralph Campbell
Sure. I will work on a patch. On Wed, 2010-06-02 at 14:37 -0700, Roland Dreier wrote: > qib has the code > > void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask, > unsigned cnt) > { > struct qib_pportdata *ppd, *pppd[

Re: [patch 2/2] infiniband/cxgb4: add null check

2010-06-02 Thread Roland Dreier
> if (status < 0) { > -ep->com.cm_id->rem_ref(ep->com.cm_id); > +if (ep->com.cm_id) > +ep->com.cm_id->rem_ref(ep->com.cm_id); Steve, does this make sense? -- Roland Dreier || For corporate legal information go to: http://www.cisco.com/web/abou

Re: [patch 1/2] infiniband/cxgb4: remove unneeded assignment

2010-06-02 Thread Roland Dreier
Looks fine to me... in fact I don't see how this could have avoided a NULL deref here unless the compiler is already optimizing out this assignment, since two lines above is struct sk_buff *skb = NULL; before we do - struct cpl_act_establish *rpl = cplhdr(skb); Steve? -- Roland D

Re: [PATCH v2] libibverbs: ibv_fork_init() and libhugetlbfs

2010-06-02 Thread Roland Dreier
> without patch: > 1M memory region120usec > 16M memory region 1970usec > > with patch v2: > 1M memory region172usec > 16M memory region 2030usec So if I read this correctly this patch introduces almost a 50% overhead in the 1M case... and probably much worse (as a fraction) in

variable length array in qib

2010-06-02 Thread Roland Dreier
qib has the code void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask, unsigned cnt) { struct qib_pportdata *ppd, *pppd[dd->num_pports]; it would probably be safer to avoid the variable length array pppd[] on t

[PATCH] ib/mgmt: fix build under windows stack

2010-06-02 Thread Hefty, Sean
Fix warnings in windows build. These are typecasts in several places, with a couple additional changes needed to libibnetdisc. Windows uses ISO definitions instead of POSIX definitions, so calls like _read, _write, etc. are used on Windows instead of read, write. The result is that internal func

Re: [PATCH] opensm: Add a rate based mechanism for SMP transactions

2010-06-02 Thread Hal Rosenstock
On Wed, Jun 2, 2010 at 12:00 PM, Sasha Khapyorsky wrote: > On 11:36 Wed 02 Jun     , Hal Rosenstock wrote: >> >> I'm saying that I think the approach proposed in the original patch is >> better as it doesn't waste CPU although it's more complex. > > How do you see this, the code is almost equivale

Re: libibverbs and versions

2010-06-02 Thread Jason Gunthorpe
On Wed, Jun 02, 2010 at 12:40:04PM -0500, Steve Wise wrote: >>> I have this library I'm writing that uses libibverbs. Somehow it >>> seems to be using the 1.0 version instead of the newer version (I'm >>> guessing). When I call ibv_create_cq() I get a seg fault and the >>> stack looks like t

Re: libibverbs and versions

2010-06-02 Thread Steve Wise
Jason Gunthorpe wrote: On Wed, Jun 02, 2010 at 10:50:56AM -0500, Steve Wise wrote: I have this library I'm writing that uses libibverbs. Somehow it seems to be using the 1.0 version instead of the newer version (I'm guessing). When I call ibv_create_cq() I get a seg fault and the stack

Re: libibverbs and versions

2010-06-02 Thread Steve Wise
Roland Dreier wrote: > I have this library I'm writing that uses libibverbs. Somehow it > seems to be using the 1.0 version instead of the newer version (I'm > guessing). When I call ibv_create_cq() I get a seg fault and the > stack looks like this: > > #0 0x00319d80871d in pthread

Re: libibverbs and versions

2010-06-02 Thread Jason Gunthorpe
On Wed, Jun 02, 2010 at 10:50:56AM -0500, Steve Wise wrote: > I have this library I'm writing that uses libibverbs. Somehow it seems > to be using the 1.0 version instead of the newer version (I'm guessing). > When I call ibv_create_cq() I get a seg fault and the stack looks like > this: M

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-06-02 Thread David Miller
From: Ben Hutchings Date: Wed, 02 Jun 2010 17:42:29 +0100 > On Wed, 2010-05-26 at 02:16 -0700, David Miller wrote: >> From: Eli Cohen >> Date: Wed, 26 May 2010 12:08:52 +0300 >> >> > So if I understand you correctly, you think that I should not bother >> > to set a default value of 1. Each driv

Re: [PATCH] libibverbs: Force line-buffering in ibv_asyncwatch

2010-06-02 Thread Roland Dreier
> setlinebuf() is pretty intuitive to understand, compared to setvbuf(). I finally applied this; however in the end I decided to do setvbuf(stdout, NULL, _IOLBF, 0); instead of setlinebuf(), since in the past I've prefered more pedantic stuff (eg posix_memalign instead of memalign) to t

Re: libibverbs and versions

2010-06-02 Thread Roland Dreier
> I have this library I'm writing that uses libibverbs. Somehow it > seems to be using the 1.0 version instead of the newer version (I'm > guessing). When I call ibv_create_cq() I get a seg fault and the > stack looks like this: > > #0 0x00319d80871d in pthread_mutex_lock () from /li

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-06-02 Thread Ben Hutchings
On Wed, 2010-05-26 at 02:16 -0700, David Miller wrote: > From: Eli Cohen > Date: Wed, 26 May 2010 12:08:52 +0300 > > > So if I understand you correctly, you think that I should not bother > > to set a default value of 1. Each driver that cares about the value > > of this field, will set it howeve

Re: [PATCH] opensm: fixing compilation issues in some header files

2010-06-02 Thread Roland Dreier
> g++ can be used as a (better) C compiler. Shouldn't compilation with > g++ be supported ? g++ is not a C compiler. C++ is not just a superset of C The differences in the semantics of void* pointers are just one example; in addition C++ does not have designated initializers for structures, so

Re: [PATCH] opensm: Add a rate based mechanism for SMP transactions

2010-06-02 Thread Sasha Khapyorsky
On 11:36 Wed 02 Jun , Hal Rosenstock wrote: > > I'm saying that I think the approach proposed in the original patch is > better as it doesn't waste CPU although it's more complex. How do you see this, the code is almost equivalent in vl15_poller()? Sasha -- To unsubscribe from this list: sen

Re: [PATCH] opensm: fixing compilation issues in some header files

2010-06-02 Thread Sasha Khapyorsky
On 11:30 Wed 02 Jun , Hal Rosenstock wrote: > > g++ can be used as a (better) C compiler. Shouldn't compilation with > g++ be supported ? What would this buy for us? BTW why is g++ better as C compiler? Sasha -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the b

libibverbs and versions

2010-06-02 Thread Steve Wise
Hey Roland, I have this library I'm writing that uses libibverbs. Somehow it seems to be using the 1.0 version instead of the newer version (I'm guessing). When I call ibv_create_cq() I get a seg fault and the stack looks like this: #0 0x00319d80871d in pthread_mutex_lock () from /li

Re: [PATCH] opensm: Add a rate based mechanism for SMP transactions

2010-06-02 Thread Hal Rosenstock
On Wed, Jun 2, 2010 at 11:31 AM, Sasha Khapyorsky wrote: > On 06:58 Wed 02 Jun     , Hal Rosenstock wrote: >> >> I had started with an algorithm along these lines but evolved towards >> the proposed one based on CPU utilization. An algorithm along the >> lines of the above wastes CPU (when "idling

Re: [PATCH] opensm: fixing compilation issues in some header files

2010-06-02 Thread Hal Rosenstock
On Wed, Jun 2, 2010 at 11:18 AM, Sasha Khapyorsky wrote: > On 10:29 Wed 02 Jun     , Yevgeny Kliteynik wrote: >> >> Right now gcc allows you to do implicit casting in both ways, g++ doesn't. > > OpenSM is written in C, not C++. g++ can be used as a (better) C compiler. Shouldn't compilation with

Re: [PATCH] opensm: Add a rate based mechanism for SMP transactions

2010-06-02 Thread Sasha Khapyorsky
On 06:58 Wed 02 Jun , Hal Rosenstock wrote: > > I had started with an algorithm along these lines but evolved towards > the proposed one based on CPU utilization. An algorithm along the > lines of the above wastes CPU (when "idling" and other times) which > significantly impacts any other apps

Re: [PATCH] opensm: fixing compilation issues in some header files

2010-06-02 Thread Sasha Khapyorsky
On 10:29 Wed 02 Jun , Yevgeny Kliteynik wrote: > > Right now gcc allows you to do implicit casting in both ways, g++ doesn't. OpenSM is written in C, not C++. Sasha -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org

Re: [PATCH] infiniband-diags/ibnetdiscover.c: Cosmetic changes

2010-06-02 Thread Sasha Khapyorsky
On 09:05 Wed 02 Jun , Hal Rosenstock wrote: > > Eliminate unneeded comment > Also, cosmetic formatting change > > Signed-off-by: Hal Rosenstock Applied. Thanks. Sasha -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.

Re: [PATCH 2/2] infiniband-diags/libibnetdisc/chassis.c: In group_nodes, set fabric->chassis

2010-06-02 Thread Sasha Khapyorsky
On 09:04 Wed 02 Jun , Hal Rosenstock wrote: > > when grouping by SystemImageGUID > > Without doing this, find_chassisguid will always return without > finding the already discovered chassis so no grouping occurs > when it should > > Signed-off-by: Hal Rosenstock Both applied. Thanks. Sash

Re: [PATCH] opensm/osm_perfmgr.c: Remove unnecessary lock reference from Performance Manager object

2010-06-02 Thread Sasha Khapyorsky
On 18:37 Tue 01 Jun , Ira Weiny wrote: > > From: Ira Weiny > Date: Mon, 22 Dec 2008 11:03:59 -0800 > Subject: [PATCH] opensm/osm_perfmgr.c: Remove unnecessary lock reference from > Performance Manager object > > > Signed-off-by: Ira Weiny Applied. Thanks. Sasha -- To unsubscribe from th

[PATCH 2/2] infiniband-diags/libibnetdisc/chassis.c: In group_nodes, set fabric->chassis

2010-06-02 Thread Hal Rosenstock
when grouping by SystemImageGUID Without doing this, find_chassisguid will always return without finding the already discovered chassis so no grouping occurs when it should Signed-off-by: Hal Rosenstock --- infiniband-diags/libibnetdisc/src/chassis.c |4 1 files changed, 4 insertions(

[PATCH] infiniband-diags/ibnetdiscover.c: Cosmetic changes

2010-06-02 Thread Hal Rosenstock
Eliminate unneeded comment Also, cosmetic formatting change Signed-off-by: Hal Rosenstock --- infiniband-diags/src/ibnetdiscover.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c index 8f08f

[PATCH 1/2] infiniband-diags/libibnetdisc/chassis.c: In group_nodes, pass on all nodes

2010-06-02 Thread Hal Rosenstock
rather than just switches for common SystemImageGUID Now consistent with original grouping.c from which this was ported Signed-off-by: Hal Rosenstock --- infiniband-diags/libibnetdisc/src/chassis.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/infiniband-diags/libibn

[PATCH] opensm: MFT distribution improvement

2010-06-02 Thread Alex Netes
The patch reduces the number of MFT set MADs beeing send, by sending only blocks that have been changed since the last time same block was issued. Signed-off-by: Alex Netes --- opensm/include/opensm/osm_mcast_tbl.h | 49 ++- opensm/opensm/osm_dump.c |2 +- opensm/o

Re: [PATCH] opensm: Add a rate based mechanism for SMP transactions

2010-06-02 Thread Hal Rosenstock
Hi Sasha, On Tue, Jun 1, 2010 at 11:32 AM, Sasha Khapyorsky wrote: > Hi Hal, > > On 10:11 Wed 16 Dec     , Hal Rosenstock wrote: >> >> In order to better handle non responsive SMAs (when link is physically up >> but the SMA does not respond), a rate based mechanism for SMPs is added >> to better

Re: [PATCH] opensm: fixing compilation issues in some header files

2010-06-02 Thread Yevgeny Kliteynik
On 02-Jun-10 4:03 AM, Sasha Khapyorsky wrote: On 00:18 Wed 02 Jun , Yevgeny Kliteynik wrote: AFAIR (anytype *) to (void *) casting is not needed (doing implicitly) in C and this is already part of some basic standards. True, but the problem is not (anytype *) to (void *) casting. It's the