Re: PF_RING + bridge continue

Alfredo Cardigliano <[email protected]> Mon, 15 Jul 2019 10:04:02 +0200
Newsgroups gmane.linux.ntop.devel
Message-ID <[email protected]>
--===============7212554586322371910==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_165D3551-3D8E-4DF2-83C7-B3E22709C048"


--Apple-Mail=_165D3551-3D8E-4DF2-83C7-B3E22709C048
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi Eitan
please check the other email thread, I pushed a fix for this, please =
update from github or wait for the next packages later today.

Thank you
Alfredo

> On 14 Jul 2019, at 19:55, Eitan Michaelson <[email protected]> wrote:
>=20
>=20
> Looks like after the first packet is drooped there is no way for my =
application to continue and receive packets.
> As long as there are no doped packets all is OK, the first drop =
practically breaks the application.
> It does not matter if pfring_recv() is blocking or not
>=20
> [  679.175760] [PF_RING] Welcome to PF_RING 7.5.0 ($Revision: =
unknown$) // Custom kernel
> [  679.175760] (C) 2004-17 ntop.org <http://ntop.org/>
> [  679.185328] LINUX_VERSION_CODE 00040E7B
> [  679.189173] [PF_RING] Min # ring slots 4096
> [  679.193358] [PF_RING] Slot version     17
> [  679.197368] [PF_RING] Capture TX       Yes [RX+TX]
> [  679.202183] [PF_RING] IP Defragment    No
> [  679.206208] NET: Registered protocol family 27
> [  679.210679] [PF_RING] pf_ring initialized correctly
>=20
>=20
>=20
> On 14/07/2019 19:38, Eitan Michaelson wrote:
>> Hello,=20
>>=20
>> After some more testing it looks like it might have nothing to do =
with PF_RING attached to a bridge.
>> My test is sending a 1024 bytes UDP packet at a fast rate (about =
110,000 packets per second) to a small old Linux
>> box running the PF_RING enabled process.
>>=20
>> The process is pending on pfring_recv() waiting to get new packets on =
br0 .
>>=20
>> What I was able to see is that at some point after the test has =
started,
>> the drops count (got it from pfring_stats()) went up rapidly.
>> while pfring_recv() was pending forever and not getting triggered to =
read more packets.
>>=20
>> What did I do wrong?
>> Thanks
>> Eitan.
>>=20
>>=20
>>=20
>> _______________________________________________
>> Ntop-dev mailing list
>> [email protected] <mailto:[email protected]>
>> http://listgateway.unipi.it/mailman/listinfo/ntop-dev =
<http://listgateway.unipi.it/mailman/listinfo/ntop-dev>___________________=
____________________________
> Ntop-dev mailing list
> [email protected] <mailto:[email protected]>
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev =
<http://listgateway.unipi.it/mailman/listinfo/ntop-dev>

--Apple-Mail=_165D3551-3D8E-4DF2-83C7-B3E22709C048
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><div =
class=3D"">Hi Eitan</div><div class=3D"">please check the other email =
thread, I pushed a fix for this, please update from github or wait for =
the next packages later today.</div><div class=3D""><br class=3D"">Thank =
you<br class=3D"">Alfredo</div><div><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D"">On 14 Jul 2019, at 19:55, Eitan =
Michaelson &lt;<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div =
style=3D"margin-bottom: 0cm; margin-top: 0pt; caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none;" =
class=3D""><br class=3D"Apple-interchange-newline">Looks like after the =
first packet is drooped there is no way for my application to continue =
and receive packets.</div><div style=3D"margin-bottom: 0cm; margin-top: =
0pt; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant-caps: normal; font-weight: normal; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); =
text-decoration: none;" class=3D"">As long as there are no doped packets =
all is OK, the first drop practically breaks the application.</div><div =
style=3D"margin-bottom: 0cm; margin-top: 0pt; caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none;" =
class=3D"">It does not matter if pfring_recv() is blocking or =
not</div><div style=3D"margin-bottom: 0cm; margin-top: 0pt; caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none;" =
class=3D""><br class=3D""></div><div style=3D"margin-bottom: 0cm; =
margin-top: 0pt; caret-color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: =
rgb(255, 255, 255); text-decoration: none;" class=3D"">[&nbsp; =
679.175760] [PF_RING] Welcome to PF_RING 7.5.0 ($Revision: unknown$) // =
Custom kernel<br class=3D"">[&nbsp; 679.175760] (C) 2004-17<span =
class=3D"Apple-converted-space">&nbsp;</span><a href=3D"http://ntop.org/" =
class=3D"">ntop.org</a><br class=3D"">[&nbsp; 679.185328] =
LINUX_VERSION_CODE 00040E7B<br class=3D"">[&nbsp; 679.189173] [PF_RING] =
Min # ring slots 4096<br class=3D"">[&nbsp; 679.193358] [PF_RING] Slot =
version&nbsp;&nbsp;&nbsp;&nbsp; 17<br class=3D"">[&nbsp; 679.197368] =
[PF_RING] Capture TX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes [RX+TX]<br =
class=3D"">[&nbsp; 679.202183] [PF_RING] IP Defragment&nbsp;&nbsp;&nbsp; =
No<br class=3D"">[&nbsp; 679.206208] NET: Registered protocol family =
27<br class=3D"">[&nbsp; 679.210679] [PF_RING] pf_ring initialized =
correctly</div><div style=3D"margin-bottom: 0cm; margin-top: 0pt; =
caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant-caps: normal; font-weight: normal; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); =
text-decoration: none;" class=3D""><br class=3D""></div><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); =
text-decoration: none;" class=3D""><div style=3D"margin-bottom: 0cm; =
margin-top: 0pt; caret-color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: =
rgb(255, 255, 255); text-decoration: none;" class=3D""><br =
class=3D""></div><div class=3D"moz-cite-prefix" style=3D"caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none;">On =
14/07/2019 19:38, Eitan Michaelson wrote:<br class=3D""></div><blockquote =
type=3D"cite" cite=3D"mid:[email protected]" =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
orphans: auto; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; widows: auto; word-spacing: 0px; =
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none;" =
class=3D""><div style=3D"margin-bottom: 0cm; margin-top: 0pt;" =
class=3D"">Hello,<span class=3D"Apple-converted-space">&nbsp;</span><br =
class=3D""></div><div style=3D"margin-bottom: 0cm; margin-top: 0pt;" =
class=3D""><br class=3D""></div><div style=3D"margin-bottom: 0cm; =
margin-top: 0pt;" class=3D"">After some more testing it looks like it =
might have nothing to do with PF_RING attached to a bridge.</div><div =
style=3D"margin-bottom: 0cm; margin-top: 0pt;" class=3D"">My test is =
sending a 1024 bytes UDP packet at a fast rate (about 110,000 packets =
per second) to a small old Linux</div><div style=3D"margin-bottom: 0cm; =
margin-top: 0pt;" class=3D"">box running the PF_RING enabled =
process.</div><div style=3D"margin-bottom: 0cm; margin-top: 0pt;" =
class=3D""><br class=3D""></div><div style=3D"margin-bottom: 0cm; =
margin-top: 0pt;" class=3D"">The process is pending on pfring_recv() =
waiting to get new packets on br0 .<br class=3D""></div><div =
style=3D"margin-bottom: 0cm; margin-top: 0pt;" class=3D""><br =
class=3D""></div><div style=3D"margin-bottom: 0cm; margin-top: 0pt;" =
class=3D"">What I was able to see is that at some point after the test =
has started,</div><div style=3D"margin-bottom: 0cm; margin-top: 0pt;" =
class=3D"">the drops count (got it from pfring_stats()) went up =
rapidly.<br class=3D""></div><div style=3D"margin-bottom: 0cm; =
margin-top: 0pt;" class=3D"">while pfring_recv() was pending forever and =
not getting triggered to read more packets.<br class=3D""></div><div =
style=3D"margin-bottom: 0cm; margin-top: 0pt;" class=3D""><br =
class=3D""></div><div style=3D"margin-bottom: 0cm; margin-top: 0pt;" =
class=3D"">What did I do wrong?<br class=3D"">Thanks</div><div =
style=3D"margin-bottom: 0cm; margin-top: 0pt;" class=3D"">Eitan.</div><div=
 style=3D"margin-bottom: 0cm; margin-top: 0pt;" class=3D""><br =
class=3D""></div><br class=3D""><fieldset =
class=3D"mimeAttachmentHeader"></fieldset><pre class=3D"moz-quote-pre" =
wrap=3D"">_______________________________________________
Ntop-dev mailing list
<a class=3D"moz-txt-link-abbreviated" =
href=3D"mailto:[email protected]">[email protected]=
t</a>
<a class=3D"moz-txt-link-freetext" =
href=3D"http://listgateway.unipi.it/mailman/listinfo/ntop-dev">http://list=
gateway.unipi.it/mailman/listinfo/ntop-dev</a></pre></blockquote><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">_______________________________________________</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none; float: =
none; display: inline !important;" class=3D"">Ntop-dev mailing =
list</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: =
rgb(255, 255, 255); text-decoration: none;" class=3D""><a =
href=3D"mailto:[email protected]" style=3D"font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" =
class=3D"">[email protected]</a><br style=3D"caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255); text-decoration: none;" =
class=3D""><a =
href=3D"http://listgateway.unipi.it/mailman/listinfo/ntop-dev" =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
orphans: auto; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; widows: auto; word-spacing: 0px; =
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; =
background-color: rgb(255, 255, 255);" =
class=3D"">http://listgateway.unipi.it/mailman/listinfo/ntop-dev</a></div>=
</blockquote></div><br class=3D""></body></html>=

--Apple-Mail=_165D3551-3D8E-4DF2-83C7-B3E22709C048--

--===============7212554586322371910==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
--===============7212554586322371910==--