On 7/9/2019 9:22 AM, Jakub Grajciar wrote:
> Zero-copy slave support for memif PMD.
> Slave interface exposes DPDK memory to
> master interface. Only single file segments
> are supported (EAL option --single-file-segments).
> 
> Signed-off-by: Jakub Grajciar <jgraj...@cisco.com>

<...>

> +Zero-copy slave
> +~~~~~~~~~~~~~~~
> +
> +**Shared memory format**
> +
> +Region 0 is created by memif driver and contains rings. Slave interface 
> exposes DPDK memory (memseg).
> +Instead of using memfd_create() to create new shared file, existing memsegs 
> are used.
> +Master interface functions the same as with zero-copy disabled.
> +
> +region 0:
> +
> ++-----------------------+
> +| Rings                 |
> ++-----------+-----------+
> +| S2M rings | M2S rings |
> ++-----------+-----------+
> +
> +region n:
> +
> ++-----------------+
> +| Buffers         |
> ++-----------------+
> +|memseg           |
> ++-----------------+
> +
> +Buffers are dequeued and enqueued as needed. Offset descriptor field is 
> calculated at tx.
> +Only single file segments mode (EAL option --single-file-segments) is 
> supported, as calculating
> +offset from multiple segments is too expensive.
> +

Can you please add sample testpmd command for 'zerocopy' support, this can be
useful to highlight '--single-file-segments' eal argument is required.

Also can you please document what happens if only master or slave provides the
'zero-copy=yes' devarg?

<...>

> @@ -1127,6 +1522,10 @@ memif_set_zc(const char *key __rte_unused, const char 
> *value, void *extra_args)
>       uint32_t *flags = (uint32_t *)extra_args;
> 
>       if (strstr(value, "yes") != NULL) {
> +             if (!rte_mcfg_get_single_file_segments()) {
> +                     MIF_LOG(ERR, "Zero-copy doesn't support multi-file 
> segments.");
> +                     return -ENOTSUP;
> +             }

Why "--single-file-segments" is required? Is it to have big physically
continuous chunk of memory? If so will it work with 2Mb hugepages?
btw, I am having a crash with 2Mb hugepages and zerocopy, but "1Gb & zerocopy" &
"2Mb & non zerocopy" works without crash.

  • [dpdk-dev] [... Jakub Grajciar
    • Re: [dp... Ferruh Yigit
      • Re:... Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)

Reply via email to