git: 7bb73f731538 - main - cxgb: use rounddown_pow_of_two
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Jun 2024 07:27:54 UTC
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7bb73f7315380f7315505176d3855884c11ae490 commit 7bb73f7315380f7315505176d3855884c11ae490 Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2024-06-24 07:17:02 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2024-06-24 07:17:02 +0000 cxgb: use rounddown_pow_of_two In two places, use the rounddown_pow_of_two macro in place of expressions. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/cxgb/cxgb_sge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 0c5be9dd6614..a2b3918032bb 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -553,7 +553,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) nqsets *= adap->params.nports; fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE); - fl_q_size = 1 << ilog2(fl_q_size); + fl_q_size = rounddown_pow_of_two(fl_q_size); use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : is_offload(adap); @@ -565,7 +565,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM9BYTES; } - jumbo_q_size = 1 << ilog2(jumbo_q_size); + jumbo_q_size = rounddown_pow_of_two(jumbo_q_size); if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) device_printf(adap->dev,