From cede3798b7f3c35cab2a8268c584fd22bf3a34f6 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Tue, 11 Oct 2016 09:30:52 +0000 Subject: Update _slabshr fields when updating HQoS masks Change-Id: Ia1042622c656861a80b856115aeb3c2e5cf5ea2a Signed-off-by: David Hotham --- vnet/vnet/devices/dpdk/cli.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vnet') diff --git a/vnet/vnet/devices/dpdk/cli.c b/vnet/vnet/devices/dpdk/cli.c index fbd1637e654..85c3e8038f3 100644 --- a/vnet/vnet/devices/dpdk/cli.c +++ b/vnet/vnet/devices/dpdk/cli.c @@ -1328,15 +1328,21 @@ set_dpdk_if_hqos_pktfield (vlib_main_t * vm, unformat_input_t * input, case 0: 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); 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); 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); } return 0; -- cgit 1.2.3-korg