MINOR: buffer: add br_single() to check if a buffer ring has more than one buf
authorWilly Tarreau <w@1wt.eu>
Thu, 16 Mar 2023 16:30:04 +0000 (17:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 16 Mar 2023 17:45:46 +0000 (18:45 +0100)
commit9824f8c8908d67f6cedf2434e12a23f18a27eaf0
treebe1c6d6e645790184c270382cb916f00993f4529
parente5a26eb2def42f07aad5bde4cd27e9fdd441f207
MINOR: buffer: add br_single() to check if a buffer ring has more than one buf

It's cheaper and cleaner than using br_count()==1 given that it just compares
two indexes, and that a ring having a single buffer is in a special case where
it is between empty and used up-to-1. In other words it's not congested.
include/haproxy/buf.h