On Fri, 2009-10-09 at 22:53 +0200, Or Gerlitz wrote:
> David J. Wilder <[email protected]> wrote:
> > I added an option to rping to specify a source address and supply it to
>
> patch?
>
> > rdma_resolve_addr(), but now it is failing rdma_resolve_route().
> > $ ./rping -d -c -v -a fe80::202:c903:1:1925 -i fe80::202:c903:1:28ed
> > cma_event type RDMA_CM_EVENT_ADDR_RESOLVED cma_id 0x100213d0 (parent)
> > cma_event type RDMA_CM_EVENT_ROUTE_ERROR cma_id 0x100213d0 (parent)
> > cma event RDMA_CM_EVENT_ROUTE_ERROR, error -22
>
> what does the neighbour info (ip neigh show | grep 1925) shows after
> running rping?
If I run rping without my rping change to add the source address to
rdma_resolve_address(), ip neigh show gives:
fe80::202:c903:1:1925 dev eth1 FAILED
Notice that interface is incorrect, it should be ib0. tcpdump showed the
neighbor-discovery sent out the eth0 interface.
Running with my rping change to specify the local-link address of my ib0
interface "ip neigh show" never shows any entry for
fe80::202:c903:1:1925
> can you do ipoib ping and ping6 to the fe80::202:c903:1:1925 host?
>
> Or.
Yes ping6 will work but I must specify the interface to use:
ping6 fe80::202:c903:1:1925%ib0
Here is the patch to rping to allow the source address to be specified.
I am not sure this is the correct approach to fix this.
--- rping.c.orig 2009-10-08 15:22:29.000000000 -0500
+++ rping.c 2009-10-08 15:29:59.000000000 -0500
@@ -144,6 +144,7 @@ struct rping_cb {
sem_t sem;
struct sockaddr_storage sin;
+ struct sockaddr_storage src;
uint16_t port; /* dst port in NBO */
int verbose; /* verbose logging */
int count; /* ping count */
@@ -1003,7 +1004,7 @@ static int rping_bind_client(struct rpin
DEBUG_LOG("rping_bind_client: about to call rdma_resolve_addr\n");
- ret = rdma_resolve_addr(cb->cm_id, NULL, (struct sockaddr *) &cb->sin,
2000);
+ ret = rdma_resolve_addr(cb->cm_id, &cb->src, (struct sockaddr *)
&cb->sin, 2000);
if (ret) {
fprintf(stderr, "rdma_resolve_addr error %d\n", ret);
return ret;
@@ -1131,11 +1132,14 @@ int main(int argc, char *argv[])
sem_init(&cb->sem, 0, 0);
opterr = 0;
- while ((op=getopt(argc, argv, "a:Pp:C:S:t:scvVd")) != -1) {
+ while ((op=getopt(argc, argv, "a:i:Pp:C:S:t:scvVd")) != -1) {
switch (op) {
case 'a':
ret = get_addr(optarg, (struct sockaddr *) &cb->sin);
break;
+ case 'i':
+ ret = get_addr(optarg, (struct sockaddr *) &cb->src);
+ break;
case 'P':
persistent_server = 1;
break;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html