<html><body bgcolor="#FFFFFF"><span class="Apple-style-span" style="font-size: 15px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><br>
<font size="2" face="Calibri">There is still the question about packets loss.</font><br><font size="2" face="Calibri"> </font> <br><font size="2" face="Calibri">According to the essay ' </font><font size="2" face="宋体">Profiling and Optimization of Software-Based Network-Analysis Applications</font><font size="2" face="Calibri">' , every packet is copied twice in the main memory before reaching the user. In order to reduce the cost of CPU and the bus occupying of the SDRAM of pc, is it possible to copy data directly from the kernel buffer to the final buffer , which I want the date kept in ? </font><br>
<font size="2" face="Calibri"> </font> <br><font size="2" face="Calibri">Here is another idea --- </font><font size="2" face="宋体"> allocate several different user buffers , once </font><font size="2" face="Calibri">a </font><font size="2" face="宋体">user buffer is fulled , then let the next user buffer to save the </font><font size="2" face="Calibri">new</font><font size="2" face="宋体"> datas from kernel buffer. Meanwhile copy datas from the first user buffer to disk (assume that the hard disk write rate is fast enough).</font><font size="2" face="Calibri"> Is this idea work with the winpcap ?</font> <br>
<font size="2" face="Calibri"> </font> <br><font size="2" face="Calibri"> </font> <br><font size="2" face="Calibri">Thank you!</font> <br><font size="2" face="Calibri"> </font> <br><font size="2" face="Calibri">==============================================================</font> <br>
<font size="2" face="Calibri"> </font> <br><font size="2" face="宋体">Q1: tough question to answer, as it depends on a number of factors. What is the average packet size? Are you just counting the packets, or dumping them to disk/DB/...? Do you see packet drops in the pcap_stats?<br>
Q2: I will need to run some tests on this. Do you have some minimal sample code that shows the issue?<br>Q3: Yes, *if* the NIC (and NIC driver) are not dropping packets themselves. <br><br>Did you disable any protocol bound to the NIC where you receive all these packets?<br>
<br>Have a nice day<br>GV<br><br><br><br><br>From: yulou liu <br>Sent: Wednesday, August 25, 2010 11:08 AM<br>To: winpcap <br>Subject: [Winpcap-users] About the packets loss , what is the bottleneck ?<br><br><br>I'm using winpcap to capture datas from FPGA board via 1G Ethernet connection(directly connected).<br>
the FPGA is configed to send data at a special rate. With the fpga sending rate increases,especially above 500Mbps, it sometimes loss packets. <br><br>Q1: Is it possible to totally avoid packets loss by optimism the code? I want to collect datas at speed 614Mbps without packet loss (collecting all datas <br>
<br>last about 1 minutes). My workstations features with 2 Xeon CPU (each has 4core), DDR3 SDRAM, 1 G onboard netcard. Which part is the most probably bottleneck ?<br><br>Q2: As a test , I found the pcap_next_ex() can't get any packets when the user buffer is set over 64 MB, what does it happen ?<br>
<br>Q3: if the Kernel buffer's size is 16MB , then the first 16Mb packets from fpga won't be lost, so , if I set the kernel buffer as 128MB , then at least <br><br>the first coming 128MB data from FPGA won't be lost either ? but I found When I set the kernel buffer bigger than 100 MB, the packets drops is getting <br>
<br>worse. <br><br><br>Thanks a lot!<br></font><br><font size="2" face="sans-serif"><br></font><pre><span class="Apple-style-span" style="font-family: Helvetica; white-space: normal;"><br></span></pre></span><div></div></body></html>