Skip to content

Commit fdc92d4

Browse files
Shaokai Zhangshemminger
authored andcommitted
net/af_packet: register supported param fanout mode
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: d3bc77a ("net/af_packet: allow changing fanout mode") Cc: [email protected] Signed-off-by: Shaokai Zhang <[email protected]> Reviewed-by: Joey Xing <[email protected]>
1 parent b74d4c5 commit fdc92d4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

drivers/net/af_packet/rte_eth_af_packet.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,11 +1167,16 @@ rte_eth_from_packet(struct rte_vdev_device *dev,
11671167
return -1;
11681168
}
11691169

1170-
PMD_LOG(INFO, "%s: AF_PACKET MMAP parameters:", name);
1171-
PMD_LOG(INFO, "%s:\tblock size %d", name, blocksize);
1172-
PMD_LOG(INFO, "%s:\tblock count %d", name, blockcount);
1173-
PMD_LOG(INFO, "%s:\tframe size %d", name, framesize);
1174-
PMD_LOG(INFO, "%s:\tframe count %d", name, framecount);
1170+
PMD_LOG(DEBUG, "%s: AF_PACKET MMAP parameters:", name);
1171+
PMD_LOG(DEBUG, "%s:\tblock size %d", name, blocksize);
1172+
PMD_LOG(DEBUG, "%s:\tblock count %d", name, blockcount);
1173+
PMD_LOG(DEBUG, "%s:\tframe size %d", name, framesize);
1174+
PMD_LOG(DEBUG, "%s:\tframe count %d", name, framecount);
1175+
PMD_LOG(DEBUG, "%s:\tqdisc bypass %d", name, qdisc_bypass);
1176+
if (fanout_mode)
1177+
PMD_LOG(DEBUG, "%s:\tfanout mode %s", name, fanout_mode);
1178+
else
1179+
PMD_LOG(DEBUG, "%s:\tfanout mode %s", name, "default PACKET_FANOUT_HASH");
11751180

11761181
if (rte_pmd_init_internals(dev, *sockfd, qpairs,
11771182
blocksize, blockcount,
@@ -1274,4 +1279,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_packet,
12741279
"blocksz=<int> "
12751280
"framesz=<int> "
12761281
"framecnt=<int> "
1277-
"qdisc_bypass=<0|1>");
1282+
"qdisc_bypass=<0|1> "
1283+
"fanout_mode=<hash|lb|cpu|rollover|rnd|qm>");

0 commit comments

Comments
 (0)