DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] af_packet: allow configuring number of rings
@ 2020-02-24 23:11 Stephen Hemminger
  2020-02-27 17:20 ` Ferruh Yigit
  2020-02-27 20:00 ` [dpdk-dev] [PATCH v2] net/af_packet: remove limitation on number of qpairs Stephen Hemminger
  0 siblings, 2 replies; 12+ messages in thread
From: Stephen Hemminger @ 2020-02-24 23:11 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

The maximum number of rings in af_packet is hard coded as 16.
The user should be able to configure this as part of DPDK config.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                        | 1 +
 drivers/net/af_packet/rte_eth_af_packet.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/config/common_base b/config/common_base
index 6ea9c63cc36b..dd154a474b57 100644
--- a/config/common_base
+++ b/config/common_base
@@ -468,6 +468,7 @@ CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n
 # Compile software PMD backed by AF_PACKET sockets (Linux only)
 #
 CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n
+CONFIG_RTE_PMD_AF_PACKET_MAX_RINGS=16
 
 #
 # Compile software PMD backed by AF_XDP sockets (Linux only)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index f5806bf42c46..6e90d231ca4f 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -6,6 +6,7 @@
  * All rights reserved.
  */
 
+#include <rte_config.h>
 #include <rte_string_fns.h>
 #include <rte_mbuf.h>
 #include <rte_ethdev_driver.h>
@@ -37,7 +38,9 @@
 #define DFLT_FRAME_SIZE		(1 << 11)
 #define DFLT_FRAME_COUNT	(1 << 9)
 
+#ifndef RTE_PMD_AF_PACKET_MAX_RINGS
 #define RTE_PMD_AF_PACKET_MAX_RINGS 16
+#endif
 
 struct pkt_rx_queue {
 	int sockfd;
-- 
2.20.1


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

end of thread, other threads:[~2020-03-02 17:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 23:11 [dpdk-dev] [PATCH] af_packet: allow configuring number of rings Stephen Hemminger
2020-02-27 17:20 ` Ferruh Yigit
2020-02-27 17:51   ` Stephen Hemminger
2020-02-27 17:55     ` Ferruh Yigit
2020-02-27 20:00 ` [dpdk-dev] [PATCH v2] net/af_packet: remove limitation on number of qpairs Stephen Hemminger
2020-02-27 20:56   ` John W. Linville
2020-03-02 16:24     ` Ferruh Yigit
2020-03-02 16:43       ` Stephen Hemminger
2020-03-02 17:20         ` Ferruh Yigit
2020-02-28 10:08   ` Ferruh Yigit
2020-02-28 16:52     ` John W. Linville
2020-03-02 16:17       ` Ferruh Yigit

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