<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=utf-8 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16625"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>The copies are the following ones:</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>1. from the NIC driver buffers to the WinPcap kernel
buffer (1st copy)</FONT></DIV>
<DIV><FONT face=Calibri>2. from the kernel buffer to the user buffer (buffer
allocated inside wpcap.dll) (2nd copy)</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>If you copy the packets received from pcap_next_ex (or
any other pcap receive function) to your own application buffer, that would be a
3rd copy.</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT size=3 face=Calibri></FONT><FONT size=3
face=Calibri></FONT><FONT size=3 face=Calibri></FONT><FONT size=3
face=Calibri></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma"><FONT size=3 face=Calibri>GV</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma"> </DIV>
<DIV style="FONT: 10pt Tahoma"><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=liu.yulou@zte.com.cn
href="mailto:liu.yulou@zte.com.cn">liu.yulou@zte.com.cn</A> </DIV>
<DIV><B>Sent:</B> Sunday, September 26, 2010 10:49 PM</DIV>
<DIV><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Winpcap-users] About the packets loss ,what is the
bottleneck ?</DIV></DIV></DIV>
<DIV><FONT face=Calibri></FONT><FONT face=Calibri></FONT><BR></DIV><BR><FONT
size=2 face=sans-serif>GV> Not at the moment with WinPcap. Having said that,
I've used this double copy mechanism to bring several Gbps's to user mode
without any packet loss (not with WinPcap, with custom hardware. However the
buffering mechanism was the same).</FONT> <BR><BR><FONT size=2
face=sans-serif>YL> 'double copy mechanism' , Data copy from the
user buffer to application(user mode) is the third copy ? </FONT>
<BR><BR><BR><BR><BR><BR><FONT size=2 face=sans-serif>GV>Are you dumping the
packets to disk? If so, have you measured the dump-to-disk bandwidth?
</FONT><BR><BR><FONT size=2 face=sans-serif>YL> Yes, Dumping packets
to disk is my final goal. But right now , To avoid the limitation of
the disk write speed , I just count the packets number in the receive
thread. But on the rate of 614 Mbps, sometimes
there are still packets loss. </FONT><BR><BR><FONT size=2
face=sans-serif>PS. The route of packets transfer is : FPGA
BOARD sends data through ether net --> PC'S net card -->
winpcap kernel buffer --> winpcap user buffer -->
receive thread count . The FPGA's sending packets rate is about 614
Mbps , the size of each packet is 1460 bytes, every packet
has a sequence number , the sending process's starting and
stopping can be controlled . </FONT> <BR><BR><FONT
size=2 face=sans-serif>The app that I make only counts the packet's number
when a packet comes without saving . While the last packet
comes , the app will compare the number (it counts by itself) with
the sequence number (of the last packet). Then I will know if there is
packets loss. </FONT><BR><BR><BR><BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="35%"><FONT size=1 face=sans-serif><B>"Gianluca Varenni"
<gianluca.varenni@cacetech.com></B> </FONT><BR><FONT size=1
face=sans-serif>发件人: winpcap-users-bounces@winpcap.org</FONT>
<P><FONT size=1 face=sans-serif>2010-09-21 07:41</FONT>
<TABLE border=1>
<TBODY>
<TR vAlign=top>
<TD bgColor=white>
<DIV align=center><FONT size=1 face=sans-serif>请答复
给<BR>winpcap-users@winpcap.org</FONT></DIV></TD></TR></TBODY></TABLE><BR></P>
<TD width="64%">
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<DIV align=right><FONT size=1 face=sans-serif>收件人</FONT></DIV>
<TD><FONT size=1
face=sans-serif><winpcap-users@winpcap.org></FONT>
<TR vAlign=top>
<TD>
<DIV align=right><FONT size=1 face=sans-serif>抄送</FONT></DIV>
<TD>
<TR vAlign=top>
<TD>
<DIV align=right><FONT size=1 face=sans-serif>主题</FONT></DIV>
<TD><FONT size=1 face=sans-serif>Re: [Winpcap-users] About the
packets loss , what is the bottleneck
?</FONT></TD></TR></TBODY></TABLE><BR>
<TABLE>
<TBODY>
<TR vAlign=top>
<TD>
<TD></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE><BR><BR><BR><FONT
size=3> </FONT> <BR><BR><FONT size=3><B>From:</B> </FONT><A
href="mailto:lyulou@gmail.com"><FONT color=blue size=3><U>yulou
liu</U></FONT></A><FONT size=3> </FONT><BR><FONT size=3><B>Sent:</B> Sunday,
September 19, 2010 12:50 AM</FONT> <BR><FONT size=3><B>To:</B> </FONT><A
href="mailto:winpcap-users@winpcap.org"><FONT color=blue
size=3><U>winpcap-users@winpcap.org</U></FONT></A><FONT size=3> </FONT><BR><FONT
size=3><B>Subject:</B> [Winpcap-users] About the packets loss , what is the
bottleneck ?</FONT> <BR><BR><FONT size=2 face=Calibri><BR>There is still the
question about packets loss.<BR>Â </FONT><FONT size=2>Â </FONT><FONT size=2
face=Calibri><BR>According to the essay ' </FONT><FONT size=2>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> </FONT> <BR><FONT
size=2 face=Calibri>GV> Not at the moment with WinPcap. Having said that,
I've used this double copy mechanism to bring several Gbps's to user mode
without any packet loss (not with WinPcap, with custom hardware. However the
buffering mechanism was the same).</FONT> <BR><FONT size=2 face=Calibri><BR>Â
</FONT><FONT size=2>Â </FONT><FONT size=2 face=Calibri><BR>Here is another idea
---Â </FONT><FONT size=2>Â allocate several different user buffers , onceÂ
</FONT><FONT size=2 face=Calibri>a </FONT><FONT size=2>user buffer is fulled ,
then let the next user buffer to save the </FONT><FONT size=2
face=Calibri>new</FONT><FONT size=2> 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><FONT size=2>Â </FONT><BR><FONT size=2> </FONT>
<BR><FONT size=3 face=Calibri>GV>Are you dumping the packets to disk? If so,
have you measured the dump-to-disk bandwidth? </FONT><BR><FONT
size=2> </FONT> <BR><FONT size=3 face=Calibri>GV</FONT> <BR><FONT
size=2> </FONT> <BR><FONT size=2> </FONT> <BR><FONT
size=2><TT>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></TT></FONT><BR><BR><PRE>--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
</PRE>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BODY></HTML>