DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] AF_PACKET pmd and linux networking stack
@ 2018-08-08 16:57 Andrew Wang
  2018-08-17 21:15 ` Rami Rosen
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Wang @ 2018-08-08 16:57 UTC (permalink / raw)
  To: users

Hi

Is there a way of preventing the linux kernel networking stack from
handling packets when using the AF_PACKET pmd?

Our DPDK app is running on a node that is attracting traffic for a VIP and
for which it has a blackhole routing rule (to drop all the incoming packets
for that VIP).

The intention was to have our DPDK app (running on AF_PACKET pmd for now -
we're still developing the app) grab those packets, process and send them
out (with a different address).

Right now we can actually see those packets in our dpdk app, we process
them, give them a different address, but it seems that the linux kernel
networking stack is still dropping them.

When the blackhole rule is removed we see the outgoing packet with correct
header, but also a destination unreachable message is sent out, suggesting
the kernel is also handling the packet. We see the same behavior when using
iptables to drop packets (instead of blackhole route).

Any suggestions appreciated.

Thanks
Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] AF_PACKET pmd and linux networking stack
  2018-08-08 16:57 [dpdk-users] AF_PACKET pmd and linux networking stack Andrew Wang
@ 2018-08-17 21:15 ` Rami Rosen
  2018-08-25 14:43   ` Andrew Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Rami Rosen @ 2018-08-17 21:15 UTC (permalink / raw)
  To: Andrew Wang; +Cc: users

Hi Andrew,
I am not sure at all that there is a way of achieving it, because of the
way AF_PACKET works.
But couldn't you achieve your goal with running DPDK L2FWD or DPDK L3FWD
application ? In such a case, when not working in promiscuous mode, it
seems that this will avoid processing of the packets by the kernel. See the
l2fwd and l3fwd sections in DPDK samples guide.

Regards,
Rami Rosen



בתאריך יום ד׳, 8 באוג׳ 2018, 19:57, מאת Andrew Wang ‏<andrw.wng@gmail.com>:

> Hi
>
> Is there a way of preventing the linux kernel networking stack from
> handling packets when using the AF_PACKET pmd?
>
> Our DPDK app is running on a node that is attracting traffic for a VIP and
> for which it has a blackhole routing rule (to drop all the incoming packets
> for that VIP).
>
> The intention was to have our DPDK app (running on AF_PACKET pmd for now -
> we're still developing the app) grab those packets, process and send them
> out (with a different address).
>
> Right now we can actually see those packets in our dpdk app, we process
> them, give them a different address, but it seems that the linux kernel
> networking stack is still dropping them.
>
> When the blackhole rule is removed we see the outgoing packet with correct
> header, but also a destination unreachable message is sent out, suggesting
> the kernel is also handling the packet. We see the same behavior when using
> iptables to drop packets (instead of blackhole route).
>
> Any suggestions appreciated.
>
> Thanks
> Andrew
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] AF_PACKET pmd and linux networking stack
  2018-08-17 21:15 ` Rami Rosen
@ 2018-08-25 14:43   ` Andrew Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Wang @ 2018-08-25 14:43 UTC (permalink / raw)
  To: roszenrami; +Cc: users

Rami

Thank you for the suggestion. Later I found it was a problem with the dpdk
app (setting incorrect mac address).

Andrew

On Fri, Aug 17, 2018 at 5:15 PM Rami Rosen <roszenrami@gmail.com> wrote:

> Hi Andrew,
> I am not sure at all that there is a way of achieving it, because of the
> way AF_PACKET works.
> But couldn't you achieve your goal with running DPDK L2FWD or DPDK L3FWD
> application ? In such a case, when not working in promiscuous mode, it
> seems that this will avoid processing of the packets by the kernel. See the
> l2fwd and l3fwd sections in DPDK samples guide.
>
> Regards,
> Rami Rosen
>
>
>
> בתאריך יום ד׳, 8 באוג׳ 2018, 19:57, מאת Andrew Wang ‏<andrw.wng@gmail.com
> >:
>
>> Hi
>>
>> Is there a way of preventing the linux kernel networking stack from
>> handling packets when using the AF_PACKET pmd?
>>
>> Our DPDK app is running on a node that is attracting traffic for a VIP and
>> for which it has a blackhole routing rule (to drop all the incoming
>> packets
>> for that VIP).
>>
>> The intention was to have our DPDK app (running on AF_PACKET pmd for now -
>> we're still developing the app) grab those packets, process and send them
>> out (with a different address).
>>
>> Right now we can actually see those packets in our dpdk app, we process
>> them, give them a different address, but it seems that the linux kernel
>> networking stack is still dropping them.
>>
>> When the blackhole rule is removed we see the outgoing packet with correct
>> header, but also a destination unreachable message is sent out, suggesting
>> the kernel is also handling the packet. We see the same behavior when
>> using
>> iptables to drop packets (instead of blackhole route).
>>
>> Any suggestions appreciated.
>>
>> Thanks
>> Andrew
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-25 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 16:57 [dpdk-users] AF_PACKET pmd and linux networking stack Andrew Wang
2018-08-17 21:15 ` Rami Rosen
2018-08-25 14:43   ` Andrew Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).