mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Tuning for small packet handling
- Double the number of descriptors that a single call to send can use - Quadruple the number of descriptors that can be reclaimed per pass - only run reclaim twice per second - increase coalesce timer from 3.5us to 5us fix printf warning on 64-bit platforms
This commit is contained in:
parent
5dfb4c0b24
commit
04ad339002
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170038
@ -54,7 +54,7 @@ struct sge_rspq;
|
||||
|
||||
|
||||
#define m_get_priority(m) ((uintptr_t)(m)->m_pkthdr.rcvif)
|
||||
#define m_set_priority(m, pri) ((m)->m_pkthdr.rcvif = (struct ifnet *)(pri))
|
||||
#define m_set_priority(m, pri) ((m)->m_pkthdr.rcvif = (struct ifnet *)((uintptr_t)pri))
|
||||
|
||||
#if __FreeBSD_version > 700030
|
||||
#define INTR_FILTERS
|
||||
@ -95,9 +95,9 @@ struct sge_rspq;
|
||||
#define TX_MAX_SIZE (1 << 16) /* 64KB */
|
||||
#define TX_MAX_SEGS 36 /* maximum supported by card */
|
||||
#define TX_MAX_DESC 4 /* max descriptors per packet */
|
||||
#define TX_START_MAX_DESC (TX_MAX_DESC << 1) /* maximum number of descriptors
|
||||
#define TX_START_MAX_DESC (TX_MAX_DESC << 2) /* maximum number of descriptors
|
||||
* call to start used per */
|
||||
#define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 2) /* maximum tx descriptors
|
||||
#define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 4) /* maximum tx descriptors
|
||||
* to clean per iteration */
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ static int recycle_enable = 1;
|
||||
* Period of the Tx buffer reclaim timer. This timer does not need to run
|
||||
* frequently as Tx buffers are usually reclaimed by new Tx packets.
|
||||
*/
|
||||
#define TX_RECLAIM_PERIOD (hz >> 2)
|
||||
#define TX_RECLAIM_PERIOD (hz >> 1)
|
||||
|
||||
/*
|
||||
* work request size in bytes
|
||||
@ -362,10 +362,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p)
|
||||
|
||||
q->polling = adap->params.rev > 0;
|
||||
|
||||
if (adap->flags & USING_MSIX)
|
||||
q->coalesce_nsecs = 6000;
|
||||
else
|
||||
q->coalesce_nsecs = 3500;
|
||||
q->coalesce_nsecs = 5000;
|
||||
|
||||
q->rspq_size = RSPQ_Q_SIZE;
|
||||
q->fl_size = FL_Q_SIZE;
|
||||
@ -1596,7 +1593,7 @@ free_tx_desc(adapter_t *sc, struct sge_txq *q, int n, struct mbuf **m_vec)
|
||||
d->m = NULL;
|
||||
nbufs++;
|
||||
} else {
|
||||
printf("pri=%d cidx=%d\n", m_get_priority(d->m), cidx);
|
||||
printf("pri=%d cidx=%d\n", (int)m_get_priority(d->m), cidx);
|
||||
}
|
||||
}
|
||||
++d;
|
||||
|
Loading…
Reference in New Issue
Block a user