Xilinx-CNS / solarcapture

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

`capture_cores=-1,-1` does not create multiple capture threads #13

Closed stolyaroleh closed 1 month ago

stolyaroleh commented 1 month ago

Section 8.8 of SolarCapture manual contains the following:

• Create 2 capture threads, not affinitized to any particular CPU core: capture_cores=‐1,‐1

However, get_thrd function will return the same thread twice here, resulting in two vi's created on the same thread.

Is this expected? Would you accept a PR with a fix, if not?

abrunnin-xilinx commented 1 month ago

Absolutely willing to accept a PR. I do agree it seems that get_thrd only creates a new thread if the name has changed, and the core-id overrides the name.

abrunnin-xilinx commented 1 month ago

13.txt simplest possible patch to address this. Though what's people's expectations of specifying capture_cores="2,3,2,5" - do you expect it to act as a set of cores (i.e. use cores 2 3 and 5) or to explicitly specify create a thread on core a, n core b, on core c... ?

abrunnin-xilinx commented 1 month ago

I didn't see a PR from you, so implemented this with e185a38be5b0d844f718da7ba5028a8683794934