Mellanox / libvma

Linux user space library for network socket acceleration based on RDMA compatible network adaptors
https://www.mellanox.com/products/software/accelerator-software/vma?mtag=vma
Other
557 stars 152 forks source link

issue: 3525812 Fix buffer leak socketextreme #1034

Closed iftahl closed 12 months ago

iftahl commented 1 year ago

In reclaim buffer api - vma_socketxtreme_free_vma_packets we use reclaim_recv_buffers method which uses try_lock on the ring, but in case the lock has failed - buffers will not be returned. The fix - in case the ring is locked - reclaim buffers to the global pool.

Change type

What kind of change does this PR introduce?

Check list

iftahl commented 1 year ago

@AlexanderGrissik i wonder whats best: option 1:

  1. try_lock on ring
  2. in case failed - spin_lock on global pool option 2: just spin_lock on ring
AlexanderGrissik commented 12 months ago

I guess global pool is better because if the ring is taken then less chances that the global pool is taken as well.