Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2018 20:15:47 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329137 - in head/sys/dev: mpr mps
Message-ID:  <201802112015.w1BKFlkh026585@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scottl
Date: Sun Feb 11 20:15:47 2018
New Revision: 329137
URL: https://svnweb.freebsd.org/changeset/base/329137

Log:
  Print out the shared memory queues during initialization
  
  Sponsored by:	Netflix

Modified:
  head/sys/dev/mpr/mpr.c
  head/sys/dev/mps/mps.c

Modified: head/sys/dev/mpr/mpr.c
==============================================================================
--- head/sys/dev/mpr/mpr.c	Sun Feb 11 20:06:36 2018	(r329136)
+++ head/sys/dev/mpr/mpr.c	Sun Feb 11 20:15:47 2018	(r329137)
@@ -1356,6 +1356,10 @@ mpr_alloc_hw_queues(struct mpr_softc *sc)
 	sc->free_busaddr = queues_busaddr;
 	sc->post_queue = (MPI2_REPLY_DESCRIPTORS_UNION *)(queues + fqsize);
 	sc->post_busaddr = queues_busaddr + fqsize;
+	mpr_dprint(sc, MPR_INIT, "free queue busaddr= %#016lx size= %d\n",
+	    sc->free_busaddr, fqsize);
+	mpr_dprint(sc, MPR_INIT, "reply queue busaddr= %#016lx size= %d\n",
+	    sc->post_busaddr, pqsize);
 
 	return (0);
 }
@@ -1398,6 +1402,8 @@ mpr_alloc_replies(struct mpr_softc *sc)
         bzero(sc->reply_frames, rsize);
         bus_dmamap_load(sc->reply_dmat, sc->reply_map, sc->reply_frames, rsize,
 	    mpr_memaddr_cb, &sc->reply_busaddr, 0);
+	mpr_dprint(sc, MPR_INIT, "reply frames busaddr= %#016lx size= %d\n",
+	    sc->reply_busaddr, rsize);
 
 	return (0);
 }
@@ -1432,6 +1438,8 @@ mpr_alloc_requests(struct mpr_softc *sc)
         bzero(sc->req_frames, rsize);
         bus_dmamap_load(sc->req_dmat, sc->req_map, sc->req_frames, rsize,
 	    mpr_memaddr_cb, &sc->req_busaddr, 0);
+	mpr_dprint(sc, MPR_INIT, "request frames busaddr= %#016lx size= %d\n",
+	    sc->req_busaddr, rsize);
 
 	rsize = sc->chain_frame_size * sc->num_chains;
         if (bus_dma_tag_create( sc->mpr_parent_dmat,    /* parent */
@@ -1456,6 +1464,8 @@ mpr_alloc_requests(struct mpr_softc *sc)
         bzero(sc->chain_frames, rsize);
         bus_dmamap_load(sc->chain_dmat, sc->chain_map, sc->chain_frames, rsize,
 	    mpr_memaddr_cb, &sc->chain_busaddr, 0);
+	mpr_dprint(sc, MPR_INIT, "chain frames busaddr= %#016lx size= %d\n",
+	    sc->chain_busaddr, rsize);
 
 	rsize = MPR_SENSE_LEN * sc->num_reqs;
 	if (bus_dma_tag_create( sc->mpr_parent_dmat,    /* parent */
@@ -1480,6 +1490,8 @@ mpr_alloc_requests(struct mpr_softc *sc)
         bzero(sc->sense_frames, rsize);
         bus_dmamap_load(sc->sense_dmat, sc->sense_map, sc->sense_frames, rsize,
 	    mpr_memaddr_cb, &sc->sense_busaddr, 0);
+	mpr_dprint(sc, MPR_INIT, "sense frames busaddr= %#016lx size= %d\n",
+	    sc->sense_busaddr, rsize);
 
 	sc->chains = malloc(sizeof(struct mpr_chain) * sc->num_chains, M_MPR,
 	    M_WAITOK | M_ZERO);

Modified: head/sys/dev/mps/mps.c
==============================================================================
--- head/sys/dev/mps/mps.c	Sun Feb 11 20:06:36 2018	(r329136)
+++ head/sys/dev/mps/mps.c	Sun Feb 11 20:15:47 2018	(r329137)
@@ -1313,6 +1313,10 @@ mps_alloc_hw_queues(struct mps_softc *sc)
 	sc->free_busaddr = queues_busaddr;
 	sc->post_queue = (MPI2_REPLY_DESCRIPTORS_UNION *)(queues + fqsize);
 	sc->post_busaddr = queues_busaddr + fqsize;
+	mps_dprint(sc, MPS_INIT, "free queue busaddr= %#016lx size= %d\n",
+	    sc->free_busaddr, fqsize);
+	mps_dprint(sc, MPS_INIT, "reply queue busaddr= %#016lx size= %d\n",
+	    sc->post_busaddr, pqsize);
 
 	return (0);
 }
@@ -1356,6 +1360,9 @@ mps_alloc_replies(struct mps_softc *sc)
         bus_dmamap_load(sc->reply_dmat, sc->reply_map, sc->reply_frames, rsize,
 	    mps_memaddr_cb, &sc->reply_busaddr, 0);
 
+	mps_dprint(sc, MPS_INIT, "reply frames busaddr= %#016lx size= %d\n",
+	    sc->reply_busaddr, rsize);
+
 	return (0);
 }
 
@@ -1389,6 +1396,8 @@ mps_alloc_requests(struct mps_softc *sc)
         bzero(sc->req_frames, rsize);
         bus_dmamap_load(sc->req_dmat, sc->req_map, sc->req_frames, rsize,
 	    mps_memaddr_cb, &sc->req_busaddr, 0);
+	mps_dprint(sc, MPS_INIT, "request frames busaddr= %#016lx size= %d\n",
+	    sc->req_busaddr, rsize);
 
 	rsize = sc->reqframesz * sc->num_chains;
         if (bus_dma_tag_create( sc->mps_parent_dmat,    /* parent */
@@ -1413,6 +1422,8 @@ mps_alloc_requests(struct mps_softc *sc)
         bzero(sc->chain_frames, rsize);
         bus_dmamap_load(sc->chain_dmat, sc->chain_map, sc->chain_frames, rsize,
 	    mps_memaddr_cb, &sc->chain_busaddr, 0);
+	mps_dprint(sc, MPS_INIT, "chain frames busaddr= %#016lx size= %d\n",
+	    sc->chain_busaddr, rsize);
 
 	rsize = MPS_SENSE_LEN * sc->num_reqs;
         if (bus_dma_tag_create( sc->mps_parent_dmat,    /* parent */
@@ -1437,6 +1448,8 @@ mps_alloc_requests(struct mps_softc *sc)
         bzero(sc->sense_frames, rsize);
         bus_dmamap_load(sc->sense_dmat, sc->sense_map, sc->sense_frames, rsize,
 	    mps_memaddr_cb, &sc->sense_busaddr, 0);
+	mps_dprint(sc, MPS_INIT, "sense frames busaddr= %#016lx size= %d\n",
+	    sc->sense_busaddr, rsize);
 
 	sc->chains = malloc(sizeof(struct mps_chain) * sc->num_chains, M_MPT2,
 	    M_WAITOK | M_ZERO);



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