Go to file
Santosh Shukla 56d5c1079e mempool: introduce block size alignment flag
Some mempool hw like octeontx/fpa block, demands block size
(/total_elem_sz) aligned object start address.

Introducing an MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS flag.
If this flag is set:
- Align object start address(vaddr) to a multiple of total_elt_sz.
- Allocate one additional object. Additional object is needed to make
  sure that requested 'n' object gets correctly populated.

Example:
- Let's say that we get 'x' size of memory chunk from memzone.
- And application has requested 'n' object from mempool.
- Ideally, we start using objects at start address 0 to...(x-block_sz)
  for n obj.
- Not necessarily first object address i.e. 0 is aligned to block_sz.
- So we derive 'offset' value for block_sz alignment purpose i.e..'off'.
- That 'off' makes sure that start address of object is blk_sz aligned.
- Calculating 'off' may end up sacrificing first block_sz area of
  memzone area x. So total number of the object which can fit in the
  pool area is n-1, Which is incorrect behavior.

Therefore we request one additional object (/block_sz area) from memzone
when MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS flag is set.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-10-06 21:58:39 +02:00
app ethdev: fix port id type in flow API 2017-10-06 18:38:55 +02:00
buildtools buildtools: zero elf info variable in pmdinfogen 2017-09-14 14:20:41 +02:00
config config/dpaa2: change max lcores to 16 2017-10-06 03:24:17 +02:00
devtools devtools: fix version search with git < 2.7.0 2017-09-22 15:42:24 +02:00
doc doc: remove mempool deprecation notice 2017-10-06 21:57:56 +02:00
drivers mempool: add flags arg in xmem size and usage 2017-10-06 21:43:33 +02:00
examples ethdev: increase port id range 2017-10-06 18:23:25 +02:00
lib mempool: introduce block size alignment flag 2017-10-06 21:58:39 +02:00
mk config: enable NXP DPAA PMD compilation 2017-10-06 02:49:50 +02:00
pkg version: 17.08.0 2017-08-08 20:01:40 +02:00
test mempool: add flags arg in xmem size and usage 2017-10-06 21:43:33 +02:00
usertools update Cavium Inc copyright headers 2017-07-08 17:43:49 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore devtools: add tags and cscope index generation 2017-04-30 12:57:04 +02:00
GNUmakefile mk: do not build tests by default 2017-02-28 16:04:18 +01:00
LICENSE.GPL doc: GPL/LGPL licenses 2013-07-25 14:43:06 +02:00
LICENSE.LGPL doc: fix file format (dos to unix) 2013-09-06 11:43:07 +02:00
MAINTAINERS net/dpaa: add NXP DPAA PMD driver skeleton 2017-10-06 02:49:50 +02:00
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00
README doc: add readme file 2015-12-13 22:06:58 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD license for the core libraries and
drivers. The kernel components are GPLv2 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org