How to properly destroy an ODP queue of type ODP_QUEUE_TYPE_SCHED?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to properly destroy an ODP queue of type ODP_QUEUE_TYPE_SCHED?

807 Views
clemenseisserer
Contributor II

I am currently writing an ODP application which should terminate gracefully and therefore has to release all obtained ressources. So far I am struggling with releasing scheduled ODP queues (ODP_QUEUE_TYPE_SCHED).

Despite calling odp_queue_destroy, when the application calls odp_term_global(), I get the follwoing error:

> odp_queue.c:171:odp_queue_term_global():Not destroyed queue: 1-pktio_inq_def

When starting the application a second time it fails with the following message, most likely because some resscources requested have not been released during the first program execution:

> nadk_eth_setup_rx_vq 881-ERR-Error in setting the rx flow: ErrorCode = -5

My current findings are:

  • odp_queue_term_global() fails, because "1-pktio_inq_def" is not in state QUEUE_STATUS_FREE.
  • odp_queue_destroy() does not set status the queue's status to QUEUE_STATUS_FREE, instead it re-assigns the queues dequeue-function to queue_deq_multi_destroy() and sets its status to QUEUE_STATUS_DESTROYED.
  • queue_deq_multi_destroy() is said to be called at some schedule point, however in my application it is never called.
  • I don't see any code where the queue is released back to NADK. The whole NXP ODP code only contains a single call to nadk_put_frameq(), which is in some error-handling code.
  • Currently all ODP examples assume to be running forever and don't do proper cleanup at exit.

So currently my questions are:

  • How is it possible to destroy a ODP queue of the type ODP_QUEUE_TYPE_SCHED?
  • Is it possible with restool to reset the network hardware to the state it had after boot-up? This would avoid many reboot-cycles.

Thank you in advance, Clemens

Labels (1)
Tags (1)
0 Kudos
2 Replies

675 Views
Pavel
NXP Employee
NXP Employee

Is there problem if the odp_pktio application is used?

Is there problem for testing of this application?

The NXP infocenter contains only description for the odp_pktio application.

https://freescale.sdlproducts.com/LiveContent/web/ui.xql?action=html&resource=publist_home.html

Create service request for this problem:

https://community.freescale.com/docs/DOC-329745

You can also send this request to NXP Professional Services. Look at the following page:

http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

675 Views
clemenseisserer
Contributor II

Forgot to mention: When the application terminates at the first run, I get the following error message:

odp_init.c:144:odp_finish():odp_finish

vfio_disconnect_container 119-ERR-UNSET Container API Failed with ERRNO = 16

0 Kudos