DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] docs: change the doc to highlight the allowed multicast addresses
@ 2022-07-01 10:37 huzaifa.rahman
  2022-08-11  3:48 ` Huzaifa Rahman
  2023-03-31 10:23 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: huzaifa.rahman @ 2022-07-01 10:37 UTC (permalink / raw)
  To: dev; +Cc: huzaifa.rahman

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-31 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 10:37 [PATCH] docs: change the doc to highlight the allowed multicast addresses huzaifa.rahman
2022-08-11  3:48 ` Huzaifa Rahman
2023-03-31 10:23 ` Thomas Monjalon

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).