You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was developing a simulator for a sensor that I am working with. I already had it made Linux. I was using AF_PACKET socket and I was able to achieve 10Gbps data transmission. I started with the same approach on windows I was using Winsock but then I realised they don't allow me to create AF_PACKET socket. The sensor output is a custom ethernet II packet. which I cannot share. I am sending Jumbo packets. I cannot share my code also. But I can share the code that I used to benchmark pcap. Please tell me is there anything I can do to increase the data rate. I am not that familiar with windows so if I can change something in windows settings that can help boostup the datarate, share that also. The base data rate I am able to acheive with this is 5476.43 Mbps. The server I am testing this in has close to 400GB ram and 48 CPU cores. I don't care about efficiency I just need the best datarate.
Your timer is measuring the time it took you to create and destroy the packet queue, not only how long it took to send. Move the start and end times to just before and just after the call to pcap_sendqueue_transmit() for a more accurate measurement. With so many cores available, you will likely get higher throughput if you have separate threads for creating and sending the packets, otherwise the packets will transmit in a burst, followed by a wait for the next batch of packets to be queued.
Also, if you are not intending on capturing any of these packets on the same handle, set a buffer size of 0 to avoid doing any work related to queueing packets for capture.
I was developing a simulator for a sensor that I am working with. I already had it made Linux. I was using AF_PACKET socket and I was able to achieve 10Gbps data transmission. I started with the same approach on windows I was using Winsock but then I realised they don't allow me to create AF_PACKET socket. The sensor output is a custom ethernet II packet. which I cannot share. I am sending Jumbo packets. I cannot share my code also. But I can share the code that I used to benchmark pcap. Please tell me is there anything I can do to increase the data rate. I am not that familiar with windows so if I can change something in windows settings that can help boostup the datarate, share that also. The base data rate I am able to acheive with this is 5476.43 Mbps. The server I am testing this in has close to 400GB ram and 48 CPU cores. I don't care about efficiency I just need the best datarate.
#include <pcap.h>
#include
#include
#include
void sendLargePackets(const uint8_t* interfaceMAC, const char* interfaceName) {
char errbuf[PCAP_ERRBUF_SIZE];
}
int main() {
uint8_t interfaceMAC[6] = {0x00, 0x0c, 0x29, 0x4f, 0x8e, 0x35}
char interfaceName[256] = "\Device\NPF_{random}";
}
The text was updated successfully, but these errors were encountered: