All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] event/sw: fix events mis-identified as needing reorder
@ 2017-04-14 15:18 Bruce Richardson
  2017-04-14 15:28 ` Van Haaren, Harry
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2017-04-14 15:18 UTC (permalink / raw)
  To: harry.van.haaren; +Cc: dev, Bruce Richardson

When taking events from a port, we checked the history list to check if the
event needed to be put back in order i.e. originally came from a reordered
queue type. The check for reordering involved checking if the reorder
buffer entry pointer was null. However, after that pointer was used it was
never cleared to null again.

This caused problems when we had mixed reordered and atomic or parallel
events, as the events from the latter two queue types were misidentified as
needing reordering. This let in some cases to crashes, but mostly led to
dropping events, and then application lock-up.

Fixes: 617995dfc5b2 ("event/sw: add scheduling logic")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/event/sw/sw_evdev_scheduler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c
index e008b51..a333a6f 100644
--- a/drivers/event/sw/sw_evdev_scheduler.c
+++ b/drivers/event/sw/sw_evdev_scheduler.c
@@ -448,6 +448,7 @@ __pull_port_lb(struct sw_evdev *sw, uint32_t port_id, int allow_reorder)
 				struct reorder_buffer_entry *rob_entry =
 						hist_entry->rob_entry;
 
+				hist_entry->rob_entry = NULL;
 				/* Although fragmentation not currently
 				 * supported by eventdev API, we support it
 				 * here. Open: How do we alert the user that
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] event/sw: fix events mis-identified as needing reorder
  2017-04-14 15:18 [PATCH] event/sw: fix events mis-identified as needing reorder Bruce Richardson
@ 2017-04-14 15:28 ` Van Haaren, Harry
  2017-04-19 22:31   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Van Haaren, Harry @ 2017-04-14 15:28 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev, thomas.monjalon

> From: Richardson, Bruce
> Sent: Friday, April 14, 2017 4:18 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [PATCH] event/sw: fix events mis-identified as needing reorder
> 
> When taking events from a port, we checked the history list to check if the
> event needed to be put back in order i.e. originally came from a reordered
> queue type. The check for reordering involved checking if the reorder
> buffer entry pointer was null. However, after that pointer was used it was
> never cleared to null again.
> 
> This caused problems when we had mixed reordered and atomic or parallel
> events, as the events from the latter two queue types were misidentified as
> needing reordering. This let in some cases to crashes, but mostly led to
> dropping events, and then application lock-up.
> 
> Fixes: 617995dfc5b2 ("event/sw: add scheduling logic")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

+CC Thomas, would you pick this directly to master please, as no next-eventdev will be merged, thanks.

Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] event/sw: fix events mis-identified as needing reorder
  2017-04-14 15:28 ` Van Haaren, Harry
@ 2017-04-19 22:31   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-04-19 22:31 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev, Van Haaren, Harry

14/04/2017 17:28, Van Haaren, Harry:
> From: Richardson, Bruce
> Sent: Friday, April 14, 2017 4:18 PM
> > 
> > When taking events from a port, we checked the history list to check if
> > the
> > event needed to be put back in order i.e. originally came from a reordered
> > queue type. The check for reordering involved checking if the reorder
> > buffer entry pointer was null. However, after that pointer was used it was
> > never cleared to null again.
> > 
> > This caused problems when we had mixed reordered and atomic or parallel
> > events, as the events from the latter two queue types were misidentified
> > as
> > needing reordering. This let in some cases to crashes, but mostly led to
> > dropping events, and then application lock-up.
> > 
> > Fixes: 617995dfc5b2 ("event/sw: add scheduling logic")
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> +CC Thomas, would you pick this directly to master please, as no
> next-eventdev will be merged, thanks.
> 
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-19 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 15:18 [PATCH] event/sw: fix events mis-identified as needing reorder Bruce Richardson
2017-04-14 15:28 ` Van Haaren, Harry
2017-04-19 22:31   ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.