<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 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 bgColor=#ffffff
CanvasTabStop="true" name="Compose message area">
<DIV><FONT 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=lyulou@gmail.com
href="mailto:lyulou@gmail.com">yulou liu</A> </DIV>
<DIV><B>Sent:</B> Sunday, September 19, 2010 12:50 AM</DIV>
<DIV><B>To:</B> <A
title="mailto:winpcap-users@winpcap.org CTRL + Click to follow link"
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Subject:</B> [Winpcap-users] About the packets loss , what is the
bottleneck ?</DIV></DIV></DIV>
<DIV><BR></DIV><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)"
class=Apple-style-span>
<DIV><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></DIV>
<DIV><FONT size=2 face=Calibri></FONT> </DIV>
<DIV><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></DIV><FONT size=3
face=Calibri></FONT><FONT size=3 face=Calibri></FONT>
<DIV><FONT size=3 face=Calibri></FONT><FONT size=3 face=Calibri></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>Â </DIV>
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV><FONT size=3 face=Calibri>GV>Are you dumping the packets to disk? If so,
have you measured the dump-to-disk bandwidth? </FONT></DIV>
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV><FONT size=3 face=Calibri>GV</FONT></DIV>
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV><FONT size=3 face=Calibri></FONT> </DIV></SPAN><BR></BODY></HTML>