Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp488712pxa; Wed, 12 Aug 2020 07:07:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHGLw8TpDxfA78q0xM1Tsq4jRbA0yc6W9YoeRnmDFZgCFc9bhuAwMnZ6rjo3hyJTjyQknC X-Received: by 2002:a17:907:40bf:: with SMTP id nu23mr24667785ejb.243.1597241237861; Wed, 12 Aug 2020 07:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597241237; cv=none; d=google.com; s=arc-20160816; b=II5LEuF5FR3CWrIB6WMWuDlNlVkz0AuKHNA7UQQ0yVeLj7qSFOI2wCPAShiYxK9gr3 NuzKOKPcKajFU2MMfZZIr4jgGkbNazhTwehyla1rmRiiLRMDzaymxK8Qu8Hjqr5iYpAs KZC72tCXUSjDm2J2kPRPuMKhTs8VDkNeJTECB9K0LFjwI+KpH3TzO3v/wqFMl4ji+sm7 8IMRqHtS3Dkp5m/SS0QxuWecwRO9dYeJoNbkjKsEX4PfUq5UmrHkxMO4VwCEb5Gk9WKi OrONzt4ODS9+/KEDs3d4uiNLAayI8wU/YlWskXAAkv3XojrE2r+DpMM0twFuy42Br/pZ 2N7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bvzwBG55yWNUJymtgKORuaHlO7IeAdZb7vW3rcJXz1Y=; b=gyw7/IO5KnRmHjh/BNpD6HDaFCWUzJfEtMcAlZJTXhavSyZJj36AwSP+OM5L07crkB SazgVo2RfixsIarJ748qcsNYl1Wb/KF6Rnqpk2v/qHPtOYrC/ns5KH6Sgx6Q3v52vWlo xH9BEPFY3pn+k1UU8gmrfIwL5rmBA8qGPG11eERou2U9NmJuT/xWNpDJX5qvCylfe/Vn WEnQTLemGRV0zJE2aYwZwQhcO9rbsyMSOt9sUvfCQ8126W7g9j66APDNF0RO13M9Z+/x T8gRBn9lStt5tzZZf1lm+q1C/Vf58Nl761k7O+pVbWX64+jWS1rjqxA5Ig77UquizEO4 fejw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si1376248edj.383.2020.08.12.07.06.53; Wed, 12 Aug 2020 07:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbgHLODf (ORCPT + 99 others); Wed, 12 Aug 2020 10:03:35 -0400 Received: from foss.arm.com ([217.140.110.172]:45598 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727016AbgHLODc (ORCPT ); Wed, 12 Aug 2020 10:03:32 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 89B3FD6E; Wed, 12 Aug 2020 07:03:31 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.210.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6F9DF3F70D; Wed, 12 Aug 2020 07:03:28 -0700 (PDT) From: Jianlin Lv To: bpf@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, Song.Zhu@arm.com, Jianlin.Lv@arm.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH bpf-next] bpf: fix load XDP program error in test_xdp_vlan Date: Wed, 12 Aug 2020 22:03:22 +0800 Message-Id: <20200812140322.132844-1-Jianlin.Lv@arm.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org test_xdp_vlan.sh reports the error as below: $ sudo ./test_xdp_vlan_mode_native.sh + '[' -z xdp_vlan_mode_native ']' + XDP_MODE=xdpgeneric …… + export XDP_PROG=xdp_vlan_remove_outer2 + XDP_PROG=xdp_vlan_remove_outer2 + ip netns exec ns1 ip link set veth1 xdpdrv off Error: XDP program already attached. ip will throw an error in case a XDP program is already attached to the networking interface, to prevent it from being overridden by accident. In order to replace the currently running XDP program with a new one, the -force option must be used. Signed-off-by: Jianlin Lv --- tools/testing/selftests/bpf/test_xdp_vlan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_xdp_vlan.sh b/tools/testing/selftests/bpf/test_xdp_vlan.sh index bb8b0da91686..034e603aeb50 100755 --- a/tools/testing/selftests/bpf/test_xdp_vlan.sh +++ b/tools/testing/selftests/bpf/test_xdp_vlan.sh @@ -220,7 +220,7 @@ ip netns exec ns1 ping -i 0.2 -W 2 -c 2 $IPADDR2 # ETH_P_8021Q indication, and this cause overwriting of our changes. # export XDP_PROG=xdp_vlan_remove_outer2 -ip netns exec ns1 ip link set $DEVNS1 $XDP_MODE off +ip netns exec ns1 ip -force link set $DEVNS1 $XDP_MODE off ip netns exec ns1 ip link set $DEVNS1 $XDP_MODE object $FILE section $XDP_PROG # Now the namespaces should still be able reach each-other, test with ping: -- 2.17.1