Skip to contentSkip to conversation

net/af_packet: allow disabling packet fanout

PATCH In review Tudor Cornea 2 participants 7 messages Dec 12, 2024 – Jan 20, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/af_packet: allow disabling packet fanout

This allows us to control whether the PMD will attempt to use the PACKET_FANOUT socket option, and allows the binary compiled against newer kernel headers to run on an older kernel, which lacks support for it.

---
 doc/guides/nics/af_packet.rst             |  4 ++-
 drivers/net/af_packet/rte_eth_af_packet.c | 32 ++++++++++++++++++-----
 2 files changed, 28 insertions(+), 8 deletions(-)
doc/guides/nics/af_packet.rst +3 -1
index a343d3a961..42837031de 100644
@@ -25,6 +25,8 @@ Some of these, in turn, will be used to configure the PACKET_MMAP settings.
 *   ``qpairs`` - number of Rx and Tx queues (optional, default 1);
 *   ``qdisc_bypass`` - set PACKET_QDISC_BYPASS option in AF_PACKET (optional,
     disabled by default);
+*   ``packet_fanout`` - set PACKET_FANOUT option in AF_PACKET (optional,
+    enabled by default);
 *   ``blocksz`` - PACKET_MMAP block size (optional, default 4096);
 *   ``framesz`` - PACKET_MMAP frame size (optional, default 2048B; Note: multiple
     of 16B);
@@ -64,7 +66,7 @@ framecnt=512):
 
 .. code-block:: console
 
-    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0
+    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0,packet_fanout=0
 
 Features and Limitations
 ------------------------
drivers/net/af_packet/rte_eth_af_packet.c +25 -7
index ceb8d9356a..521dbef317 100644
@@ -36,6 +36,7 @@
 #define ETH_AF_PACKET_FRAMESIZE_ARG	"framesz"
 #define ETH_AF_PACKET_FRAMECOUNT_ARG	"framecnt"
 #define ETH_AF_PACKET_QDISC_BYPASS_ARG	"qdisc_bypass"
+#define ETH_AF_PACKET_PACKET_FANOUT_ARG	"packet_fanout"
 
 #define DFLT_FRAME_SIZE		(1 << 11)
 #define DFLT_FRAME_COUNT	(1 << 9)
@@ -96,6 +97,7 @@ static const char *valid_arguments[] = {
 	ETH_AF_PACKET_FRAMESIZE_ARG,
 	ETH_AF_PACKET_FRAMECOUNT_ARG,
 	ETH_AF_PACKET_QDISC_BYPASS_ARG,
+	ETH_AF_PACKET_PACKET_FANOUT_ARG,
 	NULL
 };
 
@@ -709,6 +711,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
                        unsigned int framesize,
                        unsigned int framecnt,
 		       unsigned int qdisc_bypass,
+		       unsigned int packet_fanout,
                        struct pmd_internals **internals,
                        struct rte_eth_dev **eth_dev,
                        struct rte_kvargs *kvlist)
@@ -926,14 +929,17 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
 			goto error;
 		}
 
+		if (packet_fanout) {
 #if defined(PACKET_FANOUT)
-		rc = setsockopt(qsockfd, SOL_PACKET, PACKET_FANOUT,
-				&fanout_arg, sizeof(fanout_arg));
-		if (rc == -1) {
-			PMD_LOG_ERRNO(ERR,
-				"%s: could not set PACKET_FANOUT on AF_PACKET socket for %s",
-				name, pair->value);
-			goto error;
+			rc = setsockopt(qsockfd, SOL_PACKET, PACKET_FANOUT,
+					&fanout_arg, sizeof(fanout_arg));
+			if (rc == -1) {
+				PMD_LOG_ERRNO(ERR,
+					"%s: could not set PACKET_FANOUT "
+					"on AF_PACKET socket for %s",
+					name, pair->value);
+				goto error;
+			}
 		}
 #endif
 	}
@@ -1003,6 +1009,7 @@ rte_eth_from_packet(struct rte_vdev_device *dev,
 	unsigned int framecount = DFLT_FRAME_COUNT;
 	unsigned int qpairs = 1;
 	unsigned int qdisc_bypass = 1;
+	unsigned int packet_fanout = 1;
 
 	/* do some parameter checking */
 	if (*sockfd < 0)
@@ -1065,6 +1072,16 @@ rte_eth_from_packet(struct rte_vdev_device *dev,
 			}
 			continue;
 		}
+		if (strstr(pair->key, ETH_AF_PACKET_PACKET_FANOUT_ARG) != NULL) {
+			packet_fanout = atoi(pair->value);
+			if (packet_fanout > 1) {
+				PMD_LOG(ERR,
+					"%s: invalid packet fanout value",
+					name);
+				return -1;
+			}
+			continue;
+		}
 	}
 
 	if (framesize > blocksize) {
@@ -1091,6 +1108,7 @@ rte_eth_from_packet(struct rte_vdev_device *dev,
 				   blocksize, blockcount,
 				   framesize, framecount,
 				   qdisc_bypass,
+				   packet_fanout,
 				   &internals, &eth_dev,
 				   kvlist) < 0)
 		return -1;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 6 lines · On Thu, 12 Dec 2024 10:04:42 +0200 Tudor Cornea <[email protected]> wrote:

This allows us to control whether the PMD will attempt to use the PACKET_FANOUT socket option, and allows the binary compiled against newer kernel headers to run on an older kernel, which lacks support for it.

Controlling fanout more is a good idea but not sure what this patch is trying to do with it.

- DPDK minimum kernel version is now 4.19 so no point in worrying about backward compatibility. According to man page for packet, fanout was added in 3.1 kernel.

- It would be useful to allow application to control fanout in more detail. According to man page:
• The load-balance mode PACKET_FANOUT_LB implements a round- robin algorithm.

• PACKET_FANOUT_CPU selects the socket based on the CPU that the packet arrived on.

• PACKET_FANOUT_ROLLOVER processes all data on a single socket, moving to the next when one becomes backlogged.

• PACKET_FANOUT_RND selects the socket using a pseudo-random number generator.

• PACKET_FANOUT_QM (available since Linux 3.14) selects the socket using the recorded queue_mapping of the received skb.

The default should be for packet to behave like a hardware NIC if RSS is enabled. And use a single queue if RSS is not enabled. The PMD kind of does this now but not the same.

#2 lore raw
Quoted 2 lines

Controlling fanout more is a good idea but not sure what this patch is trying to do with it.

I am maintaining a DPDK application which should run on a large number of setups.
Unfortunately, I do not have a lot of control over the environment the application runs on (e.g kernel).

The problem I was trying to solve is that the Af_Packet PMD seems to fail to initialize properly on some setups.
I managed to reproduce the issue with testpmd.

sudo ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd \
     -l 0-3 \
     -m 1024 \
     --no-huge \
     --no-shconf \
     --no-pci \
     --vdev=net_af_packet0,iface=eth1,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0
\
     --vdev=net_af_packet1,iface=eth2,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0
\
     -- \
     -i

Error: Unknown device type.
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Selected IOVA mode 'VA'
AFPACKET: rte_pmd_init_internals(): net_af_packet0: could not set PACKET_FANOUT on AF_PACKET socket for eth1:Invalid argument
VDEV_BUS: vdev_probe(): failed to initialize net_af_packet0 device
AFPACKET: rte_pmd_init_internals(): net_af_packet1: could not set PACKET_FANOUT on AF_PACKET socket for eth1:Invalid argument
VDEV_BUS: vdev_probe(): failed to initialize net_af_packet1 device
EAL: Bus (vdev) probe failed.
testpmd: No probed ethernet devices

It seems that the call to PACKET_FANOUT setsockopt failed with EINVAL. I debugged the issue further. It seems that the root cause is that when the interface is down (e.g eth1), after the bind operation succeeds, the PACKET_FANOUT setsockopt will fail.

This is a behavior of AF_Packet in Linux which I'm not sure is that well documented.
It seems to be fixed in a recent Linux Kernel commit. I re-compiled the kernel with the change, and did not see the issue afterwards.

Commit 2cee3e6e2e4b74bec96694169f01cd3feec1f264
af_packet: allow fanout_add when socket is not RUNNING

[1] https://github.com/torvalds/linux/commit/2cee3e6e2e4b74bec96694169f01cd3feec1f264

I was trying to find a solution for my application to run on setups which don't have the kernel patch.
Introducing a devarg to control when packet_fanout is enabled seemed like a possible way around the issue.

As a second solution around the issue, I was also thinking of using the PACKET_FANOUT setsockopt only when nb_queues > 1. Conceptually, I think it would make some sense, because fanout doesn't really help when having a single socket.
We would need more sockets in order to load balance incoming packets. And this would still allow me to control the behavior from the existing 'qpairs' devarg.

The idea would be something along these lines

if (nb_queues > 1) {
rc = setsockopt(qsockfd, SOL_PACKET, PACKET_FANOUT, &fanout_arg,
sizeof(fanout_arg));
/* ... */
}

Would a patch using this idea be considered more suitable ?

Quoted 5 lines

- DPDK minimum kernel version is now 4.19 so no point in worrying about backward compatibility. According to man page for packet, fanout was added in 3.1 kernel.

- It would be useful to allow application to control fanout in more detail.

This is a great idea. Would introducing a new devarg, (e.g 'fanout_mode') be the proper way to allow the application to customize fanout in more detail ?

--vdev=net_af_packet0,iface=eth1,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,fanout_mode=[fanout_hash|fanout_cpu|fanout_rnd|fanout_qm]

#3 lore raw
Quoted 5 lines

This is a great idea. Would introducing a new devarg, (e.g 'fanout_mode') be the proper way to allow the application to customize fanout in more detail ?

--vdev=net_af_packet0,iface=eth1,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,fanout_mode=[fanout_hash|fanout_cpu|fanout_rnd|fanout_qm]

I'll send a new version of the patch which will add some additional customization

#4 lore raw

PATCH v2 1/1 net/af_packet: allow changing fanout mode

In reply to Tudor Cornea

This allows us to control the algorithm used to spread traffic between sockets, adding more fine grained control. If the user does not specify a fanout mode, the PMD driver will default to PACKET_FANOUT_HASH.

---
v2:
* Renamed the patch
* Replaced packet_fanout argument with fanout_mode, which allows more fine grained control

---
 doc/guides/nics/af_packet.rst             |  4 +-
 drivers/net/af_packet/rte_eth_af_packet.c | 92 ++++++++++++++++++++---
 2 files changed, 83 insertions(+), 13 deletions(-)
doc/guides/nics/af_packet.rst +3 -1
index a343d3a961..3443f95004 100644
@@ -25,6 +25,8 @@ Some of these, in turn, will be used to configure the PACKET_MMAP settings.
 *   ``qpairs`` - number of Rx and Tx queues (optional, default 1);
 *   ``qdisc_bypass`` - set PACKET_QDISC_BYPASS option in AF_PACKET (optional,
     disabled by default);
+*   ``fanout_mode`` - set fanout algorithm. Possible choices: hash,lb,cpu,rollover,rnd,qm (optional,
+    default hash);
 *   ``blocksz`` - PACKET_MMAP block size (optional, default 4096);
 *   ``framesz`` - PACKET_MMAP frame size (optional, default 2048B; Note: multiple
     of 16B);
@@ -64,7 +66,7 @@ framecnt=512):
 
 .. code-block:: console
 
-    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0
+    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0,fanout_mode=hash
 
 Features and Limitations
 ------------------------
drivers/net/af_packet/rte_eth_af_packet.c +80 -12

146 lines not on this page · raw message

Signature · 1 line
2.34.1
#5 lore raw

Re: [PATCH v2] net/af_packet: allow changing fanout mode

Quoted 22 lines · On Mon, 6 Jan 2025 17:35:08 +0200 Tudor Cornea <[email protected]> wrote:

This allows us to control the algorithm used to spread traffic between sockets, adding more fine grained control. If the user does not specify a fanout mode, the PMD driver will default to PACKET_FANOUT_HASH.

---
v2:
* Renamed the patch
* Replaced packet_fanout argument with fanout_mode, which allows more fine grained control

---
 doc/guides/nics/af_packet.rst             |  4 +-
 drivers/net/af_packet/rte_eth_af_packet.c | 92 ++++++++++++++++++++---
 2 files changed, 83 insertions(+), 13 deletions(-)
doc/guides/nics/af_packet.rst +0 -0
index a343d3a961..3443f95004 100644

doc/guides/nics/af_packet.rst Some of these, in turn, will be used to configure the PACKET_MMAP settings. · line 29

Quoted 5 lines
doc/guides/nics/af_packet.rst +2 -0
@@ -25,6 +25,8 @@ Some of these, in turn, will be used to configure the PACKET_MMAP settings.
 *   ``qpairs`` - number of Rx and Tx queues (optional, default 1);
 *   ``qdisc_bypass`` - set PACKET_QDISC_BYPASS option in AF_PACKET (optional,
     disabled by default);
+*   ``fanout_mode`` - set fanout algorithm. Possible choices: hash,lb,cpu,rollover,rnd,qm (optional,
+    default hash);

Use proper punctuation here, need space after comma.
A description of what the differences are or reference to af-packet man page would help.

	https://www.man7.org/linux/man-pages/man7/packet.7.html

The user should not have to huting to find what "qm" means for example.

Should also address the earlier part in this document that is:
The PACKET_FANOUT_HASH behavior of AF_PACKET is used for frame reception.

Quoted 33 lines
doc/guides/nics/af_packet.rst +1 -1
 *   ``blocksz`` - PACKET_MMAP block size (optional, default 4096);
 *   ``framesz`` - PACKET_MMAP frame size (optional, default 2048B; Note: multiple
     of 16B);
@@ -64,7 +66,7 @@ framecnt=512):
 
 .. code-block:: console
 
-    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0
+    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0,fanout_mode=hash
 
 Features and Limitations
 ------------------------
drivers/net/af_packet/rte_eth_af_packet.c +2 -0
index ceb8d9356a..8449975384 100644
@@ -36,6 +36,7 @@
 #define ETH_AF_PACKET_FRAMESIZE_ARG	"framesz"
 #define ETH_AF_PACKET_FRAMECOUNT_ARG	"framecnt"
 #define ETH_AF_PACKET_QDISC_BYPASS_ARG	"qdisc_bypass"
+#define ETH_AF_PACKET_FANOUT_MODE_ARG	"fanout_mode"
 
 #define DFLT_FRAME_SIZE		(1 << 11)
 #define DFLT_FRAME_COUNT	(1 << 9)
@@ -96,6 +97,7 @@ static const char *valid_arguments[] = {
 	ETH_AF_PACKET_FRAMESIZE_ARG,
 	ETH_AF_PACKET_FRAMECOUNT_ARG,
 	ETH_AF_PACKET_QDISC_BYPASS_ARG,
+	ETH_AF_PACKET_FANOUT_MODE_ARG,
 	NULL
 };
 

drivers/net/af_packet/rte_eth_af_packet.c open_packet_iface(const char *key __rte_unused, · line 705

Quoted 4 lines
drivers/net/af_packet/rte_eth_af_packet.c +1 -0
@@ -700,6 +702,61 @@ open_packet_iface(const char *key __rte_unused,
 	return 0;
 }
 
+#if defined(PACKET_FANOUT)

Since PACKET_FANOUT has existed since Linux 3.1, the #ifdef for this can be removed now.

Quoted 4 lines
drivers/net/af_packet/rte_eth_af_packet.c +4 -0
+#define PACKET_FANOUT_INVALID -1
+
+static int
+get_fanout_group_id(int if_index)

drivers/net/af_packet/rte_eth_af_packet.c open_packet_iface(const char *key __rte_unused, · line 719

Quoted 10 lines
drivers/net/af_packet/rte_eth_af_packet.c +10 -0
+{
+	return (getpid() ^ if_index) & 0xffff;
+}
+
+static int
+get_fanout_mode(const char *fanout_mode)
+{
+	int mode = PACKET_FANOUT_FLAG_DEFRAG;
+
+#if defined(PACKET_FANOUT_FLAG_ROLLOVER)

No more #ifdefs please

Quoted 12 lines
drivers/net/af_packet/rte_eth_af_packet.c +12 -0
+	mode |= PACKET_FANOUT_FLAG_ROLLOVER;
+#endif
+
+	if (!fanout_mode) {
+		/* Default */
+		mode |= PACKET_FANOUT_HASH;
+	} else if (!strcmp(fanout_mode, "hash")) {
+		mode |= PACKET_FANOUT_HASH;
+	} else if (!strcmp(fanout_mode, "lb")) {
+		mode |= PACKET_FANOUT_LB;
+	} else if (!strcmp(fanout_mode, "cpu")) {
+		mode |= PACKET_FANOUT_CPU;

drivers/net/af_packet/rte_eth_af_packet.c open_packet_iface(const char *key __rte_unused, · line 741

Quoted 10 lines
drivers/net/af_packet/rte_eth_af_packet.c +10 -0
+	} else if (!strcmp(fanout_mode, "rollover")) {
+		mode |= PACKET_FANOUT_ROLLOVER;
+	} else if (!strcmp(fanout_mode, "rnd")) {
+		mode |= PACKET_FANOUT_RND;
+	} else if (!strcmp(fanout_mode, "qm")) {
+		mode |= PACKET_FANOUT_QM;
+	} else {
+		/* Invalid Fanout Mode */
+		mode = PACKET_FANOUT_INVALID;
+	}

Maybe allow longer names like "load_balance" or "queue_map"

Quoted 6 lines
drivers/net/af_packet/rte_eth_af_packet.c +6 -0
+
+	return mode;
+}
+
+static int
+get_fanout(const char *fanout_mode, int if_index)

drivers/net/af_packet/rte_eth_af_packet.c open_packet_iface(const char *key __rte_unused, · line 757

Quoted 10 lines
drivers/net/af_packet/rte_eth_af_packet.c +10 -0
+{
+	int group_id = get_fanout_group_id(if_index);
+	int mode = get_fanout_mode(fanout_mode);
+	int fanout = PACKET_FANOUT_INVALID;
+
+	if (mode != PACKET_FANOUT_INVALID)
+		fanout = group_id | (mode << 16);
+
+	return fanout;
+}

This could be simplified as:

static int
get_fanout(const char *fanout_mode, int if_index)

{
	int mode = get_fanout_mode(fanout_mode);
	if (mode != PACKET_FANOUT_INVALID) {
		return get_fanout_group_id(if_index) | (mode << 16);
	else
		return PACKOUT_FANOUT_INVALID;
}
Quoted 15 lines
drivers/net/af_packet/rte_eth_af_packet.c +3 -0
+#endif
+
 static int
 rte_pmd_init_internals(struct rte_vdev_device *dev,
                        const int sockfd,
@@ -709,6 +766,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
                        unsigned int framesize,
                        unsigned int framecnt,
 		       unsigned int qdisc_bypass,
+		       const char *fanout_mode,
                        struct pmd_internals **internals,
                        struct rte_eth_dev **eth_dev,
                        struct rte_kvargs *kvlist)
@@ -810,11 +868,12 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
 	sockaddr.sll_ifindex = (*internals)->if_index;

drivers/net/af_packet/rte_eth_af_packet.c rte_pmd_init_internals(struct rte_vdev_device *dev, · line 873

Quoted 10 lines
drivers/net/af_packet/rte_eth_af_packet.c +3 -5
 
 #if defined(PACKET_FANOUT)
-	fanout_arg = (getpid() ^ (*internals)->if_index) & 0xffff;
-	fanout_arg |= (PACKET_FANOUT_HASH | PACKET_FANOUT_FLAG_DEFRAG) << 16;
-#if defined(PACKET_FANOUT_FLAG_ROLLOVER)
-	fanout_arg |= PACKET_FANOUT_FLAG_ROLLOVER << 16;
-#endif
+	fanout_arg = get_fanout(fanout_mode, (*internals)->if_index);
+
+	if (fanout_arg == PACKET_FANOUT_INVALID) {

Looks better without blank line between get_fanout() and the if() but that is totally a matter of personal taste.

Quoted 3 lines
drivers/net/af_packet/rte_eth_af_packet.c +3 -0
+		PMD_LOG(ERR, "Invalid fanout mode: %s", fanout_mode);
+		goto error;
+	}
#6 lore raw

PATCH v3 1/1 net/af_packet: allow changing fanout mode

In reply to Tudor Cornea

This allows us to control the algorithm used to spread traffic between sockets, adding more fine grained control. If the user does not specify a fanout mode, the PMD driver will default to PACKET_FANOUT_HASH.

---
v3:
* Removed PACKET_FANOUT ifdef. The feature has existed since Linux 3.1
* Removed PACKET_FANOUT_FLAG_ROLLOVER ifdef
* Simplified the get_fanout() function
* Renamed mode variable to load_balance.
I was also thinking of load_balance_mode as an alternative.
* Removed space between get_fanout and following if statement
* Improved documentation. Added link to manual page for PACKET_FANOUT v2:
* Renamed the patch
* Replaced packet_fanout argument with fanout_mode, which allows more fine grained control

---
 doc/guides/nics/af_packet.rst             | 16 +++-
 drivers/net/af_packet/rte_eth_af_packet.c | 89 ++++++++++++++++++-----
 2 files changed, 84 insertions(+), 21 deletions(-)
doc/guides/nics/af_packet.rst +13 -3
index a343d3a961..2ec9e9e674 100644
@@ -13,8 +13,6 @@ PACKET_MMAP, which provides a mmapped ring buffer, shared between user space
 and kernel, that's used to send and receive packets. This helps reducing system
 calls and the copies needed between user space and Kernel.
 
-The PACKET_FANOUT_HASH behavior of AF_PACKET is used for frame reception.
-
 Options and inherent limitations
 --------------------------------
 
@@ -25,11 +23,23 @@ Some of these, in turn, will be used to configure the PACKET_MMAP settings.
 *   ``qpairs`` - number of Rx and Tx queues (optional, default 1);
 *   ``qdisc_bypass`` - set PACKET_QDISC_BYPASS option in AF_PACKET (optional,
     disabled by default);
+*   ``fanout_mode`` - set fanout algorithm.
+    Possible choices: hash, lb, cpu, rollover, rnd, qm (optional, default hash);
 *   ``blocksz`` - PACKET_MMAP block size (optional, default 4096);
 *   ``framesz`` - PACKET_MMAP frame size (optional, default 2048B; Note: multiple
     of 16B);
 *   ``framecnt`` - PACKET_MMAP frame count (optional, default 512).
 
+For details regarding ``fanout_mode`` argument, you can consult the
+`PACKET_FANOUT documentation <https://www.man7.org/linux/man-pages/man7/packet.7.html>`_.
+
+As an example, when ``fanout_mode=cpu`` is selected, the PACKET_FANOUT_CPU
+mode will be set on the sockets, so that on frame reception, the socket
+will be selected based on the CPU on which the packet arrived.
+
+Only one ``fanout_mode`` can be chosen. If left unspecified, the default is to
+use the PACKET_FANOUT_HASH behavior of AF_PACKET for frame reception.
+
 Because this implementation is based on PACKET_MMAP, and PACKET_MMAP has its
 own pre-requisites, it should be noted that the inner workings of PACKET_MMAP
 should be carefully considered before modifying some of these options (namely,
@@ -64,7 +74,7 @@ framecnt=512):
 
 .. code-block:: console
 
-    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0
+    --vdev=eth_af_packet0,iface=tap0,blocksz=4096,framesz=2048,framecnt=512,qpairs=1,qdisc_bypass=0,fanout_mode=hash
 
 Features and Limitations
 ------------------------
drivers/net/af_packet/rte_eth_af_packet.c +71 -18

151 lines not on this page · raw message

Signature · 1 line
2.34.1