* [dpdk-dev] [PATCH] vhost: reset queue state in destroy_device
@ 2016-07-01 16:31 Rich Lane
2016-07-04 2:24 ` Yuanhan Liu
0 siblings, 1 reply; 3+ messages in thread
From: Rich Lane @ 2016-07-01 16:31 UTC (permalink / raw)
To: dev; +Cc: Tetsuya Mukawa, Yuanhan Liu
Fixes a bug where rte_eth_vhost_get_queue_event would not return enabled queues
after a guest application restart.
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
---
drivers/net/vhost/rte_eth_vhost.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index c5bbb87..33e9728 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -303,6 +303,7 @@ destroy_device(int vid)
struct internal_list *list;
char ifname[PATH_MAX];
unsigned i;
+ struct rte_vhost_vring_state *state;
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
@@ -345,6 +346,15 @@ destroy_device(int vid)
vq->vid = -1;
}
+ state = vring_states[eth_dev->data->port_id];
+ rte_spinlock_lock(&state->lock);
+ for (i = 0; i <= state->max_vring; i++) {
+ state->cur[i] = false;
+ state->seen[i] = false;
+ }
+ state->max_vring = 0;
+ rte_spinlock_unlock(&state->lock);
+
RTE_LOG(INFO, PMD, "Connection closed\n");
_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: reset queue state in destroy_device
2016-07-01 16:31 [dpdk-dev] [PATCH] vhost: reset queue state in destroy_device Rich Lane
@ 2016-07-04 2:24 ` Yuanhan Liu
2016-07-11 2:06 ` Yuanhan Liu
0 siblings, 1 reply; 3+ messages in thread
From: Yuanhan Liu @ 2016-07-04 2:24 UTC (permalink / raw)
To: Rich Lane; +Cc: dev, Tetsuya Mukawa
On Fri, Jul 01, 2016 at 09:31:12AM -0700, Rich Lane wrote:
> Fixes a bug where rte_eth_vhost_get_queue_event would not return enabled queues
> after a guest application restart.
>
> Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
> Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Just some minor comments about the title (nothing big deal; it's just
some DPDK preferences):
- a bug fix patch need be titled as "fix ..."
- it's better to hide specific function in the title. If you run
"scripts/check-git-log.sh", you will find a warning.
- the prefix should be "net/vhost".
So, I'd like to reword the title a bit, to something like:
"net/vhost: fix queue state not reset on destroy"
If have no objection, I could fix it while apply.
--yliu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: reset queue state in destroy_device
2016-07-04 2:24 ` Yuanhan Liu
@ 2016-07-11 2:06 ` Yuanhan Liu
0 siblings, 0 replies; 3+ messages in thread
From: Yuanhan Liu @ 2016-07-11 2:06 UTC (permalink / raw)
To: Rich Lane; +Cc: dev, Tetsuya Mukawa
On Mon, Jul 04, 2016 at 10:24:41AM +0800, Yuanhan Liu wrote:
> On Fri, Jul 01, 2016 at 09:31:12AM -0700, Rich Lane wrote:
> > Fixes a bug where rte_eth_vhost_get_queue_event would not return enabled queues
> > after a guest application restart.
> >
> > Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
> > Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
>
> Just some minor comments about the title (nothing big deal; it's just
> some DPDK preferences):
>
> - a bug fix patch need be titled as "fix ..."
>
> - it's better to hide specific function in the title. If you run
> "scripts/check-git-log.sh", you will find a warning.
>
> - the prefix should be "net/vhost".
>
> So, I'd like to reword the title a bit, to something like:
>
> "net/vhost: fix queue state not reset on destroy"
>
> If have no objection, I could fix it while apply.
Applied to dpdk-next-virtio, with above minor fixes included.
Thanks.
--yliu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-11 2:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01 16:31 [dpdk-dev] [PATCH] vhost: reset queue state in destroy_device Rich Lane
2016-07-04 2:24 ` Yuanhan Liu
2016-07-11 2:06 ` Yuanhan Liu
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).