The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=c81f8c26115a64b9a97ecdb2a64e824dd839ee73
commit c81f8c26115a64b9a97ecdb2a64e824dd839ee73 Author: Artur Rojek <[email protected]> AuthorDate: 2021-08-12 08:34:17 +0000 Commit: Marcin Wojtas <[email protected]> CommitDate: 2021-09-01 23:05:38 +0000 ena: Avoid unnecessary mbuf collapses for LLQ condition In case of Low-latency Queue, one small enough descriptor can be pushed directly to the ENA hw, thus saving one fragment. Check for this condition before performing collapse. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_datapath.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 15bd09c489cf..c0066b1209cc 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -801,6 +801,11 @@ ena_check_and_collapse_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) /* One segment must be reserved for configuration descriptor. */ if (num_frags < adapter->max_tx_sgl_size) return (0); + + if ((num_frags == adapter->max_tx_sgl_size) && + ((*mbuf)->m_pkthdr.len < tx_ring->tx_max_header_size)) + return (0); + counter_u64_add(tx_ring->tx_stats.collapse, 1); collapsed_mbuf = m_collapse(*mbuf, M_NOWAIT, _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "[email protected]"
