[PATCH v1] api: pktio: introduce buffer sort capability #1290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of the HW has support for allocating the packet buffer
based on the size.
This is often useful for saving the memory where the application
can create a different pool to steer the specific size of
the packet, thus enabling effective use of memory.
A similar use case can be achieved through the sub pool scheme,
however, if the application needs finer control on the number of
pools and to give the very same pool to different packet
in sort entries then this capability will be handy.
Packet input buffer sorting entries define the sorting requirements.
When sorting is enabled and packet received in given a packet io,
the implementation shall scan the configured entries, if the packet size
is less than or equal odp_pktin_sort_desc_t::len, it allocates
the packets from odp_pktin_sort_desc_t::pool.
odp_pktin_sort_desc_t::len value in each entry must be unique and must
be sorted in ascending order. Otherwise, the behavior is undefined.
Example sorting entry table configuration:
default pool configured for the pktio.
tbl[0].len = 1500;
tbl[0].pool = pool_a;
tbl[1].len = 4000;
tbl[1].pool = pool_b;
tbl[2].len = 7000;
tbl[2].pool = pool_c;
Signed-off-by: Jerin Jacob jerinj@marvell.com
Signed-off-by: Ashwin Sekhar T K asekhar@marvell.com