Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@flyinskyabc
Copy link

  1. Deprecate 'rte_malloc', use 'rte_mempool_get' for inserting UOA instead.
  2. Remove unnecessary reference counting for 'struct inet_device'.

1. Deprecate 'rte_malloc', use 'rte_mempool_get' for inserting UOA instead.
2. Remove unnecessary reference counting for 'struct inet_device'.
0, NULL, NULL, NULL, NULL, i, 0);

if (unlikely(!g_uoa_cache[i])) {
return EDPVS_NOMEM;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

free previous uoa_cache memory before return

@ywc689 ywc689 added pr/needs-confirmed the feature in the pr is what we need,and list what cases should be checked in later stages pr/codes-need-change problems found in the line-by-line code review and need to be fixed labels Jul 20, 2020
Copy link
Collaborator

@ywc689 ywc689 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codes are OK now. But mempool of the same size with dp_vs_conn may not memory friendly enough.

Actually, we are planning to fix rte_malloc problem in all critical packet pathes using dpvs's mempool, which supports variable length mempool and provides a balance between rte_malloc and dpdk mempool.You could help us with the plan if you are interested with it.

@ywc689 ywc689 added pr/codes-reviewed-ok code review passed and no problem found pr/do-not-need the feature in the pr is what do not need and removed pr/codes-need-change problems found in the line-by-line code review and need to be fixed pr/needs-confirmed the feature in the pr is what we need,and list what cases should be checked in later stages labels Aug 6, 2020
@ywc689 ywc689 marked this pull request as draft August 6, 2020 03:30

(*conn)->prot_data = rte_zmalloc(NULL, sizeof(struct conn_uoa), 0);
if (!(*conn)->prot_data) {
err = rte_mempool_get(this_uoa_cache, (void **)&((*conn)->prot_data));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now, struct conn_uoa has 6 bytes only, maybe use prot_data directly
uoa = (void*)&(*conn)->prot_data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/codes-reviewed-ok code review passed and no problem found pr/do-not-need the feature in the pr is what do not need

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants