[dpdk-dev] [PATCH] mbuf: add comment explaining confusing code

Stephen Hemminger stephen at networkplumber.org
Mon Mar 30 20:15:05 CEST 2015


On Mon, 30 Mar 2015 17:39:06 +0000
Don Provan <dprovan at bivio.net> wrote:

> In all the debate about atomics, I don't think anyone got around to pointing out that in the unlikely case that the refcnt is not 1, then it's equally unlikely that decrementing it will result in 0 despite the code's claim to the contrary. That's the part that confused me. Would it make sense to fix this while adding the comment?

Really doubt the second likely() makes any difference in code speed.
Should probably just be removed.


More information about the dev mailing list