[dpdk-dev] [Bug 413] rte_ring: capacity was set uncorrectly
bugzilla at dpdk.org
bugzilla at dpdk.org
Thu Feb 27 16:04:04 CET 2020
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: dev at dpdk.org
Reporter: 781345688 at qq.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the dev
mailing list