Skip to content

Commit

Permalink
config: cfgfile supports flow director configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
ywc689 committed Nov 7, 2018
1 parent a497357 commit 1eebc85
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 65 deletions.
5 changes: 5 additions & 0 deletions conf/dpvs.conf.items
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ netif_defs {
queue_number 6 <16, 0-16>
descriptor_number 512 <512, 16-8192>
}
fdir {
mode perfect <perfect, none|signature|perfect|perfect_mac_vlan|perfect_tunnel>
pballoc 64k <64k, 64k|128k|256k>
status matched <matched, close|matched|always>
}
! promisc_mode <disable>
! kni_name dpdk0.kni <char[32]>
}
Expand Down
56 changes: 33 additions & 23 deletions conf/dpvs.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
! global config
global_defs {
log_level WARNING
! log_file /var/log/dpvs.log
! log_file /var/log/dpvs.log
}

! netif config
netif_defs {
<init> pktpool_size 2097151
<init> pktpool_size 1048575
<init> pktpool_cache 256

<init> device dpdk0 {
Expand All @@ -31,7 +31,12 @@ netif_defs {
queue_number 8
descriptor_number 1024
}
! promisc_mode
fdir {
mode perfect
pballoc 64k
status matched
}
! promisc_mode
kni_name dpdk0.kni
}

Expand All @@ -45,18 +50,23 @@ netif_defs {
queue_number 8
descriptor_number 1024
}
! promisc_mode
fdir {
mode perfect
pballoc 64k
status matched
}
! promisc_mode
kni_name dpdk1.kni
}

! <init> bonding bond0 {
! mode 0
! slave dpdk0
! slave dpdk1
! primary dpdk0
! kni_name bond0.kni
! }
}
! <init> bonding bond0 {
! mode 0
! slave dpdk0
! slave dpdk1
! primary dpdk0
! kni_name bond0.kni
!}


! worker config (lcores)
worker_defs {
Expand Down Expand Up @@ -242,7 +252,7 @@ ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 2000
sync_msg_timeout_us 20000
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -255,20 +265,20 @@ ipvs_defs {
<init> conn_pool_size 2097152
<init> conn_pool_cache 256
conn_init_timeout 3
! expire_quiescent_template
! fast_xmit_close
! expire_quiescent_template
! fast_xmit_close
}

udp {
defence_udp_drop
! defence_udp_drop
timeout {
normal 300
last 3
}
}

tcp {
defence_tcp_drop
! defence_tcp_drop
timeout {
none 2
established 90
Expand All @@ -288,19 +298,19 @@ ipvs_defs {
mss 1452
ttl 63
sack
! wscale
! timestamp
! wscale
! timestamp
}
! defer_rs_syn
! defer_rs_syn
rs_syn_max_retry 3
ack_storm_thresh 10
max_ack_saved 3
conn_reuse_state {
close
time_wait
! fin_wait
! close_wait
! last_ack
! fin_wait
! close_wait
! last_ack
}
}
}
Expand Down
68 changes: 39 additions & 29 deletions conf/dpvs.conf.single-bond.sample
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ netif_defs {
queue_number 8
descriptor_number 1024
}
! promisc_mode
! kni_name dpdk0.kni
fdir {
mode perfect
pballoc 64k
status matched
}
! promisc_mode
! kni_name dpdk0.kni
}

<init> device dpdk2 {
Expand All @@ -45,8 +50,13 @@ netif_defs {
queue_number 8
descriptor_number 1024
}
! promisc_mode
! kni_name dpdk2.kni
fdir {
mode perfect
pballoc 64k
status matched
}
! promisc_mode
! kni_name dpdk2.kni
}

<init> bonding bond0 {
Expand All @@ -71,8 +81,8 @@ worker_defs {
port bond0 {
rx_queue_ids 0
tx_queue_ids 0
isol_rx_cpu_ids 9
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 9
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -82,8 +92,8 @@ worker_defs {
port bond0 {
rx_queue_ids 1
tx_queue_ids 1
isol_rx_cpu_ids 10
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 10
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -93,8 +103,8 @@ worker_defs {
port bond0 {
rx_queue_ids 2
tx_queue_ids 2
isol_rx_cpu_ids 11
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 11
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -104,8 +114,8 @@ worker_defs {
port bond0 {
rx_queue_ids 3
tx_queue_ids 3
isol_rx_cpu_ids 12
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 12
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -115,8 +125,8 @@ worker_defs {
port bond0 {
rx_queue_ids 4
tx_queue_ids 4
isol_rx_cpu_ids 13
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 13
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -126,8 +136,8 @@ worker_defs {
port bond0 {
rx_queue_ids 5
tx_queue_ids 5
isol_rx_cpu_ids 14
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 14
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -137,8 +147,8 @@ worker_defs {
port bond0 {
rx_queue_ids 6
tx_queue_ids 6
isol_rx_cpu_ids 15
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 15
! isol_rxq_ring_sz 1048576
}
}

Expand All @@ -148,8 +158,8 @@ worker_defs {
port bond0 {
rx_queue_ids 7
tx_queue_ids 7
isol_rx_cpu_ids 16
isol_rxq_ring_sz 1048576
! isol_rx_cpu_ids 16
! isol_rxq_ring_sz 1048576
}
}
}
Expand Down Expand Up @@ -193,7 +203,7 @@ ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 2000
sync_msg_timeout_us 20000
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -211,15 +221,15 @@ ipvs_defs {
}

udp {
defence_udp_drop
! defence_udp_drop
timeout {
normal 300
last 3
}
}

tcp {
defence_tcp_drop
! defence_tcp_drop
timeout {
none 2
established 90
Expand All @@ -239,19 +249,19 @@ ipvs_defs {
mss 1452
ttl 63
sack
! wscale
! timestamp
! wscale
! timestamp
}
! defer_rs_syn
! defer_rs_syn
rs_syn_max_retry 3
ack_storm_thresh 10
max_ack_saved 3
conn_reuse_state {
close
time_wait
! fin_wait
! close_wait
! last_ack
! fin_wait
! close_wait
! last_ack
}
}
}
Expand Down
31 changes: 18 additions & 13 deletions conf/dpvs.conf.single-nic.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
! global config
global_defs {
log_level WARNING
! log_file /var/log/dpvs.log
! log_file /var/log/dpvs.log
}

! netif config
Expand All @@ -31,7 +31,12 @@ netif_defs {
queue_number 8
descriptor_number 1024
}
! promisc_mode
fdir {
mode perfect
pballoc 64k
status matched
}
! promisc_mode
kni_name dpdk0.kni
}
}
Expand Down Expand Up @@ -172,7 +177,7 @@ ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 2000
sync_msg_timeout_us 20000
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -185,20 +190,20 @@ ipvs_defs {
<init> conn_pool_size 2097152
<init> conn_pool_cache 256
conn_init_timeout 3
! expire_quiescent_template
! fast_xmit_close
! expire_quiescent_template
! fast_xmit_close
}

udp {
defence_udp_drop
! defence_udp_drop
timeout {
normal 300
last 3
}
}

tcp {
defence_tcp_drop
! defence_tcp_drop
timeout {
none 2
established 90
Expand All @@ -218,19 +223,19 @@ ipvs_defs {
mss 1452
ttl 63
sack
! wscale
! timestamp
! wscale
! timestamp
}
! defer_rs_syn
! defer_rs_syn
rs_syn_max_retry 3
ack_storm_thresh 10
max_ack_saved 3
conn_reuse_state {
close
time_wait
! fin_wait
! close_wait
! last_ack
! fin_wait
! close_wait
! last_ack
}
}
}
Expand Down
Loading

0 comments on commit 1eebc85

Please sign in to comment.