This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via c2d1ed55e871d26cbebae1d0e9080edae9bafe38 (commit) from c2bd39436032f544f1a211425d39d7d68c47d193 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit c2d1ed55e871d26cbebae1d0e9080edae9bafe38 Author: Bill Fischofer bill.fischofer@linaro.org Date: Wed Aug 10 15:41:26 2016 -0500
linux-generic: tm: handle pktout queue check properly
Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2458 by only checking for a proper pktout_queue count if the egress_kind is ODP_TM_EGRESS_PKT_IO.
This check is also moved before locking and allocating a tm_system struct to avoid deadlocks and memory leaks that were another side-effect of this bug.
Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Tested-and-reviewed-by: Mike Holmes mike.holmes@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 37d3323..a5271ed 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -2818,6 +2818,13 @@ odp_tm_t odp_tm_create(const char *name, uint32_t max_tm_queues, max_sorted_lists; int rc;
+ /* If we are using pktio output (usual case) get the first associated + * pktout_queue for this pktio and fail if there isn't one. + */ + if (egress->egress_kind == ODP_TM_EGRESS_PKT_IO && + odp_pktout_queue(egress->pktio, &pktout, 1) != 1) + return ODP_TM_INVALID; + /* Allocate tm_system_t record. */ odp_ticketlock_lock(&tm_create_lock); tm_system = tm_system_alloc(); @@ -2834,9 +2841,6 @@ odp_tm_t odp_tm_create(const char *name, return ODP_TM_INVALID; }
- if (odp_pktout_queue(egress->pktio, &pktout, 1) != 1) - return ODP_TM_INVALID; - tm_system->pktout = pktout; tm_system->name_tbl_id = name_tbl_id; max_tm_queues = requirements->max_tm_queues;
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_traffic_mngr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive