Date: Wed, 18 Apr 2012 18:59:28 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r234434 - user/np/toe_iwarp/sys/contrib/rdma Message-ID: <201204181859.q3IIxSAB046219@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Wed Apr 18 18:59:27 2012 New Revision: 234434 URL: http://svn.freebsd.org/changeset/base/234434 Log: A couple of minor fixes to the old rdma module. Modified: user/np/toe_iwarp/sys/contrib/rdma/rdma_addr.c user/np/toe_iwarp/sys/contrib/rdma/rdma_cache.c Modified: user/np/toe_iwarp/sys/contrib/rdma/rdma_addr.c ============================================================================== --- user/np/toe_iwarp/sys/contrib/rdma/rdma_addr.c Wed Apr 18 18:58:18 2012 (r234433) +++ user/np/toe_iwarp/sys/contrib/rdma/rdma_addr.c Wed Apr 18 18:59:27 2012 (r234434) @@ -117,7 +117,8 @@ int rdma_copy_addr(struct rdma_dev_addr const unsigned char *dst_dev_addr) { dev_addr->dev_type = RDMA_NODE_RNIC; - memcpy(dev_addr->src_dev_addr, IF_LLADDR(dev), MAX_ADDR_LEN); + memset(dev_addr->src_dev_addr, 0, MAX_ADDR_LEN); + memcpy(dev_addr->src_dev_addr, IF_LLADDR(dev), dev->if_addrlen); memcpy(dev_addr->broadcast, dev->if_broadcastaddr, MAX_ADDR_LEN); if (dst_dev_addr) memcpy(dev_addr->dst_dev_addr, dst_dev_addr, MAX_ADDR_LEN); @@ -207,7 +208,7 @@ static int addr_resolve_remote(struct so goto put; } ret = arpresolve(iproute.ro_rt->rt_ifp, iproute.ro_rt, NULL, - rt_key(iproute.ro_rt), dmac, &lle); + (struct sockaddr *)dst_in, dmac, &lle); if (ret) { goto put; } Modified: user/np/toe_iwarp/sys/contrib/rdma/rdma_cache.c ============================================================================== --- user/np/toe_iwarp/sys/contrib/rdma/rdma_cache.c Wed Apr 18 18:58:18 2012 (r234433) +++ user/np/toe_iwarp/sys/contrib/rdma/rdma_cache.c Wed Apr 18 18:59:27 2012 (r234434) @@ -132,7 +132,7 @@ int ib_find_cached_gid(struct ib_device for (p = 0; p <= end_port(device) - start_port(device); ++p) { cache = device->cache.gid_cache[p]; for (i = 0; i < cache->table_len; ++i) { - if (!memcmp(gid, &cache->table[i], 6)) { /* XXX */ + if (!memcmp(gid, &cache->table[i], sizeof *gid)) { *port_num = p + start_port(device); if (index) *index = i;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204181859.q3IIxSAB046219>