Enable prefetching of descriptors on the TX ring, using the same
values as in the Intel driver 3.8.21 for linux. The fact that it is standard in the above driver suggests that it has no bad side effects. But of course there must be a reason for enabling features, not just "it does not harm", so here it is a good one: Prefetching enables full line rate even using a single queue (14.88 Mpps, compared to ~12 Mpps without prefetch). This in turn is terribly useful when one wants to schedule traffic. For obvious reasons the difference is only visible with netmap or other high speed solutions, but presumably the advantage should be in the order of a fraction of a microsecond when starting transmission on an empty queue. Discussed with Jack Vogel. MFC after: 1 week
This commit is contained in:
parent
1375476586
commit
aa15c59eb1
@ -1143,6 +1143,14 @@ ixgbe_init_locked(struct adapter *adapter)
|
||||
txdctl |= IXGBE_TXDCTL_ENABLE;
|
||||
/* Set WTHRESH to 8, burst writeback */
|
||||
txdctl |= (8 << 16);
|
||||
/*
|
||||
* When the internal queue falls below PTHRESH (32),
|
||||
* start prefetching as long as there are at least
|
||||
* HTHRESH (1) buffers ready. The values are taken
|
||||
* from the Intel linux driver 3.8.21.
|
||||
* Prefetching enables tx line rate even with 1 queue.
|
||||
*/
|
||||
txdctl |= (16 << 0) | (1 << 8);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user