Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163441495
D56479.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56479.id.diff
View Options
diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h
--- a/sys/dev/ena/ena.h
+++ b/sys/dev/ena/ena.h
@@ -99,8 +99,8 @@
* of TCP retransmissions.
*/
#define ENA_TX_BUDGET 128
-/* RX cleanup budget. -1 stands for infinity. */
-#define ENA_RX_BUDGET 256
+/* RX cleanup budget, in descriptors. -1 stands for infinity. */
+#define ENA_RX_DESC_BUDGET 256
/*
* How many times we can repeat cleanup in the io irq handling routine if the
* RX or TX budget was depleted.
diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c
--- a/sys/dev/ena/ena_datapath.c
+++ b/sys/dev/ena/ena_datapath.c
@@ -571,7 +571,7 @@
uint32_t do_if_input = 0;
unsigned int qid;
int rc, i;
- int budget = ENA_RX_BUDGET;
+ int budget = (ENA_RX_DESC_BUDGET == -1) ? INT_MAX : ENA_RX_DESC_BUDGET;
#ifdef DEV_NETMAP
int done;
#endif /* DEV_NETMAP */
@@ -680,7 +680,14 @@
counter_u64_add_protected(rx_ring->rx_stats.cnt, 1);
counter_u64_add_protected(adapter->hw_stats.rx_packets, 1);
counter_exit();
- } while (--budget);
+
+ /*
+ * Adjust our budget; note that we count descriptors, not
+ * packets, since we need to ensure we don't run out of rx
+ * buffers when receiving jumbos.
+ */
+ budget -= ena_rx_ctx.descs;
+ } while (budget > 0);
rx_ring->next_to_clean = next_to_clean;
@@ -695,7 +702,7 @@
tcp_lro_flush_all(&rx_ring->lro);
- return (budget == 0);
+ return (budget <= 0);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 5:52 AM (3 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35432970
Default Alt Text
D56479.id.diff (1 KB)
Attached To
Mode
D56479: ena: Budget rx descriptors, not packets
Attached
Detach File
Event Timeline
Log In to Comment