google / google/gopacket

PF_RING Package Dropped

Open
#1,072 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

am receiving 5 Gigabit network traffic and I would like to process this traffic without data loss. I have tried to process this data with pf_ring in the Go programming language.
I have processed the network traffic with Go pf_ring on the nic card. While processing the data I also captured the traffic with tcpdump. Afterwhile I compared the differences between pf_ring and tcpdump. There were missing data at pf_ring pcap. So I have made some tests and I saw that while processing the network traffic with pf_ring, on average %70 data losses occuring. When I stopped the process at pf_ring data loss dropped to %0. Processing the network traffic even printing causes data loss.
I think this problem occurs due to the pf_ring ring buffer size. How can I increase the ring buffer size? If the cause is different how can I prevent the data loss?

**Case 1 0 drop**
![image](https://user-images.githubusercontent.com/89160550/200583902-b5756aaa-6216-47dc-af86-f5d9459c72a0.png)
![image](https://user-images.githubusercontent.com/89160550/200583936-0e44722e-1aad-4838-825c-a0826fb206e6.png)

**Case 2 A lot of drop packages**
![image](https://user-images.githubusercontent.com/89160550/200584237-3440ddce-885d-448b-a2c2-416601505188.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.