mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
hyperv/hn: Fix multi-packet RNDIS message aggregation size setting.
Just in case that no chimney sending buffer can be used. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8619
This commit is contained in:
parent
2494d735e2
commit
a4364cfea9
1 changed files with 4 additions and 4 deletions
|
|
@ -706,6 +706,10 @@ hn_set_txagg(struct hn_softc *sc)
|
|||
if (sc->hn_rndis_agg_size < size)
|
||||
size = sc->hn_rndis_agg_size;
|
||||
|
||||
/* NOTE: We only aggregate packets using chimney sending buffers. */
|
||||
if (size > (uint32_t)sc->hn_chim_szmax)
|
||||
size = sc->hn_chim_szmax;
|
||||
|
||||
if (size <= 2 * HN_PKTSIZE_MIN(sc->hn_rndis_agg_align)) {
|
||||
/* Disable */
|
||||
size = 0;
|
||||
|
|
@ -717,10 +721,6 @@ hn_set_txagg(struct hn_softc *sc)
|
|||
if (size > INT_MAX)
|
||||
size = INT_MAX;
|
||||
|
||||
/* NOTE: We only aggregate packets using chimney sending buffers. */
|
||||
if (size > (uint32_t)sc->hn_chim_szmax)
|
||||
size = sc->hn_chim_szmax;
|
||||
|
||||
/*
|
||||
* Setup aggregation packet count.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue