Skip to contentSkip to conversation

rte_ring: capacity was set uncorrectly

dpdk-dev [email protected] 1 participant 2 messages Feb 27, 2020 – Aug 14, 2020

lore
Share & tools
lore
#0 lore raw

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

            Bug ID: 413
           Summary: rte_ring: capacity was set uncorrectly
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

In function rte_ring_init() in lib/librte_ring/rte_ring.c, capacity was set to mask when count was power of 2, while mask was set to count - 1. But when specified with flag RING_F_EXACT_SZ, capacity was set to count. I think capacity should be set to count anyway. It's illogical when you create a ring of count 4096 but you can only use 4095 of it. And when you create a ring of count 4095, you can use 4095 of it. Their logic should be identical.

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

[dpdk-dev] [Bug 413] rte_ring: capacity was set incorrectly

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

Bruce Richardson ([email protected]) changed:

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

             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Bruce Richardson ([email protected]) --- Closing off this bug as current behaviour is as designed and the requested behaviour is not possible with the current rte_ring architecture.

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