On 04-Apr-18 12:41 AM, Stephen Hemminger wrote:
On Wed,  4 Apr 2018 00:21:23 +0100
Anatoly Burakov <anatoly.bura...@intel.com> wrote:

This adds a new set of _contig API's to rte_memzone. For now,
hugepage memory is always contiguous, but we need to prepare the
drivers for the switch.

Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>

Why not make fragmentation an optional flag to the memzone_reserved
rather than a new API. That way less drivers need to be changed.

#define RTE_MEMZONE_SPARSE       0x00100000 /* Allow zone to be non-contiguous 
*/

That is a good idea, however, i would perhaps do it the other way around. Most of the time we are reserving memzones, we do not need those to be IOVA-contiguous (i.e. creating rings, hashtables etc.). So it would rather be a RTE_MEMZONE_CONTIG (or some such) flag.

--
Thanks,
Anatoly

Reply via email to