DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Július Milan" <jmilan.dev@gmail.com>
To: ferruh.yigit@intel.com, dev@dpdk.org, jgrajcia@cisco.com
Subject: [dpdk-dev]  [PATCH] doc: document memif loopback feature
Date: Mon, 9 Mar 2020 13:12:59 +0100	[thread overview]
Message-ID: <20200309121259.GA29453@vbox> (raw)

Shows the example of how to connect 2 memif ports into loopback and test
the communication.

Signed-off-by: Július Milan <jmilan.dev@gmail.com>
---
 doc/guides/nics/memif.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/doc/guides/nics/memif.rst b/doc/guides/nics/memif.rst
index 4d7f0086a..08a9fda86 100644
--- a/doc/guides/nics/memif.rst
+++ b/doc/guides/nics/memif.rst
@@ -272,3 +272,21 @@ Send ping from VPP::
     64 bytes from 192.168.1.2: icmp_seq=3 ttl=254 time=23.3927 ms
     64 bytes from 192.168.1.2: icmp_seq=4 ttl=254 time=24.2975 ms
     64 bytes from 192.168.1.2: icmp_seq=5 ttl=254 time=17.7049 ms
+
+Example: testpmd memif loopback
+-------------------------------
+In this example we will create 2 memif ports connected into loopback.
+The situation is analogous to cross connecting 2 ports of the NIC by cable.
+
+To set the loopback, just use the same socket and id with different roles::
+
+    #./testpmd --vdev=net_memif0,role=master,id=0 --vdev=net_memif1,role=slave,id=0 -- -i
+
+Then start the communication::
+
+    testpmd> start tx_first
+
+Finally we can check port stats to see the traffic::
+
+    testpmd> show port stats all
+    testpmd> show port stats all
-- 
2.17.1


             reply	other threads:[~2020-03-09 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 12:12 Július Milan [this message]
2020-03-09 14:43 ` 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=20200309121259.GA29453@vbox \
    --to=jmilan.dev@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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).