-
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
Src div0 5920 v4 #9253
Src div0 5920 v4 #9253
Conversation
@@ -152,12 +152,18 @@ static void DPDKFreeMbufArray(struct rte_mbuf **mbuf_array, uint16_t mbuf_cnt, u | |||
static uint64_t CyclesToMicroseconds(const uint64_t cycles) | |||
{ | |||
const uint64_t ticks_per_us = rte_get_tsc_hz() / 1000000; | |||
if (ticks_per_us == 0) { |
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.
@lukashino is this necessary? Or can rte_get_tsc_hz return < 1000000?
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.
Seems to be possible only when:
- the CPU would have a clock rate less than 100MHz
- the CPU would not be well supported by DPDK and some register would return 0/random number instead ticks per second
So, assuming every CPU has a clock rate of at least 800MHz, and we will not care about unsupported CPUs then it should be fine even without the check.
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 thanks, I feel it's probably safer to keep the check
Information: ERROR: QA failed on SURI_TLPR1_alerts_cmp.
Pipeline 15326 |
Merged in #9288, thanks! |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/5920
Describe changes:
Modifies #9150 with rebase now that Suricata 7 is released and this is targeted for 7.0.1