https://bugs.linaro.org/show_bug.cgi?id=2301

            Bug ID: 2301
           Summary: Scheduler doesn't remove PKTIN after pktio_close()
           Product: OpenDataPlane - linux- generic reference
           Version: v1.10
          Hardware: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Scheduler
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

The scheduler should gracefully remove the PKTINs from its internal command
queue after PKTIO closing.

Steps to Reproduce:
1. Create and start a PKTIO, with scheduled PKTIN.
2. Stop and close the PKTIO.
3. Call odp_schedule() after closing the PKTIO (a few times if necessary, until
the closed PKTIO is scheduled again).

Actual Results: ODP will issue a "Packet recv error" in sched_cb_pktin_poll().

Expected Results: ODP should gracefully stop and close the PKTIO, with no error
messages.

Additional Information:

This behavior happens because the current scheduler uses a command queue to
choose what PKTINs to poll. Inserting a PKTIN command into the queue is fast,
but removing it is near impossible. Thus, the only way a PKTIN is removed from
the scheduler queue after odp_pktio_close() is when polling the closed
interface fails, issuing an error message.

This error is non frequent, because normally applications exit after closing
the interfaces. But a multithreaded application with a slow exit routine
(saving something to disk, etc.) can reproduce this error.

There are more implications than the error message. The scheduler has a
reference to the PKTIO index, not the PKTIO entry itself. It is unlikely, but
possible, that this sequence happens:

1. odp_pktio_create(eth0) with scheduled PKTIN -> PKTIO X
2. odp_pktio_start(X)
3. odp_pktio_stop(X)
4. odp_pktio_close(X)
5. odp_pktio_create(eth1) with non-scheduled PKTIN -> PKTIO X (reused entry)
6. odp_pktio_start(X)
7. odp_schedule(X) -> sched_cb_pktin_poll(X) -> scheduling of non-scheduled
eth1

ODP should not allow this behavior. I submitted a patch for this bug:

https://lists.linaro.org/pipermail/lng-odp/2016-May/023776.html
https://lists.linaro.org/pipermail/lng-odp/2016-May/023777.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to