DPDK patches and discussions
 help / color / mirror / Atom feed
From: "huzaifa.rahman" <huzaifa.rahman@emumba.com>
To: dev@dpdk.org
Cc: "huzaifa.rahman" <huzaifa.rahman@emumba.com>
Subject: [PATCH] docs: change the doc to highlight the allowed multicast addresses
Date: Fri,  1 Jul 2022 15:37:26 +0500	[thread overview]
Message-ID: <20220701103726.4190485-1-huzaifa.rahman@emumba.com> (raw)

Bugzilla ID: 802

The ipv4_multicast example does not work with any multicast IPs.
Only a selected few IPs are allowed to send pakcets. These IPs
are listed in an mcast_group_table array along with their respective
port masks. A normal user would not know about this behaviour since
there is no mention of it in the docs

Added the mcast_group_table in the docs so user would know which
IPs are allowed.

Signed-off-by: huzaifa.rahman <huzaifa.rahman@emumba.com>
---
 doc/guides/sample_app_ug/ipv4_multicast.rst | 8 +++++++-
 examples/ipv4_multicast/main.c              | 2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst
index f87f7be57e..7c49212c64 100644
--- a/doc/guides/sample_app_ug/ipv4_multicast.rst
+++ b/doc/guides/sample_app_ug/ipv4_multicast.rst
@@ -22,7 +22,13 @@ There are two key differences from the L2 Forwarding sample application:
 
 The lookup method is the Four-byte Key (FBK) hash-based method.
 The lookup table is composed of pairs of destination IPv4 address (the FBK)
-and a port mask associated with that IPv4 address.
+and a port mask associated with that IPv4 address. By default, the following IP addresses and their respective
+port masks are added:
+
+.. literalinclude:: ../../../examples/ipv4_multicast/main.c
+    :language: c
+    :start-after: Create the mcast group table. 8<
+    :end-before: >8 End of create mcast group table.
 
 .. note::
 
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index bdcaa3bcd1..c086149eca 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -139,6 +139,7 @@ struct mcast_group_params {
 	uint16_t port_mask;
 };
 
+/* Create the mcast group table. 8< */
 static struct mcast_group_params mcast_group_table[] = {
 		{RTE_IPV4(224,0,0,101), 0x1},
 		{RTE_IPV4(224,0,0,102), 0x2},
@@ -156,6 +157,7 @@ static struct mcast_group_params mcast_group_table[] = {
 		{RTE_IPV4(224,0,0,114), 0xE},
 		{RTE_IPV4(224,0,0,115), 0xF},
 };
+/* >8 End of create mcast group table. */
 
 /* Send burst of packets on an output interface */
 static void
-- 
2.25.1


             reply	other threads:[~2022-07-01 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 10:37 huzaifa.rahman [this message]
2022-08-11  3:48 ` Huzaifa Rahman
2023-03-31 10:23 ` Thomas Monjalon

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=20220701103726.4190485-1-huzaifa.rahman@emumba.com \
    --to=huzaifa.rahman@emumba.com \
    --cc=dev@dpdk.org \
    /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).