Unverified Commit e81a1b10 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13453 [OLK-6.6][Backport] selftest: net: Fix the problem that run veth.sh failed

Merge Pull Request from: @lazy2528 
 
主要从upstream同步以下补丁来修复veth.sh测试失败问题:
1a825e4cdf457b7aef7ebbc2f1206654f5beb150 selftests: net: veth: test syncing GRO and XDP state while device is down
ba5a6476e3866c97e2c85f64b0c7dfb8fbdda18a selftests: net: veth: test the ability to independently manipulate GRO and XDP

#IB6GEA 
 
 
Link:https://gitee.com/openeuler/kernel/pulls/13453

 

Reviewed-by: default avatarZhang Peng <zhangpeng362@huawei.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents 3b53e7f8 b2b6a977
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ for family in 4 6; do
	cleanup

	create_ns
	ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
	ip netns exec $NS_DST ethtool -K veth$DST rx-gro-list on
	run_test "GRO frag list" $BM_NET$DST 1 0
	cleanup
@@ -227,6 +228,7 @@ for family in 4 6; do
	# use NAT to circumvent GRO FWD check
	create_ns
	ip -n $NS_DST addr add dev veth$DST $BM_NET$DST_NAT/$SUFFIX
	ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
	ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
	ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $BM_NET$DST_NAT \
					-j DNAT --to-destination $BM_NET$DST
@@ -240,6 +242,7 @@ for family in 4 6; do
	cleanup

	create_vxlan_pair
	ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
	ip netns exec $NS_DST ethtool -K veth$DST rx-gro-list on
	run_test "GRO frag list over UDP tunnel" $OL_NET$DST 10 10
	cleanup
@@ -247,6 +250,7 @@ for family in 4 6; do
	# use NAT to circumvent GRO FWD check
	create_vxlan_pair
	ip -n $NS_DST addr add dev $VXDEV$DST $OL_NET$DST_NAT/$SUFFIX
	ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
	ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
	ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $OL_NET$DST_NAT \
					-j DNAT --to-destination $OL_NET$DST
+33 −1
Original line number Diff line number Diff line
@@ -246,6 +246,35 @@ ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
chk_gro "        - aggregation with TSO off" 1
cleanup

create_ns
ip -n $NS_DST link set dev veth$DST up
ip -n $NS_DST link set dev veth$DST xdp object ${BPF_FILE} section xdp
chk_gro_flag "gro vs xdp while down - gro flag off" $DST off
ip -n $NS_DST link set dev veth$DST down
chk_gro_flag "                      - after down" $DST off
ip -n $NS_DST link set dev veth$DST xdp off
chk_gro_flag "                      - after xdp off" $DST off
ip -n $NS_DST link set dev veth$DST up
chk_gro_flag "                      - after up" $DST off
ip -n $NS_SRC link set dev veth$SRC xdp object ${BPF_FILE} section xdp
chk_gro_flag "                      - after peer xdp" $DST off
cleanup

create_ns
ip -n $NS_DST link set dev veth$DST up
ip -n $NS_DST link set dev veth$DST xdp object ${BPF_FILE} section xdp
ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
chk_gro_flag "gro vs xdp while down - gro flag on" $DST on
ip -n $NS_DST link set dev veth$DST down
chk_gro_flag "                      - after down" $DST on
ip -n $NS_DST link set dev veth$DST xdp off
chk_gro_flag "                      - after xdp off" $DST on
ip -n $NS_DST link set dev veth$DST up
chk_gro_flag "                      - after up" $DST on
ip -n $NS_SRC link set dev veth$SRC xdp object ${BPF_FILE} section xdp
chk_gro_flag "                      - after peer xdp" $DST on
cleanup

create_ns
chk_channels "default channels" $DST 1 1

@@ -313,11 +342,14 @@ if [ $CPUS -gt 2 ]; then
fi

ip -n $NS_DST link set dev veth$DST xdp object ${BPF_FILE} section xdp 2>/dev/null
chk_gro_flag "with xdp attached - gro flag" $DST on
chk_gro_flag "with xdp attached - gro flag" $DST off
chk_gro_flag "        - peer gro flag" $SRC off
chk_tso_flag "        - tso flag" $SRC off
chk_tso_flag "        - peer tso flag" $DST on
ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
chk_gro "        - no aggregation" 10
ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
chk_gro_flag "        - gro flag with GRO on" $DST on
chk_gro "        - aggregation" 1