Project

General

Profile

Actions

Task #7520

closed

dpdk: analyze code path for improvements

Added by Lukas Sismis 6 months ago. Updated 13 days ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

DPDK Suricata - When setting the MTU of a jumbo frame to more than the standard value:

if (mtu > RTE_ETHER_MAX_LEN) {

Am I enabling RX_RSS Offload? Why not enable some JUMBOFRAME offload instead?

Issue #2:

Check for double free:
Specifically, check around rte_mempool_free and the ldev dereference in DerefConfig.
Could it be that the ldev is dereferenced only when something fails?
The DerefConfig function should primarily dereference in failure cases. Otherwise, after a successful invocation, it sets the field to NULL.
However, what happens if it fails during the Init phase? Could a double free occur if the array of mempool pointers (mempool ptrs) is copied into ldev but is not also cleared in DerefConfig?
(For example, before this line:
ptv->pkt_mempool = dpdk_config->pkt_mempool[queue_id];

Issue #3:
We can remove pkt_mempool from the ptv structure, as it is not used anywhere.

Marked as private as I just need a place to park the suggestions for analysis.

Actions

Also available in: Atom PDF