sonic-buildimage
sonic-buildimage copied to clipboard
[Marvell-armhf] Fix SDK DMA allocation failure
Why I did it
Fix DMA memory allocation failure seen when SDK drivers where failed to find size aligned memory.
pci 0000:01:00.0: dma_alloc_coherent failed to allocate aligned size of 0x200000 for phys0xbf300000
Work item tracking
- Microsoft ADO (number only):
How I did it
- Fix DMA driver alloc failure by adding more retries and moving the free for unaligned allocation to the end of allocation logic.
- Increase CMA memory to 32MB to allow for more retries.
How to verify it
Run SONIC PTF with fixes for armhf-nokia_ixs7215_52x-r0 platform.
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
- [ ] 202305
- [x] 202405
Tested branch (Please provide the tested image version)
- [ ]
- [ ]
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)
@Blueve @Pavan-Nokia Please review
@pavannaregundi please help update sonic-mgmt test id for above change
@pavannaregundi please help update sonic-mgmt test id for above change
@Blueve We have used following sonic-mgmt commit id to test this.
commit d0c4549ed4448cada922345c8a028eb8b476daf2 (HEAD -> new_commit, origin/master, origin/HEAD, master)
Author: Bobby McGonigle <[email protected]>
Date: Wed Aug 7 23:12:15 2024 -0700
Hi Jing, below if the kusto test upload ID d974dd9a-93a8-47f0-ba89-b5ac48c56832 - Mx 5a0fcfca-3fae-4205-a436-8ccd09719c10 - M0
@Pavan-Nokia should following lines use continue instead?
I didn't get how the retry works
https://github.com/Marvell-switching/mrvl-prestera/compare/36fa3a3f4e317d8c0c111cc74aafffce12e1546d...9608c8c41e462998cd144ed34780e34f1b48e081#diff-d81733e3ed589ee79a5a8edab98acbe7c2cf441a2cb8b8d7381acf179403b372R397
https://github.com/Marvell-switching/mrvl-prestera/compare/36fa3a3f4e317d8c0c111cc74aafffce12e1546d...9608c8c41e462998cd144ed34780e34f1b48e081#diff-d81733e3ed589ee79a5a8edab98acbe7c2cf441a2cb8b8d7381acf179403b372R397
@Pavan-Nokia should following lines use
continueinstead? I didn't get how the retry works
@Blueve Logic checks to find for aligned memory allocation as per the size of the request. If a non-aligned memory is found it stores them in array named non_aligned_dma_arr. If an aligned memory is found, at any stage it breaks out of loop. At the end frees the non_aligned_dma_arr.
ADO: 30148643
/azpw ms_conflict -f
/azpw ms_conflict
Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-buildimage/pull/20781