From owner-svn-src-all@freebsd.org Mon Oct 21 20:36:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E581161C8D; Mon, 21 Oct 2019 20:36:46 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46xpMf00BSz3Msk; Mon, 21 Oct 2019 20:36:45 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x9LKaZH0080998 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 21 Oct 2019 13:36:36 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x9LKaZdN080997; Mon, 21 Oct 2019 13:36:35 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 21 Oct 2019 13:36:35 -0700 From: Gleb Smirnoff To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r353848 - head/sys/dev/jme Message-ID: <20191021203635.GF4086@FreeBSD.org> References: <201910211811.x9LIBhea069573@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 46xpMf00BSz3Msk X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.52 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.52)[-0.518,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2019 20:36:46 -0000 Sergey, On Mon, Oct 21, 2019 at 11:30:46PM +0300, Sergey Kandaurov wrote: S> > struct ifnet *ifp; S> > - struct ifmultiaddr *ifma; S> > - uint32_t crc; S> > uint32_t mchash[2]; S> > uint32_t rxcfg; S> > S> > @@ -3276,21 +3290,7 @@ jme_set_filter(struct jme_softc *sc) S> > */ S> > rxcfg |= RXMAC_MULTICAST; S> > bzero(mchash, sizeof(mchash)); S> > - S> > - if_maddr_rlock(ifp); S> > - CK_STAILQ_FOREACH(ifma, &sc->jme_ifp->if_multiaddrs, ifma_link) { S> > - if (ifma->ifma_addr->sa_family != AF_LINK) S> > - continue; S> > - crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) S> > - ifma->ifma_addr), ETHER_ADDR_LEN); S> > - S> > - /* Just want the 6 least significant bits. */ S> > - crc &= 0x3f; S> > - S> > - /* Set the corresponding bit in the hash table. */ S> > - mchash[crc >> 5] |= 1 << (crc & 0x1f); S> > - } S> > - if_maddr_runlock(ifp); S> > + if_foreach_llmaddr(ifp, jme_hash_maddr, &mchash); S> > S> S> Should not be there just “mchash”? S> You seems to be passing (uint32_t **), S> also in tsec. mchash and &mchash are the same here. -- Gleb Smirnoff