-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var: Use 16-bit container for type #12272
base: master
Are you sure you want to change the base?
Conversation
Issue: 6855: Match sigmatch type field in var and bit structs
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12272 +/- ##
========================================
Coverage 83.22% 83.23%
========================================
Files 912 912
Lines 257311 257627 +316
========================================
+ Hits 214154 214426 +272
- Misses 43157 43201 +44
Flags with carried forward coverage won't be shown. Click here to find out more. |
uint32_t idx; /* name idx */ | ||
GenericVar *next; /* right now just implement this as a list, | ||
* in the long run we have think of something | ||
* faster. */ | ||
uint16_t keylen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this grows the struct with no real benefit:
master:
struct FlowVar_ {
uint8_t type; /* 0 1 */
uint8_t datatype; /* 1 1 */
uint16_t keylen; /* 2 2 */
uint32_t idx; /* 4 4 */
GenericVar * next; /* 8 8 */
union {
FlowVarTypeStr fv_str; /* 16 16 */
FlowVarTypeInt fv_int; /* 16 4 */
} data; /* 16 16 */
uint8_t * key; /* 32 8 */
/* size: 40, cachelines: 1, members: 7 */
/* last cacheline: 40 bytes */
};
this PR:
struct FlowVar_ {
uint16_t type; /* 0 2 */
uint8_t datatype; /* 2 1 */
uint8_t pad; /* 3 1 */
uint32_t idx; /* 4 4 */
GenericVar * next; /* 8 8 */
uint16_t keylen; /* 16 2 */
/* XXX 6 bytes hole, try to pack */
union {
FlowVarTypeStr fv_str; /* 24 16 */
FlowVarTypeInt fv_int; /* 24 4 */
} data; /* 24 16 */
uint8_t * key; /* 40 8 */
/* size: 48, cachelines: 1, members: 8 */
/* sum members: 42, holes: 1, sum holes: 6 */
/* last cacheline: 48 bytes */
};
Information: QA ran without warnings. Pipeline 23915 |
Continuation of #12253
Issue: 6855: Match sigmatch type field in var and bit structs
Link to ticket: https://redmine.openinfosecfoundation.org/issues/6855
Describe changes:
type
in flowbit, flowvar and generic varUpdates:
Provide values to any of the below to override the defaults.
link to the pull request in the respective
_BRANCH
variable.SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=