DPDK usage discussions
 help / color / mirror / Atom feed
From: Tomasz Czaus <tomasz.czaus@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] testpmd: Flow Director
Date: Fri, 8 Feb 2019 20:01:53 +0100	[thread overview]
Message-ID: <CAD=oxmkYsvcwmRGUif8SE9UOJT1V4zE4u-DVQcTeKtsWwJQTKA@mail.gmail.com> (raw)

Hello,

I try to configure FD in testpmd app (PDK_v18.11.0_LTS) to identify
TCP flows (based on destination IPv4 addr and destination TCP port)
and route them to specific queues. I start the testpmd on the
following way:

testpmd \
        -c 0xf \
        -n 3 \
        -- \
        --port-topology=chained \
        --rxq=8 \
        --txq=8 \
        --interactive \
        --forward-mode=rxonly \
        --disable-rss \
        --pkt-filter-mode=perfect

then:

set verbose 5
set fwd rxonly
port stop 0
flow_director_mask 0 mode IP vlan 0x0 src_mask 0.0.0.0
0000:0000:0000:0000:0000:0000:0000:0000 0x0000 dst_mask
255.255.255.255 0000:0000:0000:0000:0000:0000:0000:0000 0xFFFF
port start 0
flow_director_filter 0 mode IP add flow ipv4-tcp src 0.0.0.0 0 dst
192.168.10.2 9001 tos 0 ttl 64 vlan 0x0 flexbytes (0x08,0x00) fwd pf
queue 1 fd_id 1
show port fdir 0
  ######################## FDIR infos for port 0      ########################
  MODE:   PERFECT
  SUPPORTED FLOW TYPE:  ipv4-tcp ipv4-udp ipv4-sctp ipv4-other
ipv6-tcp ipv6-udp ipv6-sctp ipv6-other
  FLEX PAYLOAD INFO:
  max_len:       2           payload_limit: 62
  payload_unit:  2           payload_seg:   1
  bitmask_unit:  0           bitmask_num:   0
  MASK:
    vlan_tci: 0x0000, src_ipv4: 0x00000000, dst_ipv4: 0xffffffff
    src_port: 0x0000, dst_port: 0xffff
    src_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000
    dst_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000
  FLEX PAYLOAD SRC OFFSET:
    RAW:    12     13
  FLEX MASK CFG:
    unknown:     00 00
  guarant_count: 1           best_count:    0
  guarant_space: 2048        best_space:    0
  collision:     0           free:          2047
  maxhash:       0           maxlen:        0
  add:           0           remove:        0
  f_add:         0           f_remove:      0
  ############################################################################
start

on other box (192.168.10.1):
telnet 192.168.10.2 9001

which gives the following messages in testpmd app:
port 0/queue 0: received 1 packets
  src=00:1B:21:43:4B:F8 - dst=50:E2:BA:84:8B:40 - type=0x0800 -
length=74 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_TCP  - sw ptype:
L2_ETHER L3_IPV4 L4_TCP  - l2_len=14 - l3_len=20 - l4_len=40 - Receive
queue=0x0
  ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD
PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
  src=00:1B:21:43:4B:F8 - dst=50:E2:BA:84:8B:40 - type=0x0800 -
length=74 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_TCP  - sw ptype:
L2_ETHER L3_IPV4 L4_TCP  - l2_len=14 - l3_len=20 - l4_len=40 - Receive
queue=0x0
  ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD
PKT_RX_OUTER_L4_CKSUM_UNKNOWN

Pkts are routed to queue id 0, instead 1. Any ideas?

Best regards,
-t

                 reply	other threads:[~2019-02-08 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAD=oxmkYsvcwmRGUif8SE9UOJT1V4zE4u-DVQcTeKtsWwJQTKA@mail.gmail.com' \
    --to=tomasz.czaus@gmail.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).