Skip to content

Commit 4582d20

Browse files
authored
Merge pull request #1043 from iqiyi/devel
Release v1.10.2
2 parents 8ee006c + bc25ed8 commit 4582d20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+8407
-2659
lines changed

kmod/toa/toa.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ init_toa_ip6(void)
239239
{
240240
int i;
241241

242+
toa_ip6_sk_lock.lock = alloc_percpu(spinlock_t);
243+
if (toa_ip6_sk_lock.lock == NULL) {
244+
TOA_INFO("fail to alloc per cpu ip6's destruct lock\n");
245+
return -ENOMEM;
246+
}
247+
242248
for_each_possible_cpu(i) {
243249
spinlock_t *lock;
244250

@@ -251,11 +257,6 @@ init_toa_ip6(void)
251257
spin_lock_init(&__toa_ip6_list_tab[i].lock);
252258
}
253259

254-
toa_ip6_sk_lock.lock = alloc_percpu(spinlock_t);
255-
if (toa_ip6_sk_lock.lock == NULL) {
256-
TOA_INFO("fail to alloc per cpu ip6's destruct lock\n");
257-
return -ENOMEM;
258-
}
259260

260261
return 0;
261262
}

src/VERSION

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
#!/bin/sh
22
# program: dpvs
3-
# Jan 9, 2025 #
3+
# Jun 12, 2025 #
44
##
55
# Features
6-
# - dpvs: Upgrade dpdk from 20.11 to 24.11.
7-
# - dpvs: Support virtio-user kni implement.
8-
# - dpvs: Remove flow director and replace it with rte_flow completely.
9-
# - dpvs: IPv6 routes support flush and lpm differentiates identical prefix routes on different ports.
6+
# - tools: Implement a brand new Healthcheck that enables vip/vip-port/backend 3-tier topology, and supports flexible actioner/checker configurations for each layer.
107
#
118
# Bugfixes
12-
# - dpvs: Fix packet reception problem caused by TX_OFFLOAD_MBUF_FAST_FREE.
13-
# - dpvs: Fix dropped packet accounting problem caused by ARP replies from kni devices.
14-
# - dpvs: Fix some logging and header including problems.
15-
# - dpvs: Flush addrs and routes when vlan device removed.
16-
# - conf: Fix init attribute for serveral config items.
17-
# - script: Fix directory problems in dpdk build script dpdk-build.sh.
9+
# - dpvs: Fix empty nic bonding offload features.
10+
# - dpvs: Optimize TOA insertion performance by using memmove.
1811
#
1912

2013
export VERSION=1.10
21-
export RELEASE=1
14+
export RELEASE=2
2215

2316
echo $VERSION-$RELEASE

src/ipvs/ip_vs_proto_tcp.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ static int tcp_in_add_toa(struct dp_vs_conn *conn, struct rte_mbuf *mbuf,
488488
uint32_t mtu;
489489
struct tcpopt_addr *toa;
490490
uint32_t tcp_opt_len;
491-
uint8_t *p, *q, *tail;
491+
uint8_t *src, *dst, *tail;
492+
size_t move_len;
492493
struct route_entry *rt;
493494
struct route6 *rt6;
494495

@@ -541,15 +542,11 @@ static int tcp_in_add_toa(struct dp_vs_conn *conn, struct rte_mbuf *mbuf,
541542
* now add address option
542543
*/
543544

544-
/* move data down, including existing tcp options
545-
* @p is last data byte,
546-
* @q is new position of last data byte */
547-
p = tail - 1;
548-
q = p + tcp_opt_len;
549-
while (p >= ((uint8_t *)tcph + sizeof(struct tcphdr))) {
550-
*q = *p;
551-
p--, q--;
552-
}
545+
/* move data down, including existing tcp options */
546+
src = (uint8_t *)tcph + sizeof(struct tcphdr);
547+
dst = src + tcp_opt_len;
548+
move_len = tail - src;
549+
memmove(dst, src, move_len);
553550

554551
/* insert toa right after TCP basic header */
555552
toa = (struct tcpopt_addr *)(tcph + 1);

src/netif.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3940,6 +3940,7 @@ static int add_bond_slaves(struct netif_port *port)
39403940
port_mtu_set(port);
39413941
if (rte_eth_dev_info_get(port->id, &port->dev_info))
39423942
RTE_LOG(WARNING, NETIF, "%s: fail to update dev_info of %s\n", __func__, port->name);
3943+
setup_dev_of_flags(port);
39433944

39443945
return EDPVS_OK;
39453946
}
@@ -3975,6 +3976,13 @@ int netif_port_start(struct netif_port *port)
39753976
port->dev_info.max_tx_queues, port->nrxq, port->ntxq);
39763977
}
39773978

3979+
// add slaves and update stored info for bonding device
3980+
if (port->type == PORT_TYPE_BOND_MASTER) {
3981+
ret = add_bond_slaves(port);
3982+
if (ret != EDPVS_OK)
3983+
return ret;
3984+
}
3985+
39783986
if (port->flag & NETIF_PORT_FLAG_RX_IP_CSUM_OFFLOAD)
39793987
port->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_IPV4_CKSUM;
39803988
if (port->flag & NETIF_PORT_FLAG_RX_VLAN_STRIP_OFFLOAD)
@@ -4037,13 +4045,6 @@ int netif_port_start(struct netif_port *port)
40374045
if ((ret = rte_eth_dev_set_mtu(port->id,port->mtu)) != EDPVS_OK)
40384046
return ret;
40394047

4040-
// add slaves and update stored info for bonding device
4041-
if (port->type == PORT_TYPE_BOND_MASTER) {
4042-
ret = add_bond_slaves(port);
4043-
if (ret != EDPVS_OK)
4044-
return ret;
4045-
}
4046-
40474048
netif_print_port_conf(&port->dev_conf, buf, &buflen);
40484049
RTE_LOG(INFO, NETIF, "device %s configuration:\n%s\n", port->name, buf);
40494050

tools/dpvs-agent/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ require (
1414
github.com/jessevdk/go-flags v1.5.0
1515
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
1616
github.com/vishvananda/netlink v1.1.0
17-
golang.org/x/net v0.17.0
18-
golang.org/x/sys v0.13.0
17+
golang.org/x/net v0.33.0
18+
golang.org/x/sys v0.28.0
1919
)
2020

2121
require (

tools/dpvs-agent/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
177177
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
178178
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
179179
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
180-
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
181-
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
180+
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
181+
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
182182
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
183183
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
184184
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -202,8 +202,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
202202
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
203203
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
204204
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
205-
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
206-
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
205+
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
206+
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
207207
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
208208
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
209209
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

tools/healthcheck/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

tools/healthcheck/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ all: $(TARGET)
1111

1212
$(TARGET): go-proxy
1313
-$(GO) mod tidy
14+
$(GO) vet
1415
$(GO_BUILD) -o $@
1516

1617
go-proxy:
@@ -19,6 +20,15 @@ go-proxy:
1920
clean:
2021
$(GO_CLEAN)
2122

23+
MODULE_NAME := $(shell grep '^module ' go.mod | awk '{print $$2}')
24+
GO_PATH := $(shell $(GO) env GOPATH)
25+
code-gen: $(GO_PATH)/bin/deepcopy-gen
26+
$(GO_PATH)/bin/deepcopy-gen --alsologtostderr -i $(MODULE_NAME)/pkg/manager/ -O zz_deepcopy_generated --go-header-file=license.txt --trim-path-prefix=$(MODULE_NAME)
27+
$(GO_PATH)/bin/deepcopy-gen --alsologtostderr -i $(MODULE_NAME)/pkg/comm/ -O zz_deepcopy_generated --go-header-file=license.txt --trim-path-prefix=$(MODULE_NAME)
28+
29+
$(GO_PATH)/bin/deepcopy-gen:
30+
go install k8s.io/code-generator/cmd/deepcopy-gen@v0.29.12
31+
2232
license: license.txt
2333
ifeq ($(shell addlicense 2>&1|grep Usage),)
2434
$(error "`addlicense` command not found. You can install it with `go install github.com/google/addlicense`")

0 commit comments

Comments
 (0)