If the NIC uses MSI interrupts, the interrupt numbers can be found under the sysfs mount-point, for example /sys/class/net/\<nic\>/device/msi_irqs/. Also proc/interrupts can be used to determine the interrupt numbers.
For possible kernel threads handling the interrupts, they can be listed with ps axo pid,command | grep [i]rq/<irq number>-.
Example showing the irqs used by enp7s0 interface, and the process handling the 1st irq:
ls /sys/class/net/enp7s0/device/msi_irqs/
40 41 42 43 44
cat /proc/interrupts | grep enp7s0
ps axo pid,command | grep [i]rq/40-
905 [irq/40-enp7s0]
The taskset utility can be used to pin the threads to specific CPU core(s): sudo taskset -p <cpu core mask> <pid>
The interrupts can be pinned by writing the CPU core mask to /proc/irq/<irq number>/smp_affinity: echo <cpu core mask> | sudo tee /proc/irq/<irq>/smp_affinity
For pinning the task and the interrupt to the 11th CPU core:
sudo taskset -p 0x400 905
echo 400 | sudo tee /proc/irq/40/smp_affinity
The above must be repeated for any possible redundant process bus.