Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2019 13:36:35 -0700
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        Sergey Kandaurov <pluknet@gmail.com>
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>
In-Reply-To: <CAE-mSOLZzZE3Hhxg1_LJjntB=0yROULQ5%2BEFeQ5KxLEYpmgPVQ@mail.gmail.com>
References:  <201910211811.x9LIBhea069573@repo.freebsd.org> <CAE-mSOLZzZE3Hhxg1_LJjntB=0yROULQ5%2BEFeQ5KxLEYpmgPVQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191021203635.GF4086>