Hi there,

I am trying to setup and run VPP HPS in my local vagrant vm. There I have 2 x 
1Gbs (82540EM EC) configured for VPP. I configured HPS placement per:

/etc/vpp/startup.conf

cpu {
...
        main-core 0
        corelist-workers 1, 2
        corelist-hqos-threads 3
...
}
dpdk {
...
        socket-mem 1024
        dev 0000:00:08.0 {
          num-rx-queues 1
        }
        dev 0000:00:09.0 {
          num-tx-queues 1
          hqos
        }
}

vpp# show dpdk version
DPDK Version:             DPDK 16.11.0
DPDK EAL init args:       -c f -n 4 --huge-dir /run/vpp/hugepages --file-prefix 
vpp -w 0000:00:08.0 -w 0000:00:09.0 --master-lcore 0 --socket-mem 1024

I assigned the following static arp-s and a route for my simple test:

vpp# sh int
              Name               Idx       State          Counter          Count
GigabitEthernet0/8/0              1        down
GigabitEthernet0/9/0              2        down
local0                            0        down

vpp# set int ip address GigabitEthernet0/8/0 10.10.0.1/24
vpp# set interface state GigabitEthernet0/8/0 up
vpp# set int ip address GigabitEthernet0/9/0 10.10.0.10/24
vpp# set interface state GigabitEthernet0/9/0 up
vpp# set ip arp static GigabitEthernet0/9/0 10.10.10.1 08:00:27:25:8A:0F
vpp# set ip arp static GigabitEthernet0/9/0 10.10.10.2 08:00:27:25:8A:0F
vpp# set ip arp static GigabitEthernet0/9/0 10.10.10.3 08:00:27:25:8A:0F
vpp# set ip arp static GigabitEthernet0/9/0 10.10.10.4 08:00:27:25:8A:0F
vpp# ip route add 10.10.10.255/24 via GigabitEthernet0/9/0
vpp# show dpdk interface placement
Thread 2 (vpp_wk_0 at lcore 1):
  GigabitEthernet0/8/0 queue 0
Thread 3 (vpp_wk_1 at lcore 2):
  GigabitEthernet0/9/0 queue 0

I sent the traffic from my traffic generator (Dst IPv4 range 10.10.10.1-4, and 
random DSCP). From the trace log I cannot see the packet hitting the HPS:

vpp# clear trace
vpp# trace add dpdk-input 10
vpp# show trace
------------------- Start of thread 0 vpp_main -------------------
No packets in trace buffer
------------------- Start of thread 1 vpp_hqos-threads_0 -------------------
No packets in trace buffer
------------------- Start of thread 2 vpp_wk_0 -------------------
Packet 1

00:09:53:685732: dpdk-input
  GigabitEthernet0/8/0 rx queue 0
  buffer 0x4e03: current data 14, length 110, free-list 0, totlen-nifb 0, trace 
0x0
  PKT MBUF: port 0, nb_segs 1, pkt_len 124
    buf_len 2176, data_len 124, ol_flags 0x0, data_off 128, phys_addr 0xc2d33fc0
    packet_type 0x0
  IP4: 08:00:27:25:8a:0f -> 08:00:27:f1:2a:09
  UDP: 10.10.0.254 -> 10.10.10.3
    tos 0xca, ttl 64, length 110, checksum 0x5aa1
    fragment id 0x0000
  UDP: 3333 -> 4444
    length 90, checksum 0xc1c4
00:09:53:685823: ip4-input
  UDP: 10.10.0.254 -> 10.10.10.3
    tos 0xca, ttl 64, length 110, checksum 0x5aa1
    fragment id 0x0000
  UDP: 3333 -> 4444
    length 90, checksum 0xc1c4
00:09:53:685845: ip4-lookup
  fib 0 dpo-idx 4 flow hash: 0x00000000
  UDP: 10.10.0.254 -> 10.10.10.3
    tos 0xca, ttl 64, length 110, checksum 0x5aa1
    fragment id 0x0000
  UDP: 3333 -> 4444
    length 90, checksum 0xc1c4
00:09:53:685853: ip4-rewrite
  tx_sw_if_index 2 dpo-idx 4 : ipv4 via 10.10.10.3 GigabitEthernet0/9/0: IP4: 
08:00:27:68:0c:e4 -> 08:00:27:25:8a:0f flow hash: 0x00000000
  IP4: 08:00:27:68:0c:e4 -> 08:00:27:25:8a:0f
  UDP: 10.10.0.254 -> 10.10.10.3
    tos 0xca, ttl 63, length 110, checksum 0x5ba1
    fragment id 0x0000
  UDP: 3333 -> 4444
    length 90, checksum 0xc1c4
00:09:53:685858: GigabitEthernet0/9/0-output
  GigabitEthernet0/9/0
  IP4: 08:00:27:68:0c:e4 -> 08:00:27:25:8a:0f
  UDP: 10.10.0.254 -> 10.10.10.3
    tos 0xca, ttl 63, length 110, checksum 0x5ba1
    fragment id 0x0000
  UDP: 3333 -> 4444
    length 90, checksum 0xc1c4
00:09:53:685871: GigabitEthernet0/9/0-tx
  GigabitEthernet0/9/0 tx queue 2
  buffer 0x4e03: current data 0, length 124, free-list 0, totlen-nifb 0, trace 
0x0
  IP4: 08:00:27:68:0c:e4 -> 08:00:27:25:8a:0f
  UDP: 10.10.0.254 -> 10.10.10.3
    tos 0xca, ttl 63, length 110, checksum 0x5ba1
    fragment id 0x0000
  UDP: 3333 -> 4444
    length 90, checksum 0xc1c4
...

The VPP documentation shows the following HPS cli commands:

  set dpdk interface hqos pipe <if-name> subport <n> pipe <n> profile <n>
  set dpdk interface hqos pktfield <if-name> id <n> offset <n> mask <n>
  set dpdk interface hqos placement <if-name> thread <n>
  set dpdk interface hqos subport <if-name> subport <n> [rate <n>] [bktsize 
<n>] [tc0 <n>] [tc1 <n>] [tc2 <n>] [tc3 <n>] [period <n>]
  set dpdk interface hqos tctbl <if-name> entry <n> tc <n> queue <n>
  set dpdk interface placement <if-name> [queue <n>]  thread <n>

  show dpdk hqos queue <if-name> subport <subport> pipe <pipe> tc <tc> tc_q 
<tc_q>
  show dpdk interface hqos placement
  show dpdk interface hqos <if-name>
  show dpdk interface placement

This is the HPS placement shown in my setup:

vpp# show dpdk interface hqos placement
Thread 1 (vpp_hqos-threads_0 at lcore 3):
  GigabitEthernet0/9/0 queue 0
vpp# show dpdk interface placement
Thread 2 (vpp_wk_0 at lcore 1):
  GigabitEthernet0/8/0 queue 0
Thread 3 (vpp_wk_1 at lcore 2):
  GigabitEthernet0/9/0 queue 0
vpp# show dpdk interface hqos placement
Thread 1 (vpp_hqos-threads_0 at lcore 3):
  GigabitEthernet0/9/0 queue 0

How someone can configure VPS HPS port parameters form the VPP CLI? I only see 
the default port attributes set as per

https://docs.fd.io/vpp/17.01/d5/dd9/hqos_8c_source.html

..
   95   /* port */
   96   .port = {
   97            .name = NULL,        /* Set at init */
   98            .socket = 0,         /* Set at init */
   99            .rate = 1250000000,  /* Assuming 10GbE port */
  100            .mtu = 14 + 1500,    /* Assuming Ethernet/IPv4 pkt (Ethernet 
FCS not included) */
  101            .frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT,
  102            .n_subports_per_port = 1,
  103            .n_pipes_per_subport = 4096,
  104            .qsize = {64, 64, 64, 64},
  105            .pipe_profiles = NULL,       /* Set at config */
  106            .n_pipe_profiles = 1,

I cannot change the default setting:

vpp# set dpdk interface hqos pipe GigabitEthernet0/9/0 subport 0 pipe 0 profile 0
vpp# set dpdk interface hqos subport GigabitEthernet0/9/0 subport 0 rate 
125000000 bktsize 10000 tc0 30517 tc1 30517 tc2 30517 tc3 30517 period 80
vpp# show dpdk interface hqos GigabitEthernet0/9/0
Thread:
   Input SWQ size = 4096 packets
   Enqueue burst size = 256 packets
   Dequeue burst size = 220 packets
   Packet field 0: slab position =    0, slab bitmask = 0x0000000000000000
   Packet field 1: slab position =   40, slab bitmask = 0x0000000fff000000
   Packet field 2: slab position =    8, slab bitmask = 0x00000000000000fc
   Packet field 2 translation table:
     [ 0 .. 15]:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
     [16 .. 31]:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
     [32 .. 47]:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
     [48 .. 63]:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
Port:
   Rate = 1250000000 bytes/second
   MTU = 1514 bytes
   Frame overhead = 24 bytes
   Number of subports = 1
   Number of pipes per subport = 4096
   Packet queue size: TC0 = 64, TC1 = 64, TC2 = 64, TC3 = 64 packets
   Number of pipe profiles = 1
Pipe profile 0:
   Rate = 305175 bytes/second
   Token bucket size = 1000000 bytes
   Traffic class rate: TC0 = 305175, TC1 = 305175, TC2 = 305175, TC3 = 305175 
bytes/second
   TC period = 40 milliseconds
   TC0 WRR weights: Q0 = 1, Q1 = 1, Q2 = 1, Q3 = 1
   TC1 WRR weights: Q0 = 1, Q1 = 1, Q2 = 1, Q3 = 1
   TC2 WRR weights: Q0 = 1, Q1 = 1, Q2 = 1, Q3 = 1
   TC3 WRR weights: Q0 = 1, Q1 = 1, Q2 = 1, Q3 = 1

I appreciate any help with my HPS setup.

Thank you,

Zhelyko Oluic




::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to