<p>You don't say which Operating System or CPU.  It doesn't matter whether you choose libpcap or not, the underlying network performance is still burdened by the Operating System Memory Management and its network driver.  libpcap has kept up with the paces and can handle 10Gbps, but there's more.</p>

<p>If you want the best CPU so that you can do number-crunching, running virtual machines and while capturing packets, go with AMD Opteron CPU which still outperforms Intel Xeon Quadcore 5540 2.53GHz (despite Intel's XIO/DDIO introduction and mostly because of Intel dual-core sharing of same L2 cache).  For best ready-made OS, go with latest FreeBSD as-is (which still outperforms Linux 3.10 networking using basic hardware.)  Otherwise, Intel and Linux will works just fine for basic drop-free 10Gbps capture, provided you are eager to roll up your sleeves.</p>

<p>If you're pushing for breakneck speed all the time while doing financial-like or stochastic or large matrix predictive computational crunching (or something), then read-on...</p>

<p>As RedHat have <a href="http://people.netfilter.org/hawk/presentations/nfws2014/dp-accel-10G-challenge.pdf" rel="nofollow noreferrer">discovered</a>, 67.2 nanosecond is what it takes to process one minimal-sized packet at 10Gbps rate.  I assert it's closer to 81.6 nanosecond for 64 byte Ethernet payload but they are talking 46-byte minimal as a theoretical.</p>

<p>To cut it short, you WON'T be able to DO or USE any of the following if you want 0% packet drop at full-rate by staying under 81.6 ns for each packet:</p>

<ul>
<li>Make an SKB call for each packet (to minimize that overhead, amortized this over several 100s of packets)  </li>
<li>TLB (Translation lookaside buffer, to avoid that, use HUGE page allocations)  </li>
<li>Short latency (you did say 'capture', so latency is irrelevant here).  It's called Interrupt Coalesce
(<code>ethtool -C rx-frames 1024+</code>).  </li>
<li>Float processes across multi-CPU (must lock them down, one per network interface interrupt)</li>
<li>libc <code>malloc()</code>  (must replace it with a faster one, preferably HUGE-based one)</li>
</ul>

<p>So, Linux has an edge over FreeBSD to capture the 10Gbps rate in 0% drop rate AND run several virtual machines (and other overheads).  Just that it requires a new memory management (MM) of some sort for a specific network device and not necessarily the whole operating system.  Most new super-high-performance network driver are now making devices use HUGE memory that were allocated at userland then using driver calls to pass a bundle of packets at a time.</p>

<p>Many new network-driver having repurposed MM are out (in no particular order):</p>

<ul>
<li>netmap</li>
<li>PF-RING</li>
<li>PF-RING+netmap</li>
<li>OpenOnload</li>
<li>DPDK</li>
<li>PacketShader</li>
</ul>

<p>The maturity level of each code is highly dependent on which Linux (or distro) version you choose. I've tried a few of them and once I understood the basic design, it became apparent what I needed.  YMMV.</p>

<p>Updated: White paper on high speed packet architecture: <a href="https://arxiv.org/pdf/1901.10664.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1901.10664.pdf</a> </p>

<p>Good luck.</p>
libpcap to capture 10 Gbps NIC
<p>I want to capture packets from 10Gbps network card with 0 packet loss.
I am using lipcap for 100Mbps NIC and it is working fine.
Will libpcap be able to handle 10Gbps NIC traffic?
If not what are the other alternative ways to achive this?</p>