Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-07 Thread Dotan Barak

Bub Thomas wrote:

Dotan,
the ibv_rc_pingpong example works for me so I can exclude the
architecture.
I never got the libibcm example compiled.
Which is your example and which architecture x86 vs. x86_64 did you
compile it for?
Can you share your libibcm the example code? (if it is not the standard
that I can't get compiled)
Thomas
  
I started to modify the qp_test (a test that can be found in 
https://openib.org/svn/trunk/contrib/mellanox/ibtp/gen2/userspace/useraccess/qp_test/)

here is the main file that deals with the libibcm.

I'm sorry, but if you'll add this file to the qp_test it won't compile 
(because of some more changed in the code).
When I'll finish to clean the code i will commit the full version (with 
the libibcm support) to the openib svn.


I hope that this code will help you ...
Dotan
/*
 * Copyright (c) 2005 Mellanox Technologies. 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.
 *
 * $Id: connect_qp.c 136 2005-09-21 15:07:17Z dotanb $
 *
 */

#include infiniband/verbs.h
#include infiniband/cm.h
#include vl.h
#include types.h
#include connect_qp.h

extern struct config_t config;

/*
* Function: fill_av_props
*/
void fill_av_props(
IN  const struct test_config_t 
*test_config_p,
IN  uint8_t port,
IN  uint16_t dlid,
IN  union ibv_gid dest_gid,
IN  uint8_t src_path_bits,
INOUT   struct thread_resources_t *thread_rsc_p,
OUT struct ibv_ah_attr *ah_attr_p)
{
memset(ah_attr_p, 0, sizeof(struct ibv_ah_attr));

ah_attr_p-port_num = port;
ah_attr_p-dlid = dlid;
ah_attr_p-static_rate = DEF_STATIC_RATE;
ah_attr_p-src_path_bits = src_path_bits;
/* do casting to prevent compiler warning */
ah_attr_p-sl = (uint8_t)((VL_MASK_IS_SET(test_config_p-test_flags, 
IS_SUPPORTED_RAND_SL)) ? 
  
VL_random(thread_rsc_p-rand, 15) : DEF_SL);

if ((VL_MASK_IS_SET(test_config_p-test_flags, IS_SUPPORTED_GRH)) || 
(VL_MASK_IS_SET(test_config_p-test_flags, IS_SUPPORTED_MULTICAST))) {
ah_attr_p-is_global = 1;

/* fill the GRH */
ah_attr_p-grh.dgid = dest_gid;
ah_attr_p-grh.flow_label = DEF_FLOW_LABEL;
ah_attr_p-grh.sgid_index = DEF_SGID_IDX;
ah_attr_p-grh.hop_limit = DEF_HOP_LIMIT;
ah_attr_p-grh.traffic_class = DEF_TRAFFIC_CLASS;
}
}

void fill_sa_path_rec(
IN  const struct test_config_t 
*test_config_p,
IN  uint16_t dlid,
IN  uint16_t slid,
IN  uint16_t pkey,
IN  union ibv_gid dest_gid,
IN  union ibv_gid src_gid,
INOUT   struct thread_resources_t *thread_rsc_p,
OUT struct ibv_sa_path_rec 
*sa_path_rec_p)
{
/*
union ibv_gid *src = (union ibv_gid *)sa_path_rec_p.sgid;
union ibv_gid *dest = (union ibv_gid *)sa_path_rec_p.dgid;
*/

memset(sa_path_rec_p, 0, sizeof(struct ibv_sa_path_rec));

sa_path_rec_p-dgid 

Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-07 Thread Bub Thomas

Sean,
Finally I could compile the cmpost example.
The solution was:
1.) Use the OFED-1.1-rc3 instead of OFED-1.0.1 This removed some missing
DEFINES. As an End-User ;-) I'm not following the SVN tree but
installing releases.
2.) Add #include infiniband/sa.h to cmpost.c.

Now I can compile and use the example at least on one machine.
The issues with client and server on one machine, that I reported
yesterday, are not visible as well.
So I'm able now to debug my connection establishment and the initial
data exchange.
Next week I can debug cmpost on two different machines, my second
machine has been stolen by a developer colleague till mid of next week.
;-)

I would suggest that the cmpost.c example, including the missing include
from above, might be integrated into the next OFED-release?
Thanks
Thomas


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sean Hefty
Sent: Tuesday, September 05, 2006 8:15 PM
To: Bub Thomas
Cc: openib-general@openib.org
Subject: Re: [openib-general] libibcm can't connect/talk to libicm on
other machine.

Bub Thomas wrote:
 Dotan,
 the ibv_rc_pingpong example works for me so I can exclude the
 architecture.
 I never got the libibcm example compiled.
 Which is your example and which architecture x86 vs. x86_64 did you
 compile it for?
 Can you share your libibcm the example code? (if it is not the
standard
 that I can't get compiled)
 Thomas

Did you try applying the following patch?

http://openib.org/pipermail/openib-general/2006-August/025005.html

I should also mention that I have a version of cmpost that works with
the new 
libibsa, but I am waiting for the review of the kernel sa_query changes
before 
committing.

- Sean

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general



___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-05 Thread Dotan Barak
Hi bub.


Bub Thomas wrote:

 I’m still in the process of migrating my gen1 application to gen2.

 Actually I CAN connect a gen2 application to a gen2 listener 
 application on the same machine but NOT to a gen 2 listener on another 
 machine.

 Any hints where to look at?

 Is there anything in the architecture that might prevent a libibcm 
 connection to another machine?

 I’m using an old Voltaire switch to connect the machines. Can this be 
 the reason?

 The switch didn’t cause problems using gen1 clients.

What is the problem that you see?
there are some examples that comes with the libibcm that can show you 
how to use the library.

there can be several reasons for your problem:
1) side A send a req when side B is not ready and there is a timeout failure
2) only in side A the ib_ucm kernel module enabled
3) SM is not working (well)
4) host A cannot be reached to host B using IB
5) endianess issues?

i tried to use the libibcm and i don't have any problem (but i don't 
have any Voltaire switch, so i can't check your scenario).

Dotan

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-05 Thread Hal Rosenstock
Hi Bub,

On Tue, 2006-09-05 at 10:22, Bub Thomas wrote:
 I’m still in the process of migrating my gen1 application to gen2.
 
 Actually I CAN connect a gen2 application to a gen2 listener
 application on the same machine but NOT to a gen 2 listener on another
 machine.
 
 Any hints where to look at?

What are you using for SM ? OpenSM or vendor SM ?

 Is there anything in the architecture that might prevent a libibcm
 connection to another machine?

I don't think this is an architectural issue.

-- Hal

 I’m using an old Voltaire switch to connect the machines. Can this be
 the reason?
 
 The switch didn’t cause problems using gen1 clients.
 
 Thanks
 
 Thomas Bub
 
 
 
 __
 
 ___
 openib-general mailing list
 openib-general@openib.org
 http://openib.org/mailman/listinfo/openib-general
 
 To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-05 Thread Bub Thomas
Dotan,
the ibv_rc_pingpong example works for me so I can exclude the
architecture.
I never got the libibcm example compiled.
Which is your example and which architecture x86 vs. x86_64 did you
compile it for?
Can you share your libibcm the example code? (if it is not the standard
that I can't get compiled)
Thomas

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dotan Barak
Sent: Tuesday, September 05, 2006 5:12 PM
To: Bub Thomas
Cc: openib-general@openib.org
Subject: Re: [openib-general] libibcm can't connect/talk to libicm on
other machine.

Hi bub.


Bub Thomas wrote:

 I'm still in the process of migrating my gen1 application to gen2.

 Actually I CAN connect a gen2 application to a gen2 listener 
 application on the same machine but NOT to a gen 2 listener on another

 machine.

 Any hints where to look at?

 Is there anything in the architecture that might prevent a libibcm 
 connection to another machine?

 I'm using an old Voltaire switch to connect the machines. Can this be 
 the reason?

 The switch didn't cause problems using gen1 clients.

What is the problem that you see?
there are some examples that comes with the libibcm that can show you 
how to use the library.

there can be several reasons for your problem:
1) side A send a req when side B is not ready and there is a timeout
failure
2) only in side A the ib_ucm kernel module enabled
3) SM is not working (well)
4) host A cannot be reached to host B using IB
5) endianess issues?

i tried to use the libibcm and i don't have any problem (but i don't 
have any Voltaire switch, so i can't check your scenario).

Dotan

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general



___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-05 Thread Sean Hefty
Bub Thomas wrote:
 Dotan,
 the ibv_rc_pingpong example works for me so I can exclude the
 architecture.
 I never got the libibcm example compiled.
 Which is your example and which architecture x86 vs. x86_64 did you
 compile it for?
 Can you share your libibcm the example code? (if it is not the standard
 that I can't get compiled)
 Thomas

Did you try applying the following patch?

http://openib.org/pipermail/openib-general/2006-August/025005.html

I should also mention that I have a version of cmpost that works with the new 
libibsa, but I am waiting for the review of the kernel sa_query changes before 
committing.

- Sean

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



Re: [openib-general] libibcm can't connect/talk to libicm on other machine.

2006-09-05 Thread JWM
Title: libibcm can't connect/talk to libicm on other machine.



 I know this sounds simple, but 
have you checked the routing tables?
 JW

  - Original Message - 
  From: 
  Bub 
  Thomas 
  To: openib-general@openib.org 
  Sent: Tuesday, September 05, 2006 9:22 
  AM
  Subject: [openib-general] libibcm can't 
  connect/talk to libicm on other machine.
  
  I’m 
  still in the process of migrating my gen1 application to 
  gen2.
  Actually I CAN connect a gen2 application to a gen2 listener application on the same machine but NOT to a gen 2 listener 
  on another machine.
  Any hints where to look 
  at?
  Is 
  there 
  anything in the architecture 
  that might prevent a libibcm connection to another machine?
  I’m using an old Voltaire switch to 
  connect the machines. Can this be the 
  reason?
  The switch 
  didn’t cause problems using 
  gen1 clients.
  Thanks
  Thomas 
  Bub
  
  

  ___openib-general 
  mailing 
  listopenib-general@openib.orghttp://openib.org/mailman/listinfo/openib-generalTo 
  unsubscribe, please visit 
http://openib.org/mailman/listinfo/openib-general
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general