Date: Sun, 16 Nov 2014 06:01:08 GMT From: John-Mark Gurney <jmg@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 1202878 for review Message-ID: <201411160601.sAG618Yp048898@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1202878?ac=10 Change 1202878 by jmg@jmg_carbon2 on 2014/11/16 06:00:34 reenable avoid allocation of memory for single mbufs... I wasn't taking into account the crd_skip... All of these need to take this into account, so pull it out of the set of if statements.. Sponsored by: FreeBSD Foundation Sponsored by: Netgate Affected files ... .. //depot/projects/opencrypto/sys/crypto/aesni/aesni.c#16 edit Differences ... ==== //depot/projects/opencrypto/sys/crypto/aesni/aesni.c#16 (text+ko) ==== @@ -382,7 +382,6 @@ uint8_t *addr; if (crp->crp_flags & CRYPTO_F_IMBUF) { - goto alloc; m = (struct mbuf *)crp->crp_buf; if (m->m_next != NULL) goto alloc; @@ -392,10 +391,11 @@ if (uio->uio_iovcnt != 1) goto alloc; iov = uio->uio_iov; - addr = (uint8_t *)iov->iov_base + enccrd->crd_skip; + addr = (uint8_t *)iov->iov_base; } else addr = (uint8_t *)crp->crp_buf; *allocated = 0; + addr += enccrd->crd_skip; return (addr); alloc:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411160601.sAG618Yp048898>