<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Gianluca,<br>
<br>
Thanks a lot for helping me. I am in a dire situation since my detector
really needs that problem to be solved before our experiments in couple
of months time (need to do a lot of debugging and code writing after
Winpcap issue is solved).<br>
<br>
I am not loosing packets. Sorry if I made it confusing.<br>
<br>
The packets always arrive into my C code (although Wireshark may loose
them, maybe that was a confusion with packets being lost). I only need
my C code to work right. The rest of packets come only after the
timeout. <br>
<br>
I varied timeout from 1 ms to 20 sec and the effect is the same. With
timeout 0 - the packets do not arrive until I push more packets into
Chelsio card and these, in turn, push the once which were already in
some buffer. <br>
<br>
I am using Chelsio card, but Winpcap I downloaded from the official
website (version 4.1.2). <br>
<br>
The problem seems to be as if the function setmintocopy() does not work
right and the driver decides by itself how much to buffer before
sending it to me. One strange thing - the number of packets being
delivered to me changes from time to time, however very often number 31
(31 packets, 8234 bytes each) arrive in a single chunk. Sometimes it is
62 packets, sometimes other numbers, e.g. 57. etc.<br>
<br>
I will be very glad if someone ca advise something I can try to resolve
that issue.<br>
<br>
Thanks again,<br>
<br>
Anton<br>
<blockquote
cite="mid:6A8F2E88CFF83C43A6AFF7FAC775B9FC0713FCC9C6@MAILBOXES2.nbttech.com"
type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:735399641;
mso-list-type:hybrid;
mso-list-template-ids:1473172084 -1788707308 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Anton,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">You
say that you are using a Chelsio board. Are you using the official
version of WinPcap or Chelsio provided you with a custom one? What do
you set as timeout and mintocopy?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Have
a nice day<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">GV<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">From:</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:winpcap-users-bounces@winpcap.org">winpcap-users-bounces@winpcap.org</a>
[<a class="moz-txt-link-freetext" href="mailto:winpcap-users-bounces@winpcap.org">mailto:winpcap-users-bounces@winpcap.org</a>] <b>On Behalf Of </b>Mark
Pizzolato - WinPCap-Users<br>
<b>Sent:</b> Friday, January 28, 2011 11:57 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</a><br>
<b>Subject:</b> Re: [Winpcap-users] Delay receiving packets - wrong
functionality ofpcap_setmintocopy()<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Ho
Anton,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">My
first question to you would be:<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">WHY
are you using WinPcap to receive UDP packets?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">This
sounds like a job for a winsock application….<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><span
style="">-<span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Mark
Pizzolato<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div
style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">From:</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:winpcap-users-bounces@winpcap.org">winpcap-users-bounces@winpcap.org</a>
[<a class="moz-txt-link-freetext" href="mailto:winpcap-users-bounces@winpcap.org">mailto:winpcap-users-bounces@winpcap.org</a>] <b>On Behalf Of </b>Anton
Tremsin<br>
<b>Sent:</b> Friday, January 28, 2011 11:50 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</a><br>
<b>Subject:</b> [Winpcap-users] Delay receiving packets - wrong
functionality ofpcap_setmintocopy()<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom: 12pt;">I hope someone can
help my problem receiving packets in Windows7<br>
<br>
I am sending data by UDP packets from an FPGA through 10GB card
(Chelsio). Using VC++ 2010 to compile code to receive them. <br>
<br>
All packets arrive, no losses seen, but the problem is with the proper <b>operation
of pcap_setmintocopy() function.</b> <br>
<br>
<b>I send 64 packets with 8234 bytes each. Receiving them through
pcp_next_ex() and I only get 31 packets (sometimes 62, sometimes 47, 50
packets) before the timeout occurs. After timeout the rest of the
packets arrives. <br>
</b><br>
I set the minimum amount of data in the kernel buffer that causes a
read from the application to return (unless the timeout expires) to be
1 byte or it to be all 8234x64 bytes, no difference. Looks like the
setmintocpy function has no effect on my kernel buffer to be copied to
my application. If I send another set of 64 packets - data arrives into
pcp_next_ex(), still only in lamp of 31 (62, 47,50) packets <br>
<br>
That is a big problem for my application.<br>
<br>
<b>Is there anything I am doing wrong or need to change something in
the system/driver to make setmintocopy function to operate properly?<br>
</b><br>
Thanks a lot for your help, <br>
<br>
Anton Tremsin<br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Anton S. Tremsin, Ph.D.<o:p></o:p></pre>
<pre>Space Sciences Laboratory<o:p></o:p></pre>
<pre>University of California at Berkeley<o:p></o:p></pre>
<pre>Berkeley, CA 94720<o:p></o:p></pre>
<pre>Tel: (510) 642 4554<o:p></o:p></pre>
</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Winpcap-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a>
<a class="moz-txt-link-freetext" href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a>
</pre>
</blockquote>
<br>
</body>
</html>