DPDK usage discussions
 help / color / mirror / Atom feed
From: Filip Janiszewski <contact@filipjaniszewski.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: flow rule to drop all the packets
Date: Tue, 30 Nov 2021 16:24:51 +0100	[thread overview]
Message-ID: <146a4351-cc39-09a1-4e39-bd0f3d3f90cb@filipjaniszewski.com> (raw)

Hi,

Is there a way to create a flow rule that drops all the eth packets?
I've attempted to setup a flow rule that match any ether type but it's
never validated, for example a rule like:

.
    rte_flow_item_eth eth_spec{};
    eth_spec.hdr.ether_type = RTE_BE16(0x8100);
    rte_flow_item_eth eth_mask{};
    eth_mask.hdr.ether_type = 0xFFFF;
.

Should match every packet with ether type 0x8100, so I would assume that
setting ether_type for the mask to 0x0000 would trigger the card to
match everything regardless of the spec value, but it doesn't run
("Invalid input set" is the complain).

Also with testpmd I'm failing to make it work and the documentation on
this entire rte flow is pretty poor..

So, how do I configure a rule that drops all*? My use case would be that
I need to filter a link that is getting a lot of stuff, I'll drop all
but just certain flows that are relevant to me (using an higher priority
rule)..

Perhaps there's a way to configure an ingress rule that automatically
drops everything which is not matching the rule?

As a side note, I can't just disable RSS, spit all to queue 0 like it
was a void bucket (dropping/releasing) and then setting up rules for the
packets I need so that they get enqueue to some other queue, because:

1) I'll waste a cpu just for dropping packets
2) I'll probably get my stat reports full of imiss/errors since the link
is 100G and that poor queue is going to be getting tons of packets

Thanks


* I found this command:

.
testpmd> set all queues drop 0 on
function not implemented
.

But, it doesn't work.

-- 
BR, Filip
+48 666 369 823

             reply	other threads:[~2021-11-30 15:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 15:24 Filip Janiszewski [this message]
2021-12-01 14:37 ` Filip Janiszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146a4351-cc39-09a1-4e39-bd0f3d3f90cb@filipjaniszewski.com \
    --to=contact@filipjaniszewski.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).