aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/cli.c6
-rw-r--r--src/plugins/dpdk/hqos/hqos.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c
index 2eaf17e55a5..08bf0c94b53 100644
--- a/src/plugins/dpdk/device/cli.c
+++ b/src/plugins/dpdk/device/cli.c
@@ -1323,20 +1323,20 @@ set_dpdk_if_hqos_pktfield (vlib_main_t * vm, unformat_input_t * input,
xd->hqos_wt[worker_thread_first + i].hqos_field0_slabpos = offset;
xd->hqos_wt[worker_thread_first + i].hqos_field0_slabmask = mask;
xd->hqos_wt[worker_thread_first + i].hqos_field0_slabshr =
- __builtin_ctzll (mask);
+ count_trailing_zeros (mask);
break;
case 1:
xd->hqos_wt[worker_thread_first + i].hqos_field1_slabpos = offset;
xd->hqos_wt[worker_thread_first + i].hqos_field1_slabmask = mask;
xd->hqos_wt[worker_thread_first + i].hqos_field1_slabshr =
- __builtin_ctzll (mask);
+ count_trailing_zeros (mask);
break;
case 2:
default:
xd->hqos_wt[worker_thread_first + i].hqos_field2_slabpos = offset;
xd->hqos_wt[worker_thread_first + i].hqos_field2_slabmask = mask;
xd->hqos_wt[worker_thread_first + i].hqos_field2_slabshr =
- __builtin_ctzll (mask);
+ count_trailing_zeros (mask);
}
done:
diff --git a/src/plugins/dpdk/hqos/hqos.c b/src/plugins/dpdk/hqos/hqos.c
index c9b85652863..123ecbab0d3 100644
--- a/src/plugins/dpdk/hqos/hqos.c
+++ b/src/plugins/dpdk/hqos/hqos.c
@@ -168,8 +168,8 @@ int
dpdk_hqos_validate_mask (u64 mask, u32 n)
{
int count = __builtin_popcountll (mask);
- int pos_lead = sizeof (u64) * 8 - __builtin_clzll (mask);
- int pos_trail = __builtin_ctzll (mask);
+ int pos_lead = sizeof (u64) * 8 - count_leading_zeros (mask);
+ int pos_trail = count_trailing_zeros (mask);
int count_expected = __builtin_popcount (n - 1);
/* Handle the exceptions */
@@ -363,15 +363,15 @@ dpdk_port_setup_hqos (dpdk_device_t * xd, dpdk_device_config_hqos_t * hqos)
xd->hqos_wt[tid].hqos_field0_slabpos = hqos->pktfield0_slabpos;
xd->hqos_wt[tid].hqos_field0_slabmask = hqos->pktfield0_slabmask;
xd->hqos_wt[tid].hqos_field0_slabshr =
- __builtin_ctzll (hqos->pktfield0_slabmask);
+ count_trailing_zeros (hqos->pktfield0_slabmask);
xd->hqos_wt[tid].hqos_field1_slabpos = hqos->pktfield1_slabpos;
xd->hqos_wt[tid].hqos_field1_slabmask = hqos->pktfield1_slabmask;
xd->hqos_wt[tid].hqos_field1_slabshr =
- __builtin_ctzll (hqos->pktfield1_slabmask);
+ count_trailing_zeros (hqos->pktfield1_slabmask);
xd->hqos_wt[tid].hqos_field2_slabpos = hqos->pktfield2_slabpos;
xd->hqos_wt[tid].hqos_field2_slabmask = hqos->pktfield2_slabmask;
xd->hqos_wt[tid].hqos_field2_slabshr =
- __builtin_ctzll (hqos->pktfield2_slabmask);
+ count_trailing_zeros (hqos->pktfield2_slabmask);
memcpy (xd->hqos_wt[tid].hqos_tc_table, hqos->tc_table,
sizeof (hqos->tc_table));
}