-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Tx track modif 7087 v15 #11966
Tx track modif 7087 v15 #11966
Conversation
Completes Ticket 7013
To optimize detection, and logging, to avoid going through all the live transactions when only a few were modified. Ticket: 7087
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11966 +/- ##
==========================================
- Coverage 82.76% 82.76% -0.01%
==========================================
Files 910 910
Lines 249014 249132 +118
==========================================
+ Hits 206105 206197 +92
- Misses 42909 42935 +26
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 23111 |
/// It can then be skipped until new data arrives. | ||
/// There is a boolean for both directions : to server and to client | ||
pub updated_tc: bool, | ||
pub updated_ts: bool, |
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.
Need a better struct layout
master
/* typedef AppLayerTxData */ struct AppLayerTxData {
struct AppLayerTxConfig {
/* typedef uint8_t -> __uint8_t */ unsigned char log_flags; /* 8 1 */
}config; /* 8 1 */
/* XXX 3 bytes hole, try to pack */
struct LoggerFlags {
/* typedef uint32_t -> __uint32_t */ unsigned int flags; /* 12 4 */
}logged; /* 12 4 */
/* typedef uint32_t -> __uint32_t */ unsigned int files_opened; /* 16 4 */
/* typedef uint32_t -> __uint32_t */ unsigned int files_logged; /* 20 4 */
/* typedef uint32_t -> __uint32_t */ unsigned int files_stored; /* 24 4 */
/* typedef uint16_t -> __uint16_t */ short unsigned int file_flags; /* 28 2 */
/* typedef uint8_t -> __uint8_t */ unsigned char file_tx; /* 30 1 */
/* typedef uint8_t -> __uint8_t */ unsigned char stream_logged; /* 31 1 */
/* typedef uint64_t -> __uint64_t */ long unsigned int detect_flags_ts; /* 32 8 */
/* typedef uint64_t -> __uint64_t */ long unsigned int detect_flags_tc; /* 40 8 */
DetectEngineState * de_state; /* 48 8 */
AppLayerDecoderEvents * events; /* 56 8 */
} tx_data; /* 8 56 */
this PR
/* typedef AppLayerTxData */ struct AppLayerTxData {
struct AppLayerTxConfig {
/* typedef uint8_t -> __uint8_t */ unsigned char log_flags; /* 8 1 */
}config; /* 8 1 */
/* XXX 3 bytes hole, try to pack */
struct LoggerFlags {
/* typedef uint32_t -> __uint32_t */ unsigned int flags; /* 12 4 */
}logged; /* 12 4 */
/* typedef uint32_t -> __uint32_t */ unsigned int files_opened; /* 16 4 */
/* typedef uint32_t -> __uint32_t */ unsigned int files_logged; /* 20 4 */
/* typedef uint32_t -> __uint32_t */ unsigned int files_stored; /* 24 4 */
/* typedef uint16_t -> __uint16_t */ short unsigned int file_flags; /* 28 2 */
/* typedef uint8_t -> __uint8_t */ unsigned char file_tx; /* 30 1 */
/* typedef uint8_t -> __uint8_t */ unsigned char stream_logged; /* 31 1 */
_Bool updated_tc; /* 32 1 */
_Bool updated_ts; /* 33 1 */
/* XXX 6 bytes hole, try to pack */
/* typedef uint64_t -> __uint64_t */ long unsigned int detect_flags_ts; /* 40 8 */
/* typedef uint64_t -> __uint64_t */ long unsigned int detect_flags_tc; /* 48 8 */
DetectEngineState * de_state; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
AppLayerDecoderEvents * events; /* 64 8 */
} tx_data; /* 8 64 */
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.
ok
Next in #11976 |
Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7087
Describe changes:
#11915 with using
updated_tc
and ts instead ofupdated[0]