[dpdk-users] testpmd: Flow Director

Tomasz Czaus tomasz.czaus at gmail.com
Fri Feb 8 20:01:53 CET 2019


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


More information about the users mailing list