DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Jakub Grajciar <jgrajcia@cisco.com>, dev@dpdk.org
Cc: anatoly.burakov@intel.com
Subject: Re: [dpdk-dev] [PATCH v4] net/memif: zero-copy slave
Date: Wed, 10 Jul 2019 16:06:57 +0100	[thread overview]
Message-ID: <81c0941d-8288-825f-2a0f-d8851075007b@intel.com> (raw)
In-Reply-To: <20190709082254.12698-1-jgrajcia@cisco.com>

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 <jgrajcia@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.


  reply	other threads:[~2019-07-10 15:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09  8:22 Jakub Grajciar
2019-07-10 15:06 ` Ferruh Yigit [this message]
2019-07-23 12:35   ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-08-22  8:18 ` [dpdk-dev] [PATCH v5] " Jakub Grajciar
2019-10-04 13:23   ` Ferruh Yigit
2019-10-15 16:59     ` Ferruh Yigit
2019-10-17 11:52       ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-17 16:04         ` Ferruh Yigit
2019-10-17 16:45           ` Ferruh Yigit
2019-10-21 16:07             ` Ferruh Yigit
2019-10-25 16:44   ` Yigit, Ferruh
2019-10-29 14:28     ` David Marchand
2019-10-30 10:17       ` Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
2019-10-30 10:25         ` David Marchand
2019-11-04 11:03   ` [dpdk-dev] [PATCH v6] " Jakub Grajciar
2019-11-11 15:21     ` Ferruh Yigit
2019-11-11 15:24       ` Thomas Monjalon
2019-11-12 12:55         ` Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
2019-11-11 15:49       ` David Marchand
2019-11-15 16:55         ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81c0941d-8288-825f-2a0f-d8851075007b@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=jgrajcia@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).