From 4cbc8b20c78cbc2b8037f97078106e5e1a31a637 Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Tue, 30 Aug 2022 14:33:02 +0800 Subject: dma_intel: fix the wrong unformat type The unformat type for "%d" should be u32 or int, otherwise the 'did' in high stack address will be overflow to zero by the 'qid' which is in the low stack address. Like input "dev wq3.2" will return "did=0, qid=2". Type: fix Signed-off-by: Haiyue Wang Change-Id: I0fe1d5b03e2c47e0a7925193e2c2f1ccc31d3e90 --- src/plugins/dma_intel/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/dma_intel/main.c b/src/plugins/dma_intel/main.c index 4e9df04ea9e..0f9ac185b9d 100644 --- a/src/plugins/dma_intel/main.c +++ b/src/plugins/dma_intel/main.c @@ -222,7 +222,7 @@ dsa_config (vlib_main_t *vm, unformat_input_t *input) { clib_error_t *error = 0; intel_dsa_channel_t *ch; - u8 did, qid; + u32 did, qid; if (intel_dsa_main.lock == 0) clib_spinlock_init (&(intel_dsa_main.lock)); -- cgit 1.2.3-korg