summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_bihash.h
AgeCommit message (Collapse)AuthorFilesLines
2023-03-18vppinfra: fix corner-cases in bihash lookupDave Barach1-2/+7
In a case where one pounds on a single kvp in a KVP_AT_BUCKET_LEVEL table, the code would sporadically return a transitional value (junk) from a half-deleted kvp. At most, 64-bits worth of the kvp will be written atomically, so using memset(...) to smear 0xFF's across a kvp to free it left a lot to be desired. Performance impact: very mild positive, thanks to FC for doing a multi-thread host stack perf/scale test. Added an ASSERT to catch attempts to add a (key,value) pair which contains the magic "free kvp" value. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I6a1aa8a2c30bc70bec4b696ce7b17c2839927065
2021-04-05cnat: explicit BIHASH_USE_HEAP settingDave Barach1-0/+2
The session db (bihash_40_56_t) was inheriting BIHASH_USE_HEAP=1 from vppinfra/bihash_24_8.h through a convoluted set of #includes. Set BIHASH_USE_HEAP in cnat_bihash.h, to avoid a surprise long after anyone remembers the story. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I8aa3be09b306fc99ba0b6baa5096a0a6829a8951
2021-02-26cnat: fixes & prepare maglevNathan Skrzypczak1-0/+122
Notable changes: - ip[46]-cnat-snat is renamed to cnat-snat-ip[46] - indent fixes - common trace primitives - bihash is now 40_56 with alias Type: refactor Change-Id: I0a82cfe3b40efd96473e51061d7135ffe412ddfc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>