From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by dpdk.org (Postfix) with ESMTP id 055636AB7 for ; Sat, 14 Jun 2014 03:09:04 +0200 (CEST) Received: by mail-pb0-f51.google.com with SMTP id rp16so2632806pbb.38 for ; Fri, 13 Jun 2014 18:09:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject :references:mime-version:content-type:content-disposition; bh=gZZSRzAzJjBMAuV1v5tWiRV4G09dPLaAhHoXrzsb00w=; b=k3Z35GkX7sun86MGpPHoBXEufMBVhEZcmAUzAwgsnznH8Iy2iax25C+y/rscjfd744 B70o52oEEtl6TaEyL5NdiNQUTars89nD+S3k4QH252wacIBAbIsbmJufdpkRgp+bF3ts xqoXKZCgDxREt1err137Yt9btNup7IOBuyRWMZ8YCOxD3Q0eUSV9IdtSV4JXB97u9DLx JNjpTngh25TgLmNk5kWKCliGC1Y2cS5z1l6NKQY4LVE6xHuKbdsNR76Ost3+xBxXtusD BtpetKEQDoVuytO/jnY1Aa9jJ9vMx06L2SULuHGRO4t1rwzokc4cB6w3g/CqSeijpJC8 UBtQ== X-Gm-Message-State: ALoCoQlQrl4V3GzUlsA5y6dsVcIaow9h7ukVE3+WB5TPzMcXOdSCoIEJGKC0lqNiMTMfgmbAftHG X-Received: by 10.66.66.133 with SMTP id f5mr5222065pat.81.1402708160249; Fri, 13 Jun 2014 18:09:20 -0700 (PDT) Received: from localhost (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id qf10sm5829014pbc.23.2014.06.13.18.09.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jun 2014 18:09:19 -0700 (PDT) Message-Id: <20140614010910.550847218@networkplumber.org> User-Agent: quilt/0.63-1 Date: Fri, 13 Jun 2014 18:06:23 -0700 From: Stephen Hemminger To: dev@dpdk.org References: <20140614010617.902738763@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=virtio-no-vqname.patch Subject: [dpdk-dev] [PATCH 6/8] virtio: remove unused virtqueue name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 01:09:05 -0000 vq_name is only used when setting up queue, and does not need to be saved. Signed-off-by: Stephen Hemminger --- a/lib/librte_pmd_virtio/virtio_ethdev.c 2014-06-13 18:00:41.944914744 -0700 +++ b/lib/librte_pmd_virtio/virtio_ethdev.c 2014-06-13 18:00:41.936914729 -0700 @@ -271,20 +271,17 @@ int virtio_dev_queue_setup(struct rte_et dev->data->port_id, queue_idx); vq = rte_zmalloc(vq_name, sizeof(struct virtqueue) + vq_size * sizeof(struct vq_desc_extra), CACHE_LINE_SIZE); - memcpy(vq->vq_name, vq_name, sizeof(vq->vq_name)); } else if (queue_type == VTNET_TQ) { rte_snprintf(vq_name, sizeof(vq_name), "port%d_tvq%d", dev->data->port_id, queue_idx); vq = rte_zmalloc(vq_name, sizeof(struct virtqueue) + vq_size * sizeof(struct vq_desc_extra), CACHE_LINE_SIZE); - memcpy(vq->vq_name, vq_name, sizeof(vq->vq_name)); } else if (queue_type == VTNET_CQ) { rte_snprintf(vq_name, sizeof(vq_name), "port%d_cvq", dev->data->port_id); vq = rte_zmalloc(vq_name, sizeof(struct virtqueue) + vq_size * sizeof(struct vq_desc_extra), CACHE_LINE_SIZE); - memcpy(vq->vq_name, vq_name, sizeof(vq->vq_name)); } if (vq == NULL) { PMD_INIT_LOG(ERR, "%s: Can not allocate virtqueue", __func__); --- a/lib/librte_pmd_virtio/virtio_rxtx.c 2014-06-13 18:00:41.944914744 -0700 +++ b/lib/librte_pmd_virtio/virtio_rxtx.c 2014-06-13 18:00:41.936914729 -0700 @@ -232,13 +232,13 @@ rte_rxmbuf_alloc(struct rte_mempool *mp) } static void -virtio_dev_vring_start(struct rte_eth_dev *dev, struct virtqueue *vq, int queue_type) +virtio_dev_vring_start(struct virtqueue *vq, int queue_type) { struct rte_mbuf *m; int i, nbufs, error, size = vq->vq_nentries; struct vring *vr = &vq->vq_ring; uint8_t *ring_mem = vq->vq_ring_virt_mem; - char vq_name[VIRTQUEUE_MAX_NAME_SZ]; + PMD_INIT_FUNC_TRACE(); /* @@ -263,10 +263,6 @@ virtio_dev_vring_start(struct rte_eth_de */ virtqueue_disable_intr(vq); - rte_snprintf(vq_name, sizeof(vq_name), "port_%d_rx_vq", - dev->data->port_id); - PMD_INIT_LOG(DEBUG, "vq name: %s", vq->vq_name); - /* Only rx virtqueue needs mbufs to be allocated at initialization */ if (queue_type == VTNET_RQ) { if (vq->mpool == NULL) @@ -320,7 +316,7 @@ virtio_dev_cq_start(struct rte_eth_dev * struct virtio_hw *hw = VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private); - virtio_dev_vring_start(dev, hw->cvq, VTNET_CQ); + virtio_dev_vring_start(hw->cvq, VTNET_CQ); VIRTQUEUE_DUMP((struct virtqueue *)hw->cvq); } @@ -340,13 +336,13 @@ virtio_dev_rxtx_start(struct rte_eth_dev /* Start rx vring. */ for (i = 0; i < dev->data->nb_rx_queues; i++) { - virtio_dev_vring_start(dev, dev->data->rx_queues[i], VTNET_RQ); + virtio_dev_vring_start(dev->data->rx_queues[i], VTNET_RQ); VIRTQUEUE_DUMP((struct virtqueue *)dev->data->rx_queues[i]); } /* Start tx vring. */ for (i = 0; i < dev->data->nb_tx_queues; i++) { - virtio_dev_vring_start(dev, dev->data->tx_queues[i], VTNET_TQ); + virtio_dev_vring_start(dev->data->tx_queues[i], VTNET_TQ); VIRTQUEUE_DUMP((struct virtqueue *)dev->data->tx_queues[i]); } } --- a/lib/librte_pmd_virtio/virtqueue.h 2014-06-13 18:00:41.944914744 -0700 +++ b/lib/librte_pmd_virtio/virtqueue.h 2014-06-13 18:00:41.940914736 -0700 @@ -122,7 +122,6 @@ struct virtio_pmd_ctrl { }; struct virtqueue { - char vq_name[VIRTQUEUE_MAX_NAME_SZ]; struct virtio_hw *hw; /**< virtio_hw structure pointer. */ const struct rte_memzone *mz; /**< mem zone to populate RX ring. */ const struct rte_memzone *virtio_net_hdr_mz; /**< memzone to populate hdr. */