summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net.h3
-rw-r--r--net/eth-uclass.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h
index 778acf7da3..aff6674bb3 100644
--- a/include/net.h
+++ b/include/net.h
@@ -44,6 +44,9 @@ struct udevice;
#define PKTALIGN ARCH_DMA_MINALIGN
+/* Number of packets processed together */
+#define ETH_PACKETS_BATCH_RECV 32
+
/* ARP hardware address length */
#define ARP_HLEN 6
/*
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 4424d595f4..e14695c0f1 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -383,7 +383,7 @@ int eth_rx(void)
/* Process up to 32 packets at one time */
flags = ETH_RECV_CHECK_DEVICE;
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < ETH_PACKETS_BATCH_RECV; i++) {
ret = eth_get_ops(current)->recv(current, flags, &packet);
flags = 0;
if (ret > 0)