Re: Multiple interfaces

Alfredo Cardigliano <[email protected]> Thu, 4 Jul 2019 17:22:33 +0200
Newsgroups gmane.linux.ntop.devel
Message-ID <[email protected]>
--===============7126925654917897523==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_006DA01E-3E0E-4A9F-935A-C4A300869D62"


--Apple-Mail=_006DA01E-3E0E-4A9F-935A-C4A300869D62
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Eitan
if you are using standard drivers, you can list all the interfaces in =
pfring_open (=E2=80=9Ceth1,eth2=E2=80=9D) and the kernel module will =
take care of that,
instead, if you are using ZC drivers, you should that in userspace as =
you are doing as kernel is bypassed.

Alfredo

> On 4 Jul 2019, at 17:20, Eitan Michaelson <[email protected]> wrote:
>=20
> Hello
>=20
> Suppose I would like to add few interfaces user pfring_open()=20
> and then wait for incoming packets from any of them using =
pfring_recv() (wait_for_incoming_packet =3D 1).
> The current method I'm testing is looping on all the attached =
interfaces one after another, in a non blocking mode =
(wait_for_incoming_packet =3D 0).=20
> While it's working, It's a CPU intense method.
> Is there a better way to collect packets from multiple interfaces?
>=20
> Thank you,
>=20
> Eitan.
>=20
>=20
>=20
>=20
>=20
>=20
>=20
> _______________________________________________
> Ntop-dev mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev


--Apple-Mail=_006DA01E-3E0E-4A9F-935A-C4A300869D62
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Hi =
Eitan<div class=3D"">if you are using standard drivers, you can list all =
the interfaces in pfring_open (=E2=80=9Ceth1,eth2=E2=80=9D) and the =
kernel module will take care of that,</div><div class=3D"">instead, if =
you are using ZC drivers, you should that in userspace as you are doing =
as kernel is bypassed.</div><div class=3D""><div><br =
class=3D""></div><div>Alfredo</div><div><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D"">On 4 Jul 2019, at 17:20, 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"">
 =20

    <meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3DUTF-8" class=3D"">
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000" class=3D"">
    Hello<br class=3D"">
    <br class=3D"">
    Suppose I would like to add few interfaces user <i =
class=3D"">pfring_open() </i><br class=3D"">
    and then wait for incoming packets from any of them using <i =
class=3D"">pfring_recv()</i>
    (wait_for_incoming_packet =3D 1).<br class=3D"">
    The current method I'm testing is looping on all the attached
    interfaces one after another, in a non blocking mode
    (wait_for_incoming_packet =3D 0). <br class=3D"">
    While it's working, It's a CPU intense method.
    <p class=3D"">Is there a better way to collect packets from multiple
      interfaces?<br class=3D"">
    </p><p class=3D"">Thank you,</p><p class=3D"">Eitan.<br class=3D"">
    </p><p class=3D""><br class=3D"">
    </p><p class=3D""><br class=3D"">
    </p><p class=3D""><br class=3D"">
    </p>
  </div>

_______________________________________________<br class=3D"">Ntop-dev =
mailing list<br class=3D""><a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br =
class=3D"">http://listgateway.unipi.it/mailman/listinfo/ntop-dev</div></bl=
ockquote></div><br class=3D""></div></body></html>=

--Apple-Mail=_006DA01E-3E0E-4A9F-935A-C4A300869D62--

--===============7126925654917897523==
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
--===============7126925654917897523==--