Skip to content

Commit

Permalink
Merge pull request iqiyi#487 from iqiyi/v1.7.8-release
Browse files Browse the repository at this point in the history
V1.7.8 release
  • Loading branch information
ywc689 authored Nov 4, 2019
2 parents 4fe6a3f + e2b9820 commit a6d51aa
Show file tree
Hide file tree
Showing 82 changed files with 3,519 additions and 622 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ all:
clean:
for i in $(SUBDIRS); do $(MAKE) -C $$i clean || exit 1; done

distclean:
$(MAKE) -C tools/keepalived distclean || exit 1

install:all
-mkdir -p $(INSDIR)
for i in $(SUBDIRS); do $(MAKE) -C $$i install || exit 1; done
75 changes: 39 additions & 36 deletions conf/dpvs.bond.conf.sample
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
global_defs {
log_level WARNING
! log_file /var/log/dpvs.log
! log_async_mode off
}

! netif config
Expand Down Expand Up @@ -128,14 +129,14 @@ 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
}
port bond1 {
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 @@ -145,14 +146,14 @@ 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
}
port bond1 {
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 @@ -162,14 +163,14 @@ 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
}
port bond1 {
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 @@ -179,14 +180,14 @@ 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
}
port bond1 {
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 @@ -196,14 +197,14 @@ 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
}
port bond1 {
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 @@ -213,14 +214,14 @@ 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
}
port bond1 {
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 @@ -230,14 +231,14 @@ 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
}
port bond1 {
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 @@ -247,14 +248,14 @@ 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
}
port bond1 {
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 @@ -289,7 +290,7 @@ ipv6_defs {
disable off
forwarding off
route6 {
<init> method "hlist"
<init> method hlist
recycle_time 10
}
}
Expand All @@ -298,8 +299,8 @@ ipv6_defs {
ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 20000
priority_level low
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -318,15 +319,17 @@ ipvs_defs {
}

udp {
defence_udp_drop
! defence_udp_drop
uoa_mode opp
uoa_max_trail 3
timeout {
normal 300
last 3
}
}

tcp {
defence_tcp_drop
! defence_tcp_drop
timeout {
none 2
established 90
Expand Down
13 changes: 7 additions & 6 deletions conf/dpvs.conf.items
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

! global config
global_defs {
#daemon <disalbe>
log_level INFO <none>
log_file /var/log/dpvs.log <none>
#daemon <disalbe>
log_level INFO <none>
log_file /var/log/dpvs.log <none>
<init> log_async_mode off <off, on|off>
}

! netif config
Expand Down Expand Up @@ -130,7 +131,7 @@ worker_defs {

! timer config
timer_defs {
# cpu job loops to schedule dpdk timer management
# time interval(us) to schedule dpdk timer management
schedule_interval 500 <10, 1-10000000>
}

Expand Down Expand Up @@ -173,8 +174,8 @@ ctrl_defs {
lcore_msg {
#bucket_number 256
<init> ring_size 4096 <4096, 256-524288>
<init> multicast_queue_length 257 <256, 16-32768>
sync_msg_timeout_us 2000 <2000, 1-∞>
priority_level low <low, low|norm|high|ign>
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl </var/run/dpvs_ctrl, max chars: 256>
Expand All @@ -188,7 +189,7 @@ ipvs_defs {
<init> conn_pool_cache 256 <256, 1-∞>
conn_init_timeout 3 <3, 1-31535999>
expire_quiescent_template <disable>
fast_xmit_close <disable>
<init> fast_xmit_close <disable>
<init> redirect off <off/on: disable/enable packet redirect>
}

Expand Down
7 changes: 5 additions & 2 deletions conf/dpvs.conf.sample
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
global_defs {
log_level WARNING
! log_file /var/log/dpvs.log
! log_async_mode on
}

! netif config
Expand Down Expand Up @@ -242,7 +243,7 @@ ipv6_defs {
disable off
forwarding off
route6 {
<init> method "hlist"
<init> method hlist
recycle_time 10
}
}
Expand All @@ -251,8 +252,8 @@ ipv6_defs {
ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 20000
priority_level low
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -272,6 +273,8 @@ ipvs_defs {

udp {
! defence_udp_drop
uoa_mode opp
uoa_max_trail 3
timeout {
normal 300
last 3
Expand Down
7 changes: 5 additions & 2 deletions conf/dpvs.conf.single-bond.sample
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
global_defs {
log_level WARNING
! log_file /var/log/dpvs.log
! log_async_mode on
}

! netif config
Expand Down Expand Up @@ -194,7 +195,7 @@ ipv6_defs {
disable off
forwarding off
route6 {
<init> method "hlist"
<init> method hlist
recycle_time 10
}
}
Expand All @@ -203,8 +204,8 @@ ipv6_defs {
ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 20000
priority_level low
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -224,6 +225,8 @@ ipvs_defs {

udp {
! defence_udp_drop
uoa_mode opp
uoa_max_trail 3
timeout {
normal 300
last 3
Expand Down
7 changes: 5 additions & 2 deletions conf/dpvs.conf.single-nic.sample
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
global_defs {
log_level WARNING
! log_file /var/log/dpvs.log
! log_async_mode on
}

! netif config
Expand Down Expand Up @@ -167,7 +168,7 @@ ipv6_defs {
disable off
forwarding off
route6 {
<init> method "hlist"
<init> method hlist
recycle_time 10
}
}
Expand All @@ -176,8 +177,8 @@ ipv6_defs {
ctrl_defs {
lcore_msg {
<init> ring_size 4096
<init> multicast_queue_length 256
sync_msg_timeout_us 20000
priority_level low
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl
Expand All @@ -197,6 +198,8 @@ ipvs_defs {

udp {
! defence_udp_drop
uoa_mode opp
uoa_max_trail 3
timeout {
normal 300
last 3
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ You could refer to following links to get `TOA` source code and porting to your

* [Alibaba LVS](https://github.com/alibaba/LVS/blob/master/docs/LVS_user_manual.pdf)
* [UCloud TOA](https://docs.ucloud.cn/security/uads/faq/game)
* [Huawai TOA](https://github.com/Huawei/TCP_option_address)
* [Huawei TOA](https://github.com/Huawei/TCP_option_address)
* [IPVS CA](https://github.com/yubo/ip_vs_ca)

TOA source code is included into DPVS project(in directory `kmod/toa`) since v1.7 to support IPv6 and NAT64. It is derived from the Alibaba TOA. For IPv6 applications which need client's real IP address, we suggest to use this TOA version.
Expand Down
5 changes: 5 additions & 0 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ typedef uint16_t __u16;
typedef uint32_t __u32;
#endif

#define DPVS_WAIT_WHILE(expr) while(expr){;}

typedef enum {
DPVS_STATE_STOP = 1,
DPVS_STATE_INIT,
Expand Down Expand Up @@ -135,6 +137,9 @@ ssize_t writen(int fd, const void *vptr, size_t n);
/* send "n" bytes to a descriptor */
ssize_t sendn(int fd, const void *vptr, size_t n, int flags);

/* get backtrace for the calling program */
int dpvs_backtrace(char *buf, int len);

static inline char *strupr(char *str) {
char *s;
for (s = str; *s != '\0'; s++)
Expand Down
Loading

0 comments on commit a6d51aa

Please sign in to comment.