From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: yuanhan.liu@linux.intel.com, maxime.coquelin@redhat.com,
Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH 1/2] net/virtio: add data elements to turn on/off traffic flow
Date: Fri, 31 Mar 2017 19:40:18 +0800 [thread overview]
Message-ID: <1490960419-16779-2-git-send-email-zhiyong.yang@intel.com> (raw)
In-Reply-To: <1490960419-16779-1-git-send-email-zhiyong.yang@intel.com>
Add "rte_atomic32_t started" to turn on/off the RX/TX flow from
per port perspective.
Add rte_atomic32_t allow_queuing to control traffic flow from
per Queue perspective.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/virtio/virtio_pci.h | 1 +
drivers/net/virtio/virtio_rxtx.h | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 0362acd..952ad62 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -253,6 +253,7 @@ struct virtio_hw {
uint64_t req_guest_features;
uint64_t guest_features;
uint32_t max_queue_pairs;
+ rte_atomic32_t started;
uint16_t max_mtu;
uint16_t vtnet_hdr_size;
uint8_t vlan_strip;
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 28f82d6..03357ae 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -60,6 +60,9 @@ struct virtnet_rx {
struct virtnet_stats stats;
const struct rte_memzone *mz; /**< mem zone to populate RX ring. */
+
+ /* a flag indicates whether allow to receive pkts. */
+ rte_atomic32_t allow_queuing;
};
struct virtnet_tx {
@@ -75,6 +78,9 @@ struct virtnet_tx {
struct virtnet_stats stats;
const struct rte_memzone *mz; /**< mem zone to populate TX ring. */
+
+ /* a flag indicates whether allow to transmit pkts. */
+ rte_atomic32_t allow_queuing;
};
struct virtnet_ctl {
--
2.7.4
next prev parent reply other threads:[~2017-03-31 11:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 11:40 [dpdk-dev] [PATCH 0/2] net/virtio: support to turn on/off the " Zhiyong Yang
2017-03-31 11:40 ` Zhiyong Yang [this message]
2017-04-19 6:29 ` [dpdk-dev] [PATCH v2] net/virtio: support to turn on/off " Zhiyong Yang
2017-04-26 7:45 ` Maxime Coquelin
2017-04-26 7:56 ` Yuanhan Liu
2017-04-26 8:02 ` Maxime Coquelin
2017-03-31 11:40 ` [dpdk-dev] [PATCH 2/2] net/virtio: support to turn on/off the " Zhiyong Yang
2017-04-06 3:59 ` [dpdk-dev] [PATCH 0/2] " Yuanhan Liu
2017-04-17 8:50 ` Yang, Zhiyong
2017-04-19 2:03 ` Yuanhan Liu
2017-04-19 2:31 ` Yang, Zhiyong
2017-04-19 2:58 ` Yuanhan Liu
2017-04-19 5:27 ` Yang, Zhiyong
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=1490960419-16779-2-git-send-email-zhiyong.yang@intel.com \
--to=zhiyong.yang@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=yuanhan.liu@linux.intel.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).