Xilinx-CNS / solarcapture

SolarCapture network packet capture suite
Other
13 stars 8 forks source link

Improve 'card unable to map more buffers' error #6

Open abrunnin-xilinx opened 6 months ago

abrunnin-xilinx commented 6 months ago

SolarCapture is set up to assume, by default, a single capture point. As soon as you go beyond that, it's mapping more pages than the card can handle, if 4k pages are used. Setting SolarCapture to use huge pages will resolve this - but the error message to tell users this is unhelpful.

Current error message:

sc_pkt_pool_blob_dma_map: WARN: ef_memreg_alloc failed (rc=-28 errno=28 intf=enp5s0f0/enp5s0f0 len=0x1984800 map_len=0x10000 ERROR: errno=28 from core/sc_pkt_pool.c:810 in sc_pkt_pool_blob_add(): sc_pkt_pool_blob_add: ERROR: p0 failed to DMA map (buf_size=1792 n=131072 inline=1 huge=1,0 netifs=1) sc_pkt_pool_blob_add: ERROR: p0 failed to DMA map (buf_size=1792 n=131072 inline=1 huge=1,0 netifs=1)

The "huge=..." tells us whether huge pages are permitted and used (yes and no) - so I propose:

  1. Make "request_huge_pages" be the default.
  2. In the case of error 28 from memreg_alloc, we report that the card was unable to map this many pages, and if huge pages were not used for this request, propose require_huge_pages.