DPDK patches and discussions
 help / color / mirror / Atom feed
From: Newman Poborsky <newman555p@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] flow director - perfect match filter
Date: Thu, 30 Oct 2014 16:18:05 +0100	[thread overview]
Message-ID: <CAHW=9PtO1fWjuVSkQ-Ora+Gso2ZGbZU+EaKKiiRqn1tjQv1RUQ@mail.gmail.com> (raw)

Hi,

I'm not sure this is the right place to post a question like this, but I've
been stuck with the same problem for days now.

I'm trying to use flow director perfect match filters and so far I haven't
been able to get it working. I have tried writing my own simple app (based
on given examples) and I tried adding filter using something as simple as:

//setting the mask to watch for src IP
memset(&fdir_masks, 0x00, sizeof(struct rte_fdir_masks));
fdir_masks.src_ipv4_mask = 0xFFFFFFFF;
ret = rte_eth_dev_fdir_set_masks(portid, &fdir_masks);
//adding filter
memset(&filter, 0, sizeof(struct rte_fdir_filter));
filter.ip_src.ipv4_addr = htonl(ipv4_src);
filter.l4type = RTE_FDIR_L4TYPE_NONE;
filter.iptype = RTE_FDIR_IPTYPE_IPV4;
ret = rte_eth_dev_fdir_add_perfect_filter(portid,&filter,3,queue,0);
...


After running this code and using using tcpreplay to push traffic to
interface, I get all the misses in the stats and no matches.  As far as I
understand, to match only on src IP, all rte_fdir_filter elements should be
set to 0, and only src_ip should be masked (with 1's).

After this I tried running testpmd application but also no luck. The
commands I used are:
set_masks_filter 0 only_ip_flow 0 src_mask 0xFFFFFFFF 0x0000 dst_mask
0x00000000 0x0000 flexbytes 0 vlan_id 0 vlan_prio 0
add_perfect_filter 0 ip src 10.10.10.10 0 dst 0.0.0.0 0 flexbytes 0 vlan 0
queue 1 soft 3

Filter is added but after sending packets to this interface, I only see
misses in stats.

What I am doing wrong?  I've read the docs and looked at API reference but
didn't find anything that could help me.

Configuring flow director filter using ethtool and sending same packets
results in matches, so packets I'm sending should be matched.

Thank you for any help!

Newman P.

             reply	other threads:[~2014-10-30 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 15:18 Newman Poborsky [this message]
2014-10-31  0:48 ` Wu, Jingjing
2014-10-31  7:59   ` Newman Poborsky

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='CAHW=9PtO1fWjuVSkQ-Ora+Gso2ZGbZU+EaKKiiRqn1tjQv1RUQ@mail.gmail.com' \
    --to=newman555p@gmail.com \
    --cc=dev@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).