Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169687960
D30155.id88897.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
D30155.id88897.diff
View Options
Index: sys/dev/ixgbe/if_ix.c
===================================================================
--- sys/dev/ixgbe/if_ix.c
+++ sys/dev/ixgbe/if_ix.c
@@ -450,6 +450,7 @@
txr->tx_base = (union ixgbe_adv_tx_desc *)vaddrs[i];
txr->tx_paddr = paddrs[i];
+ txr->packets = 0;
txr->bytes = 0;
txr->total_packets = 0;
@@ -2113,8 +2114,10 @@
static inline void
ixgbe_perform_aim(struct adapter *adapter, struct ix_rx_queue *que)
{
- uint32_t newitr = 0;
+ struct ix_tx_queue *txq = &adapter->tx_queues[que->msix];
+ struct tx_ring *txr = &txq->txr;
struct rx_ring *rxr = &que->rxr;
+ uint32_t newitr = 0;
/*
* Do Adaptive Interrupt Moderation:
@@ -2129,12 +2132,14 @@
que->eitr_setting = 0;
/* Idle, do nothing */
- if (rxr->bytes == 0) {
+ if ((txr->bytes == 0) && (rxr->bytes == 0)) {
return;
}
+ if ((txr->bytes) && (txr->packets))
+ newitr = txr->bytes / txr->packets;
if ((rxr->bytes) && (rxr->packets)) {
- newitr = (rxr->bytes / rxr->packets);
+ newitr = max(newitr, rxr->bytes / rxr->packets);
}
newitr += 24; /* account for hardware frame, crc */
@@ -2158,10 +2163,10 @@
que->eitr_setting = newitr;
/* Reset state */
+ txr->bytes = 0;
+ txr->packets = 0;
rxr->bytes = 0;
rxr->packets = 0;
-
- return;
}
/*********************************************************************
Index: sys/dev/ixgbe/ix_txrx.c
===================================================================
--- sys/dev/ixgbe/ix_txrx.c
+++ sys/dev/ixgbe/ix_txrx.c
@@ -238,6 +238,7 @@
}
txd->read.cmd_type_len |= htole32(IXGBE_TXD_CMD_EOP | flags);
+ ++txr->packets;
txr->bytes += pi->ipi_len;
pi->ipi_new_pidx = i;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 3, 7:21 AM (18 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38079412
Default Alt Text
D30155.id88897.diff (1 KB)
Attached To
Mode
D30155: ixgbe: Bring back accounting for tx in AIM
Attached
Detach File
Event Timeline
Log In to Comment