From owner-svn-soc-all@freebsd.org Wed Aug 1 20:34:28 2018 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB0611068947 for ; Wed, 1 Aug 2018 20:34:28 +0000 (UTC) (envelope-from sduo@FreeBSD.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF5C869CD for ; Wed, 1 Aug 2018 20:34:28 +0000 (UTC) (envelope-from sduo@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 93A801F827 for ; Wed, 1 Aug 2018 20:34:27 +0000 (UTC) (envelope-from sduo@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id w71KYRwd012024 for ; Wed, 1 Aug 2018 20:34:27 GMT (envelope-from sduo@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id w71KYPap012021 for svn-soc-all@FreeBSD.org; Wed, 1 Aug 2018 20:34:25 GMT (envelope-from sduo@FreeBSD.org) Date: Wed, 1 Aug 2018 20:34:25 GMT Message-Id: <201808012034.w71KYPap012021@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to sduo@FreeBSD.org using -f From: sduo@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r337274 - in soc2018/sduo/head/sys: dev/ixl net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 20:34:28 -0000 Author: sduo Date: Wed Aug 1 20:34:24 2018 New Revision: 337274 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=337274 Log: Fixed a bunch of calls to NETMAP_BUF_SIZE(). Modified: soc2018/sduo/head/sys/dev/ixl/ixl_txrx.c soc2018/sduo/head/sys/net/iflib.c Modified: soc2018/sduo/head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- soc2018/sduo/head/sys/dev/ixl/ixl_txrx.c Wed Aug 1 20:28:22 2018 (r337273) +++ soc2018/sduo/head/sys/dev/ixl/ixl_txrx.c Wed Aug 1 20:34:24 2018 (r337274) @@ -619,7 +619,7 @@ struct netmap_kring *kring = na->tx_rings[que->me]; int si = netmap_idx_n2k(kring, i); netmap_load_map(na, buf->tag, buf->map, NMB(kring, slot + si), - NETMAP_BUF_SIZE(kring, 0)); + NETMAP_BUF_SIZE(na, 0)); } #endif /* DEV_NETMAP */ /* Clear the EOP index */ @@ -1426,7 +1426,7 @@ addr = PNMB(kring, slot + sj, &paddr); netmap_load_map(na, rxr->dma.tag, buf->pmap, addr, - NETMAP_BUF_SIZE(kring, 0)); + NETMAP_BUF_SIZE(na, 0)); /* Update descriptor and the cached value */ rxr->base[j].read.pkt_addr = htole64(paddr); rxr->base[j].read.hdr_addr = 0; Modified: soc2018/sduo/head/sys/net/iflib.c ============================================================================== --- soc2018/sduo/head/sys/net/iflib.c Wed Aug 1 20:28:22 2018 (r337273) +++ soc2018/sduo/head/sys/net/iflib.c Wed Aug 1 20:34:24 2018 (r337274) @@ -859,7 +859,7 @@ fl->ifl_vm_addrs[tmp_pidx] = addr; if (__predict_false(init) && map) { netmap_load_map(na, fl->ifl_ifdi->idi_tag, map[nic_i], addr, - NETMAP_BUF_SIZE(kring, 0)); + NETMAP_BUF_SIZE(na, 0)); } else if (map && (slot->flags & NS_BUF_CHANGED)) { /* buffer has changed, reload map */ netmap_reload_map(na, fl->ifl_ifdi->idi_tag, map[nic_i], addr); @@ -1204,7 +1204,7 @@ */ struct netmap_kring *kring = na->tx_rings[txq->ift_id]; int si = netmap_idx_n2k(kring, i); - netmap_load_map(na, txq->ift_desc_tag, txq->ift_sds.ifsd_map[i], NMB(kring, slot + si), NETMAP_BUF_SIZE(kring, 0)); + netmap_load_map(na, txq->ift_desc_tag, txq->ift_sds.ifsd_map[i], NMB(kring, slot + si), NETMAP_BUF_SIZE(na, 0)); } }