From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62F0BA00C4; Fri, 1 Jul 2022 12:37:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED2BC4069D; Fri, 1 Jul 2022 12:37:33 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id 9C18240150 for ; Fri, 1 Jul 2022 12:37:32 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id q9so2579196wrd.8 for ; Fri, 01 Jul 2022 03:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VgdEXA8wB3gGR3u7jTRlKxV9N7sLMddRn+0q5imBb54=; b=sH1lDtSZdNZcTvIuxLJi47pTL0Qm01/oIeZ+5SqyIFXKzdT63I/RRV2+B9vMfIDHs+ Q+Z/K3Pju0QkocA4yOQVotcrzl+fZFrwkXBpZlwz8vYeZhUR5LPYHIMEGlIjWxLIMPFm ukH7PWODE9jNvx8R+dnUNEHRmeaFIJ8tUFCkqcTPt9VfaseBs5/lrO3c1WX/Li58WbOG 34SaDcb3BlOeqS/KR+mlPQldFBv21UxPUdBlhXh/Si4VPNz8WSsTs8wLrzcibn5YHeOy qKXxSq4bKla1Vx7YV41FiXMxv6avxx+a2DHChKDVZnwruSUqLfEK6q7vJv9lzzg8Mc98 cdRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VgdEXA8wB3gGR3u7jTRlKxV9N7sLMddRn+0q5imBb54=; b=vhTTSCMaWbS5t/5ug6eR48wiWZsEqxysAKlawlUWVBXJdWw3EPboQKF3Q/R9MHzSbl pvw/F4RlyYMFGlEY6dPagDX8kZdh4ARlO4qj6lKgQQYSURK7cBZBzXgEr95jINX3l2sT cYiO/OzUFdhCeHeAPGi2wdqszG8Je+PYE19R6WfeatAA+O90WpiBNjd/HHwuE/lCtEjV jQp3B2deMGWZL6iscEdx4fC3qWDjy4jBkWR6DAbA5SiyqdIHm7z9pfN3sxlKPcc68Oci 2jOUu3AQxjMAWKo9p3CXQY6rXDH5f3fyqxVll6TD/KFOIsyYITnfpzzpWlLdAa7kKDxI pgvw== X-Gm-Message-State: AJIora9zKrn7sv1P27MR6D1PgE/pCnrDfG9lM53SvErAovEDgQthWdu1 UyJAz9wCP7SKuiOGRJ+NWo0ZvOcsf/xAUg== X-Google-Smtp-Source: AGRyM1skvhhUeRqGDA0vGxa+VvxsH6dHFRm+iTCMzQu0DNm4rH4dHIYjKWUZzWCPh+hkNqH/OvXF1A== X-Received: by 2002:adf:e28a:0:b0:210:b31:722 with SMTP id v10-20020adfe28a000000b002100b310722mr13092381wri.65.1656671852168; Fri, 01 Jul 2022 03:37:32 -0700 (PDT) Received: from localhost.localdomain ([182.191.83.208]) by smtp.gmail.com with ESMTPSA id 12-20020a05600c020c00b003a04b0bcb43sm9719616wmi.40.2022.07.01.03.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 03:37:31 -0700 (PDT) From: "huzaifa.rahman" To: dev@dpdk.org Cc: "huzaifa.rahman" Subject: [PATCH] docs: change the doc to highlight the allowed multicast addresses Date: Fri, 1 Jul 2022 15:37:26 +0500 Message-Id: <20220701103726.4190485-1-huzaifa.rahman@emumba.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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