From: "Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)" <jgrajcia@cisco.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "anatoly.burakov@intel.com" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH v4] net/memif: zero-copy slave
Date: Tue, 23 Jul 2019 12:35:39 +0000 [thread overview]
Message-ID: <8f386e3961be460bae89aa1f8fe71dee@XCH-ALN-004.cisco.com> (raw)
In-Reply-To: <81c0941d-8288-825f-2a0f-d8851075007b@intel.com>
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, July 10, 2019 5:07 PM
> To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
> <jgrajcia@cisco.com>; dev@dpdk.org
> Cc: anatoly.burakov@intel.com
> Subject: Re: [dpdk-dev] [PATCH v4] net/memif: zero-copy slave
>
> 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?
>
Will do.
> <...>
>
> > @@ -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?
Single file segments limitation will be explained in docs in next patch. Simply put zero-copy with multi file segments has worse performance than non zero-copy due to slow memseg lookup.
> btw, I am having a crash with 2Mb hugepages and zerocopy, but "1Gb &
> zerocopy" & "2Mb & non zerocopy" works without crash.
This is strange, I've only tested using 2Mb hugepages without a crash. Can you please provide more details?
next prev parent reply other threads:[~2019-07-23 12:35 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
2019-07-23 12:35 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) [this message]
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=8f386e3961be460bae89aa1f8fe71dee@XCH-ALN-004.cisco.com \
--to=jgrajcia@cisco.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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).