DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shaokai Zhang <felix.zhang@jaguarmicro.com>
To: dev@dpdk.org
Cc: linville@tuxdriver.com, stable@dpdk.org,
	Joey Xing <joey.xing@jaguarmicro.com>
Subject: [PATCH v3 1/1] net/af_packet: register supported param fanout mode
Date: Fri, 21 Mar 2025 11:05:51 +0800	[thread overview]
Message-ID: <20250321030552.6231-2-felix.zhang@jaguarmicro.com> (raw)
In-Reply-To: <20250321030552.6231-1-felix.zhang@jaguarmicro.com>

Although af_packet PMD supports setting the fanout algorithm, it is not
explicitly declared during registration. Add fanout parameter registration
to facilitate users in quickly obtaining supported fanout algorithms.

Additionally, add configuration parameter printing during initialization.

Adjust unnecessary printing to debug level.

Fixes: d3bc77ab05a4 ("net/af_packet: allow changing fanout mode")
Cc: stable@dpdk.org

Signed-off-by: Shaokai Zhang <felix.zhang@jaguarmicro.com>
Reviewed-by: Joey Xing <joey.xing@jaguarmicro.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index ab34285ed9..85bc1201b4 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -1167,11 +1167,16 @@ rte_eth_from_packet(struct rte_vdev_device *dev,
 		return -1;
 	}
 
-	PMD_LOG(INFO, "%s: AF_PACKET MMAP parameters:", name);
-	PMD_LOG(INFO, "%s:\tblock size %d", name, blocksize);
-	PMD_LOG(INFO, "%s:\tblock count %d", name, blockcount);
-	PMD_LOG(INFO, "%s:\tframe size %d", name, framesize);
-	PMD_LOG(INFO, "%s:\tframe count %d", name, framecount);
+	PMD_LOG(DEBUG, "%s: AF_PACKET MMAP parameters:", name);
+	PMD_LOG(DEBUG, "%s:\tblock size %d", name, blocksize);
+	PMD_LOG(DEBUG, "%s:\tblock count %d", name, blockcount);
+	PMD_LOG(DEBUG, "%s:\tframe size %d", name, framesize);
+	PMD_LOG(DEBUG, "%s:\tframe count %d", name, framecount);
+	PMD_LOG(DEBUG, "%s:\tqdisc bypass %d", name, qdisc_bypass);
+	if (fanout_mode)
+		PMD_LOG(DEBUG, "%s:\tfanout mode %s", name, fanout_mode);
+	else
+		PMD_LOG(DEBUG, "%s:\tfanout mode %s", name, "default PACKET_FANOUT_HASH");
 
 	if (rte_pmd_init_internals(dev, *sockfd, qpairs,
 				   blocksize, blockcount,
@@ -1274,4 +1279,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_packet,
 	"blocksz=<int> "
 	"framesz=<int> "
 	"framecnt=<int> "
-	"qdisc_bypass=<0|1>");
+	"qdisc_bypass=<0|1> "
+	"fanout_mode=<hash|lb|cpu|rollover|rnd|qm>");
-- 
2.47.1.windows.2


      reply	other threads:[~2025-03-21  3:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  8:15 [PATCH] " Shaokai Zhang
2025-03-20  8:37 ` [PATCH v2 0/1] " Shaokai Zhang
2025-03-20  8:37   ` [PATCH v2 1/1] " Shaokai Zhang
2025-03-20 17:45     ` Stephen Hemminger
2025-03-21  3:05     ` [PATCH v3 0/1] " Shaokai Zhang
2025-03-21  3:05       ` Shaokai Zhang [this message]

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=20250321030552.6231-2-felix.zhang@jaguarmicro.com \
    --to=felix.zhang@jaguarmicro.com \
    --cc=dev@dpdk.org \
    --cc=joey.xing@jaguarmicro.com \
    --cc=linville@tuxdriver.com \
    --cc=stable@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).