DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: dev@dpdk.org
Cc: skhare@vmware.com,
	"Charles (Chas) Williams" <ciwillia@mail.eng.vyatta.net>,
	Chas Williams <chas3@att.com>
Subject: [dpdk-dev] [PATCH 1/2] net/vmxnet3: set the queue shared buffer at start
Date: Wed, 17 Jan 2018 10:04:56 -0500	[thread overview]
Message-ID: <20180117150457.17806-1-3chas3@gmail.com> (raw)

From: "Charles (Chas) Williams" <ciwillia@mail.eng.vyatta.net>

If a reconfiguration happens, queuedesc is reallocated.  Any queues that
are preserved point to the previous queuedesc since the queues are only
configured during queue setup.  Delay configuration of the shared queue
pointers until device start when queuedesc is no longer changing.

Fixes: 8618d19b52b1 ("net/vmxnet3: reallocate shared memzone on re-config")

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++
 drivers/net/vmxnet3/vmxnet3_rxtx.c   | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d3b704b..776a0da 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -644,6 +644,8 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 		Vmxnet3_TxQueueDesc *tqd = &hw->tqd_start[i];
 		vmxnet3_tx_queue_t *txq  = dev->data->tx_queues[i];
 
+		txq->shared = &hw->tqd_start[i];
+
 		tqd->ctrl.txNumDeferred  = 0;
 		tqd->ctrl.txThreshold    = 1;
 		tqd->conf.txRingBasePA   = txq->cmd_ring.basePA;
@@ -664,6 +666,8 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 		Vmxnet3_RxQueueDesc *rqd  = &hw->rqd_start[i];
 		vmxnet3_rx_queue_t *rxq   = dev->data->rx_queues[i];
 
+		rxq->shared = &hw->rqd_start[i];
+
 		rqd->conf.rxRingBasePA[0] = rxq->cmd_ring[0].basePA;
 		rqd->conf.rxRingBasePA[1] = rxq->cmd_ring[1].basePA;
 		rqd->conf.compRingBasePA  = rxq->comp_ring.basePA;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index f9416f3..64f24e6 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -908,7 +908,7 @@ vmxnet3_dev_tx_queue_setup(struct rte_eth_dev *dev,
 
 	txq->queue_id = queue_idx;
 	txq->port_id = dev->data->port_id;
-	txq->shared = &hw->tqd_start[queue_idx];
+	txq->shared = NULL; /* set in vmxnet3_setup_driver_shared() */
 	txq->hw = hw;
 	txq->qid = queue_idx;
 	txq->stopped = TRUE;
@@ -1011,7 +1011,7 @@ vmxnet3_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->mp = mp;
 	rxq->queue_id = queue_idx;
 	rxq->port_id = dev->data->port_id;
-	rxq->shared = &hw->rqd_start[queue_idx];
+	rxq->shared = NULL; /* set in vmxnet3_setup_driver_shared() */
 	rxq->hw = hw;
 	rxq->qid1 = queue_idx;
 	rxq->qid2 = queue_idx + hw->num_rx_queues;
-- 
2.9.5

             reply	other threads:[~2018-01-17 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 15:04 Chas Williams [this message]
2018-01-17 15:04 ` [dpdk-dev] [PATCH 2/2] net/vmxnet3: keep consistent link status Chas Williams
2018-03-12 17:45 ` [dpdk-dev] [PATCH 1/2] net/vmxnet3: set the queue shared buffer at start Shrikrishna Khare
2018-03-13 15:20   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180117150457.17806-1-3chas3@gmail.com \
    --to=3chas3@gmail.com \
    --cc=chas3@att.com \
    --cc=ciwillia@mail.eng.vyatta.net \
    --cc=dev@dpdk.org \
    --cc=skhare@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).