dma_intel: fix dsa software fallback 36/42536/3
authorJeff Shaw <jeffrey.b.shaw@intel.com>
Fri, 21 Mar 2025 15:00:17 +0000 (08:00 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 28 Mar 2025 01:09:03 +0000 (01:09 +0000)
commit11621ca68dd4150dfbe042956921ede7cbb33ac8
treea9ed58d73cf1e70b22aaa43bacdd8b1bfdecad30
parent463335f7667f86934320ab51385d31fc86c36caa
dma_intel: fix dsa software fallback

When a page fault occurs, and the "block on fault" flag is not set, the
DSA device reports the error in the completion descriptor and software
should complete the operation in software. This behavior works properly,
except the batch was not added to the list of pending batches, so the
DSA node failed to completely process the batch. The side effect is the
application callback is not called, so buffers are not freed, and the
batch is never added back to the freelist, leading to eventual buffer
exhaustion, and traffic stopping.

The fix is to make sure the batch is added to the list of pending
batches so the DSA node completes the batch. This change also removes
the line that increments the "submitted" counter as that is only used
to count batches that are submitted to hardware. A separate counter,
sw_fallback, is used to count batches that are handled in software.

Type: fix
Change-Id: Ib54e8d77ac02e5dca237bb9348440c3ddaad993b
Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
src/plugins/dma_intel/dsa.c