Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/cxgbe/t4_sched.c
Show First 20 Lines • Show All 897 Lines • ▼ Show 20 Lines | if (cst->ncompl == 0) { | ||||
if (cst->tx_credits == cst->tx_total) { | if (cst->tx_credits == cst->tx_total) { | ||||
cxgbe_snd_tag_free_locked(cst); | cxgbe_snd_tag_free_locked(cst); | ||||
return; /* cst is gone. */ | return; /* cst is gone. */ | ||||
} | } | ||||
send_etid_flush_wr(cst); | send_etid_flush_wr(cst); | ||||
} | } | ||||
mtx_unlock(&cst->lock); | mtx_unlock(&cst->lock); | ||||
} | } | ||||
#define CXGBE_MAX_FLOWS 4000 /* Testing show so far thats all this adapter can do */ | |||||
#define CXGBE_UNIQUE_RATE_COUNT 16 /* Number of unique rates that can be setup */ | |||||
void | |||||
cxgbe_ratelimit_query(struct ifnet *ifp __unused, | |||||
struct if_ratelimit_query_results *q) | |||||
{ | |||||
/* | |||||
* This is a skeleton and needs future work | |||||
* by the driver supporters. It should be | |||||
* enhanced to look at the specific type of | |||||
* interface and select approprate values | |||||
* for these settings. This example goes | |||||
* with an earlier card (t5), it has a maximum | |||||
* number of 16 rates that the first guys in | |||||
* select (thus the flags value RT_IS_SELECTABLE). | |||||
* If it was a fixed table then we would setup a | |||||
* const array (example mlx5). Note the card tested | |||||
* can only support reasonably 4000 flows before | |||||
* the adapter has issues with sending so here | |||||
* we limit the number of flows using hardware | |||||
* pacing to that number, other cards may | |||||
* be able to raise or eliminate this limit. | |||||
*/ | |||||
q->rate_table = NULL; | |||||
q->flags = RT_IS_SELECTABLE; | |||||
q->max_flows = CXGBE_MAX_FLOWS; | |||||
q->number_of_rates = CXGBE_UNIQUE_RATE_COUNT; | |||||
q->min_segment_burst = 4; /* Driver emits 4 in a burst */ | |||||
} | |||||
#endif | #endif |