From owner-svn-src-user@FreeBSD.ORG Wed Apr 18 18:59:28 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92CCD106566B; Wed, 18 Apr 2012 18:59:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E86D8FC15; Wed, 18 Apr 2012 18:59:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3IIxSXl046222; Wed, 18 Apr 2012 18:59:28 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3IIxSAB046219; Wed, 18 Apr 2012 18:59:28 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201204181859.q3IIxSAB046219@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 18 Apr 2012 18:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234434 - user/np/toe_iwarp/sys/contrib/rdma X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2012 18:59:28 -0000 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;