Skip to contentSkip to conversation

rte_lcore_index(-1) returns invalid data for non DPDK thread.

dpdk-dev [email protected] 1 participant 2 messages Apr 8, 2020 – Jul 9, 2020

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=446

            Bug ID: 446
           Summary: rte_lcore_index(-1) returns invalid data for non DPDK
                    thread.
           Product: DPDK
           Version: 20.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

Calling rte_lcore_index() with -1 as lcore returns the relative index of the current lcore in the cpuset. But if called from a non-DPDK thread the value is undefined. It ends up referencing outside lcore_config array and gets some other value. In our tests it got 253; but could be anything.

It is documented to return -1 on error. It does that if passed an lcore value outside the cpu set, it should return -1 if run in non-DPDK thread as well.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=446

Thomas Monjalon ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Thomas Monjalon ([email protected]) --- Resolved in http://git.dpdk.org/dpdk/commit/?id=67ae5936c4

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.