Mailing List Archive

Multiple interfaces
Hello

Suppose I would like to add few interfaces user /pfring_open() /
and then wait for incoming packets from any of them using
/pfring_recv()/ (wait_for_incoming_packet = 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 = 0).
While it's working, It's a CPU intense method.

Is there a better way to collect packets from multiple interfaces?

Thank you,

Eitan.
Re: Multiple interfaces [ In reply to ]
Hi Eitan
if you are using standard drivers, you can list all the interfaces in pfring_open (“eth1,eth2”) 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 <eitanm@me.com> wrote:
>
> Hello
>
> Suppose I would like to add few interfaces user pfring_open()
> and then wait for incoming packets from any of them using pfring_recv() (wait_for_incoming_packet = 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 = 0).
> While it's working, It's a CPU intense method.
> Is there a better way to collect packets from multiple interfaces?
>
> Thank you,
>
> Eitan.
>
>
>
>
>
>
>
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
Re: Multiple interfaces [ In reply to ]
Hi Eitan
if you are using standard drivers, you can list all the interfaces in pfring_open (“eth1,eth2”) 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 <eitanm@me.com> wrote:
>
> Hello
>
> Suppose I would like to add few interfaces user pfring_open()
> and then wait for incoming packets from any of them using pfring_recv() (wait_for_incoming_packet = 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 = 0).
> While it's working, It's a CPU intense method.
> Is there a better way to collect packets from multiple interfaces?
>
> Thank you,
>
> Eitan.
>
>
>
>
>
>
>
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev