From patchwork Mon Jan 31 15:46:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Waldekranz X-Patchwork-Id: 12730798 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA7A7C433EF for ; Mon, 31 Jan 2022 15:47:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379796AbiAaPrI (ORCPT ); Mon, 31 Jan 2022 10:47:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379790AbiAaPrH (ORCPT ); Mon, 31 Jan 2022 10:47:07 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98460C06173B for ; Mon, 31 Jan 2022 07:47:06 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id q127so20020727ljq.2 for ; Mon, 31 Jan 2022 07:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=XS8KE71pw/v2S961RpMqGgaRJTZC7ly+qgOupOr0icQ=; b=ikTdhl3iJphvERLi+185zuAqxR7uh7SolCYuWx5X1x6N3m3COjvArPCXhk9GDMFhkz EZfdhAtmhL0rZ8Xjz7Mp6zgUj9fNHhWfZh1Tr1azmnrXqKxEonTEZXpRFKBP95iSFS4T 9ns7RyaaQLoQCugGLCo/dou7if4R8KQrlE7pb1dS8qNA1Xo28cFSRDTAR/g+BeG4EzAn UYXWkLyB0/MXFe2mmFlvn5IC4yRWDYf1rhBpkosvq55PLFHi6/JgK8isQ+wW5WVyIbdK wR6EsX60KxahcpKHpgWAkn2M+jeLYYchOdo1E+nIkv8rMo4+U8Z6q+Ut6vUBsrkCMpnS 4p6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=XS8KE71pw/v2S961RpMqGgaRJTZC7ly+qgOupOr0icQ=; b=BjJ51aZWpFUjxdY5/DoogqLuyf9lyRYDfp4u/dTcahkj7sinjSCG0xlunJVe25Md7W HFLHzrgcpfxNJlBQ29E8Lx2P+LkLk2wJmcl17KlMdRKdxQMBTwhEbEuP4IaQWGVqRE5H S2U+6m8GTVUOGTN820SdmfG6JzGJrfaebXGzgzODwpXsp8hL6Qnb7/pM8kUBd/q1fV5y 0uM1lTdutTW9Dc+mH1tTlZ3MJzbMoREnu1RoqQvPE1pR48oK2Qpbce0FCnd69k8ioqh6 T0IoPGMJ2QzqkCYrtW9q6cJmvOEsco3zkg1IFZh33RGMh06vAzNcQKD2FX249K/bwAEn Zm+Q== X-Gm-Message-State: AOAM532wKoPsuW7Qh0VK1Ipis2oe1fMQ0ogNv7eRX/YUktmd1Pq9ipCj aCZYqq1KvekP35irVxBIqtXyJA== X-Google-Smtp-Source: ABdhPJw3hQGmvlGOAlxRdSyWR94f2t6Mk11cIMBOLJAToN2jSPJhxDpDJBsVHUW1YyvLGyGF79I2AA== X-Received: by 2002:a05:651c:1681:: with SMTP id bd1mr13366990ljb.446.1643644024650; Mon, 31 Jan 2022 07:47:04 -0800 (PST) Received: from veiron.westermo.com (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id y36sm3374769lfa.82.2022.01.31.07.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 07:47:04 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/5] net: dsa: mv88e6xxx: Improve isolation of standalone ports Date: Mon, 31 Jan 2022 16:46:51 +0100 Message-Id: <20220131154655.1614770-2-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com> References: <20220131154655.1614770-1-tobias@waldekranz.com> MIME-Version: 1.0 Organization: Westermo Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Clear MapDA on standalone ports to bypass any ATU lookup that might point the packet in the wrong direction. This means that all packets are flooded using the PVT config. So make sure that standalone ports are only allowed to communicate with the CPU port. Here is a scenario in which this is needed: CPU | .----. .---0---. | .--0--. | sw0 | | | sw1 | '-1-2-3-' | '-1-2-' '---' - sw0p1 and sw1p1 are bridged - sw0p2 and sw1p2 are in standalone mode - Learning must be enabled on sw0p3 in order for hardware forwarding to work properly between bridged ports 1. A packet with SA :aa comes in on sw1p2 1a. Egresses sw1p0 1b. Ingresses sw0p3, ATU adds an entry for :aa towards port 3 1c. Egresses sw0p0 2. A packet with DA :aa comes in on sw0p2 2a. If an ATU lookup is done at this point, the packet will be incorrectly forwarded towards sw0p3. With this change in place, the ATU is pypassed and the packet is forwarded in accordance whith the PVT, which only contains the CPU port. Signed-off-by: Tobias Waldekranz --- drivers/net/dsa/mv88e6xxx/chip.c | 32 +++++++++++++++++++++++++------- drivers/net/dsa/mv88e6xxx/port.c | 7 +++++-- drivers/net/dsa/mv88e6xxx/port.h | 2 +- include/net/dsa.h | 12 ++++++++++++ 4 files changed, 43 insertions(+), 10 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 1023e4549359..dde6a8d0ca36 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1290,8 +1290,15 @@ static u16 mv88e6xxx_port_vlan(struct mv88e6xxx_chip *chip, int dev, int port) pvlan = 0; - /* Frames from user ports can egress any local DSA links and CPU ports, - * as well as any local member of their bridge group. + /* Frames from standalone user ports can only egress on the + * CPU port. + */ + if (!dsa_port_bridge_dev_get(dp)) + return BIT(dsa_switch_upstream_port(ds)); + + /* Frames from bridged user ports can egress any local DSA + * links and CPU ports, as well as any local member of their + * bridge group. */ dsa_switch_for_each_port(other_dp, ds) if (other_dp->type == DSA_PORT_TYPE_CPU || @@ -2487,6 +2494,10 @@ static int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port, if (err) goto unlock; + err = mv88e6xxx_port_set_map_da(chip, port, true); + if (err) + return err; + err = mv88e6xxx_port_commit_pvid(chip, port); if (err) goto unlock; @@ -2521,6 +2532,12 @@ static void mv88e6xxx_port_bridge_leave(struct dsa_switch *ds, int port, mv88e6xxx_port_vlan_map(chip, port)) dev_err(ds->dev, "failed to remap in-chip Port VLAN\n"); + err = mv88e6xxx_port_set_map_da(chip, port, false); + if (err) + dev_err(ds->dev, + "port %d failed to restore map-DA: %pe\n", + port, ERR_PTR(err)); + err = mv88e6xxx_port_commit_pvid(chip, port); if (err) dev_err(ds->dev, @@ -2918,12 +2935,13 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) return err; /* Port Control 2: don't force a good FCS, set the MTU size to - * 10222 bytes, disable 802.1q tags checking, don't discard tagged or - * untagged frames on this port, do a destination address lookup on all - * received packets as usual, disable ARP mirroring and don't send a - * copy of all transmitted/received frames on this port to the CPU. + * 10222 bytes, disable 802.1q tags checking, don't discard + * tagged or untagged frames on this port, skip destination + * address lookup on user ports, disable ARP mirroring and don't + * send a copy of all transmitted/received frames on this port + * to the CPU. */ - err = mv88e6xxx_port_set_map_da(chip, port); + err = mv88e6xxx_port_set_map_da(chip, port, !dsa_is_user_port(ds, port)); if (err) return err; diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index ab41619a809b..ceb450113f88 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -1278,7 +1278,7 @@ int mv88e6xxx_port_drop_untagged(struct mv88e6xxx_chip *chip, int port, return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, new); } -int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port) +int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port, bool map) { u16 reg; int err; @@ -1287,7 +1287,10 @@ int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port) if (err) return err; - reg |= MV88E6XXX_PORT_CTL2_MAP_DA; + if (map) + reg |= MV88E6XXX_PORT_CTL2_MAP_DA; + else + reg &= ~MV88E6XXX_PORT_CTL2_MAP_DA; return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, reg); } diff --git a/drivers/net/dsa/mv88e6xxx/port.h b/drivers/net/dsa/mv88e6xxx/port.h index 03382b66f800..5c347cc58baf 100644 --- a/drivers/net/dsa/mv88e6xxx/port.h +++ b/drivers/net/dsa/mv88e6xxx/port.h @@ -425,7 +425,7 @@ int mv88e6185_port_get_cmode(struct mv88e6xxx_chip *chip, int port, u8 *cmode); int mv88e6352_port_get_cmode(struct mv88e6xxx_chip *chip, int port, u8 *cmode); int mv88e6xxx_port_drop_untagged(struct mv88e6xxx_chip *chip, int port, bool drop_untagged); -int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port); +int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port, bool map); int mv88e6095_port_set_upstream_port(struct mv88e6xxx_chip *chip, int port, int upstream_port); int mv88e6xxx_port_set_mirror(struct mv88e6xxx_chip *chip, int port, diff --git a/include/net/dsa.h b/include/net/dsa.h index 57b3e4e7413b..30f3192616e5 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -581,6 +581,18 @@ static inline bool dsa_is_upstream_port(struct dsa_switch *ds, int port) return port == dsa_upstream_port(ds, port); } +/* Return the local port used to reach the CPU port */ +static inline unsigned int dsa_switch_upstream_port(struct dsa_switch *ds) +{ + int p; + + for (p = 0; p < ds->num_ports; p++) + if (!dsa_is_unused_port(ds, p)) + return dsa_upstream_port(ds, p); + + return ds->num_ports; +} + /* Return true if @upstream_ds is an upstream switch of @downstream_ds, meaning * that the routing port from @downstream_ds to @upstream_ds is also the port * which @downstream_ds uses to reach its dedicated CPU. From patchwork Mon Jan 31 15:46:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Waldekranz X-Patchwork-Id: 12730799 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 492C9C433FE for ; Mon, 31 Jan 2022 15:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379809AbiAaPrJ (ORCPT ); Mon, 31 Jan 2022 10:47:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379790AbiAaPrI (ORCPT ); Mon, 31 Jan 2022 10:47:08 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FBAEC061714 for ; Mon, 31 Jan 2022 07:47:07 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id q22so19990971ljh.7 for ; Mon, 31 Jan 2022 07:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=/al0prgIzPH9k1uNInWvvy4CEvy9CcExx2RD1oCo46Y=; b=5KWGrV7a7PWB02JGslg66o88sDCe4kNVUeDBHdnyaWzVayduuhv14EKYyT9X0DCGk0 umuVm64twjC5RpQN/HLYYJ66XcPuy2uAA72t887I70QhRdlNdzA9OP6c2bQ2s6Oxv2cM P3zCMwXiP55246bFsATE4lF8wzefgesct15jN7jYHthbgCHcTYMm3MxlpNMsp+czZLKq HVGy7NpuHJPm0uZbhJ94SMskkW2Q9dnjfQt+mMd+0xX/oYpW5tE4qj9Kh8iX/Jd1ebIq HMyWikNbwe9In48vWLbhq8N9Sm6/I0hYFn0ztskKn+QmP1yh7EHhcCLwiFyy0bjiI81a AOOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=/al0prgIzPH9k1uNInWvvy4CEvy9CcExx2RD1oCo46Y=; b=ZFUVtPdQgW0WbV48RW6tIxCsBKVNRzKdJvqdy0hX9hJFEeHd2pj8ox0/u9/mnOdZnZ 9m9LI96XDAzwnDEIR1vTl6+IXXl3/Qbp5AuZdWZYGfpRtwEuFAu+pIfplpRaLbunJdK4 H23Rp5h25YvDAJIr3h3RkGerWxP5NejHdcev8yc777+gqC0zrtpkjpRx2lEx+stopDTa G8EZvR/mSlKLiEUJNc8spD0vcwHusCs8GTfn62Gjvhu0Q2kfDLNmwz2lRpPfmdTxY4Jc S0oeseVnRtYJkh952q2KRbLySSf7N4QGGNXBdEGXG2B96uCqiN9RgK0S2/yF/Y4FpOkq nmnw== X-Gm-Message-State: AOAM5336JvT+f5OJZfxaUzUo2NKvvrHvf+mqNJlXxZ0qQPtK8MeMYuo1 T4Z34bB9wQYdhbLD5OcGoktYWg== X-Google-Smtp-Source: ABdhPJwHpyoHA2DXmWbDA6I9qeR5h3L/U+H+Vk5JvnDCCvJQhDKEpT9JtO6GxXnWqgcaBKo5UkIrzw== X-Received: by 2002:a2e:9b0e:: with SMTP id u14mr13990314lji.148.1643644025665; Mon, 31 Jan 2022 07:47:05 -0800 (PST) Received: from veiron.westermo.com (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id y36sm3374769lfa.82.2022.01.31.07.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 07:47:05 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/5] net: dsa: mv88e6xxx: Support policy entries in the VTU Date: Mon, 31 Jan 2022 16:46:52 +0100 Message-Id: <20220131154655.1614770-3-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com> References: <20220131154655.1614770-1-tobias@waldekranz.com> MIME-Version: 1.0 Organization: Westermo Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org A VTU entry with policy enabled is used in combination with a port's VTU policy setting to override normal switching behavior for frames assigned to the entry's VID. A typical example is to Treat all frames in a particular VLAN as control traffic, and trap them to the CPU. In which case the relevant user port's VTU policy would be set to TRAP. Signed-off-by: Tobias Waldekranz --- drivers/net/dsa/mv88e6xxx/chip.h | 1 + drivers/net/dsa/mv88e6xxx/global1.h | 1 + drivers/net/dsa/mv88e6xxx/global1_vtu.c | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h index 438cee853d07..80dc7b549e81 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -179,6 +179,7 @@ struct mv88e6xxx_vtu_entry { u16 fid; u8 sid; bool valid; + bool policy; u8 member[DSA_MAX_PORTS]; u8 state[DSA_MAX_PORTS]; }; diff --git a/drivers/net/dsa/mv88e6xxx/global1.h b/drivers/net/dsa/mv88e6xxx/global1.h index 4f3dbb015f77..2c1607c858a1 100644 --- a/drivers/net/dsa/mv88e6xxx/global1.h +++ b/drivers/net/dsa/mv88e6xxx/global1.h @@ -46,6 +46,7 @@ /* Offset 0x02: VTU FID Register */ #define MV88E6352_G1_VTU_FID 0x02 +#define MV88E6352_G1_VTU_FID_VID_POLICY 0x1000 #define MV88E6352_G1_VTU_FID_MASK 0x0fff /* Offset 0x03: VTU SID Register */ diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c b/drivers/net/dsa/mv88e6xxx/global1_vtu.c index ae12c981923e..b1bd9274a562 100644 --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c @@ -27,7 +27,7 @@ static int mv88e6xxx_g1_vtu_fid_read(struct mv88e6xxx_chip *chip, return err; entry->fid = val & MV88E6352_G1_VTU_FID_MASK; - + entry->policy = !!(val & MV88E6352_G1_VTU_FID_VID_POLICY); return 0; } @@ -36,6 +36,9 @@ static int mv88e6xxx_g1_vtu_fid_write(struct mv88e6xxx_chip *chip, { u16 val = entry->fid & MV88E6352_G1_VTU_FID_MASK; + if (entry->policy) + val |= MV88E6352_G1_VTU_FID_VID_POLICY; + return mv88e6xxx_g1_write(chip, MV88E6352_G1_VTU_FID, val); } From patchwork Mon Jan 31 15:46:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Waldekranz X-Patchwork-Id: 12730800 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EFDBC433F5 for ; Mon, 31 Jan 2022 15:47:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379817AbiAaPrL (ORCPT ); Mon, 31 Jan 2022 10:47:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379802AbiAaPrI (ORCPT ); Mon, 31 Jan 2022 10:47:08 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45BCBC06173E for ; Mon, 31 Jan 2022 07:47:08 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id q127so20020867ljq.2 for ; Mon, 31 Jan 2022 07:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=tWF6c50iluk3gJWzzn2nu1IXzyQw+e+0Zhpcp6dcL3w=; b=Jbk3gukCnhxmdiZU+9xzA2ljkZcm/ma0pywuYYKWI5RpsI4ovcscKufG87o9Kn2lFJ N865G2uzR/dppRp/HI/2iSR3PVLurIEEwohkhHZeMzYcgDBNANwl3MXLrFT3quQmvdua qVX+Pp5THkUSnhYbFccV1r1jzW8Ol0qkxJFU1toE8SskLLmy3R3M1AVMnVeqAYzHHopm COZcN+Pzsa1BHbbpcJWSkvWwARiVfOveX1OuIItjPRpjZ8MN/6/WgsRPmMxuYdYdy11F 1zbCPjzj+Gy50xL8vTSTqWkxE8BIXUGJuTelZ9U1eqK8nIjAxqAGHN6Tn5Ftejcy5NAs Sf6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=tWF6c50iluk3gJWzzn2nu1IXzyQw+e+0Zhpcp6dcL3w=; b=MA46mka0oaV0puYhxtD5cGSThEOV50ghwOJPznZE7I85WsmWwq2zIPTPHW/uKJKwvU RTbSIYlIsMl5qH5UejMP9R+Um38u+SpfBj3E3/Q15GaKAqWbYPgP31U/PfItFE+fi13A dpAV7fdh80wKhbWi/7Y4/BnXW/nCkb0w8zcPFsJlkmjkpvIq4U8FkIPh1NDDW6tWI+0H EEZImDNStVU3HD0xVEVu8bvz6hL7MpsSbtRPwRwJUh1Zw8acJM8U12/csCw5M1F4xHx2 f0ySCLOkEICEegX8WQgY53qtQ8yN7ZthfGcxIFG2TgUzVt1BDymMId3gkrX2BuQ6+rgt JZjg== X-Gm-Message-State: AOAM532jrC2saqQxKcFWmm4AGIvuBpItpQIfI5Mc2MnIfVkFqk6A/oUf k52vsuGLz6HTf6RtmuprjsPXdA== X-Google-Smtp-Source: ABdhPJwh9KDovrHgZIc7eIf4hAso96TSKRmbgq3VRJLuec/AC/qFjvlNO4g/0e8OXTstuSKOxy8uvg== X-Received: by 2002:a2e:2e16:: with SMTP id u22mr13549471lju.205.1643644026573; Mon, 31 Jan 2022 07:47:06 -0800 (PST) Received: from veiron.westermo.com (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id y36sm3374769lfa.82.2022.01.31.07.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 07:47:06 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/5] net: dsa: mv88e6xxx: Enable port policy support on 6097 Date: Mon, 31 Jan 2022 16:46:53 +0100 Message-Id: <20220131154655.1614770-4-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com> References: <20220131154655.1614770-1-tobias@waldekranz.com> MIME-Version: 1.0 Organization: Westermo Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This chip has support for the same per-port policy actions found in later versions of LinkStreet devices. Fixes: f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") Signed-off-by: Tobias Waldekranz --- drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index dde6a8d0ca36..8896709b9103 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3652,6 +3652,7 @@ static const struct mv88e6xxx_ops mv88e6097_ops = { .port_sync_link = mv88e6185_port_sync_link, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood, From patchwork Mon Jan 31 15:46:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Waldekranz X-Patchwork-Id: 12730801 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C862C433EF for ; Mon, 31 Jan 2022 15:47:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379816AbiAaPrM (ORCPT ); Mon, 31 Jan 2022 10:47:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379810AbiAaPrJ (ORCPT ); Mon, 31 Jan 2022 10:47:09 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28600C061714 for ; Mon, 31 Jan 2022 07:47:09 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id t9so19946368lji.12 for ; Mon, 31 Jan 2022 07:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=J8azPKw6fGS+HND9Kjsz3s+Jgbh9IVkU4laM4Xl6KxI=; b=MPrALNL1pv0pz1YMPRz04EYCNwsgmMrmhYUkkSHFURKw3MnC/7Nd/Cga3BIVetBnGR GW+ZtDoNdlLTeMfTeqUKKf8S72GrZ+81m/KHgwMWSobK525gnY8qDaN3w4eBm/wlC00w XV2Dmxcy39LXMapfA47N55Fyj6V2xpmgNobIvvfibWmK+x1QseFAY7UK2gg4mDNqiMzv AXRNMfzK2lmIUma9TGVaEGB28q5WwDqGptVyfPaNn3YQdhs4vf+RbfqsLdxe0TCYWWul B6bNy2Um6fHbFgO0KpPwusRjb5Fc7OZM8VtEwRFWcSHVxicOjzcb+wmnjFMF/pI3ZXff dnxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=J8azPKw6fGS+HND9Kjsz3s+Jgbh9IVkU4laM4Xl6KxI=; b=BRmXOygiG64fI0H8s/uworsuRZePlRj44SkzI9FfnynpqiAbz3danv97KSRCTpcGoR Qy5Tu2EPXvMOslRxWkSolm6ydo6lN309yHgdca0R+IAz0XS/bYU9BYtgfdYJ7hf7LATF /eOwIgmkq/YwIn6Ps3qbxyEQ0qjwxc3G/Vj5lHNmrBeBNB6CiZCfc5gSGQFVPFeW4Kg0 UB1QSQtSzFI/diu2XSiU7Bp0sD5l5bRlQA1ZrS97D2NElsBLmaDlqQ0kRZKewYCDUR4l 8RZ3XjjmktesItk911d/aZq3lqXvv3nUCioSeRivGclaXXCdwvY7XmkDYiQUyaWYxDGw LVFQ== X-Gm-Message-State: AOAM533fRbqQm1TFTjAL8EjLJpQ4JxfY/RkBaragxMJ3KE+tsihg8Zri kzORrOh3gdeyi1fsnWesC++MkQ== X-Google-Smtp-Source: ABdhPJzxef0rNjIQJ7dy6S5Dn6MgpCjUMBQxFhoKa0uZLPdThEoS3LtY6fOJqBz2XBOwkpaMHrhFBg== X-Received: by 2002:a2e:88da:: with SMTP id a26mr13206527ljk.256.1643644027465; Mon, 31 Jan 2022 07:47:07 -0800 (PST) Received: from veiron.westermo.com (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id y36sm3374769lfa.82.2022.01.31.07.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 07:47:07 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/5] net: dsa: mv88e6xxx: Improve multichip isolation of standalone ports Date: Mon, 31 Jan 2022 16:46:54 +0100 Message-Id: <20220131154655.1614770-5-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com> References: <20220131154655.1614770-1-tobias@waldekranz.com> MIME-Version: 1.0 Organization: Westermo Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Given that standalone ports are now configured to bypass the ATU and forward all frames towards the upstream port, extend the ATU bypass to multichip systems. Load VID 0 (standalone) into the VTU with the policy bit set. Since VID 4095 (bridged) is already loaded, we now know that all VIDs in use are always available in all VTUs. Therefore, we can safely enable 802.1Q on DSA ports. Setting the DSA ports' VTU policy to TRAP means that all incoming frames on VID 0 will be classified as MGMT - as a result, the ATU is bypassed on all subsequent switches. With this isolation in place, we are able to support configurations that are simultaneously very quirky and very useful. Quirky because it involves looping cables between local switchports like in this example: CPU | .------. .---0---. | .----0----. | sw0 | | | sw1 | '-1-2-3-' | '-1-2-3-4-' $ @ '---' $ @ % % We have three physically looped pairs ($, @, and %). This is very useful because it allows us to run the kernel's kselftests for the bridge on mv88e6xxx hardware. Signed-off-by: Tobias Waldekranz --- drivers/net/dsa/mv88e6xxx/chip.c | 63 ++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 8896709b9103..d0d766354669 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1630,21 +1630,11 @@ static int mv88e6xxx_fid_map_vlan(struct mv88e6xxx_chip *chip, int mv88e6xxx_fid_map(struct mv88e6xxx_chip *chip, unsigned long *fid_bitmap) { - int i, err; - u16 fid; - bitmap_zero(fid_bitmap, MV88E6XXX_N_FID); - /* Set every FID bit used by the (un)bridged ports */ - for (i = 0; i < mv88e6xxx_num_ports(chip); ++i) { - err = mv88e6xxx_port_get_fid(chip, i, &fid); - if (err) - return err; - - set_bit(fid, fid_bitmap); - } - - /* Set every FID bit used by the VLAN entries */ + /* Every FID has an associated VID, so walking the VTU + * will discover the full set of FIDs in use. + */ return mv88e6xxx_vtu_walk(chip, mv88e6xxx_fid_map_vlan, fid_bitmap); } @@ -1657,10 +1647,7 @@ static int mv88e6xxx_atu_new(struct mv88e6xxx_chip *chip, u16 *fid) if (err) return err; - /* The reset value 0x000 is used to indicate that multiple address - * databases are not needed. Return the next positive available. - */ - *fid = find_next_zero_bit(fid_bitmap, MV88E6XXX_N_FID, 1); + *fid = find_first_zero_bit(fid_bitmap, MV88E6XXX_N_FID); if (unlikely(*fid >= mv88e6xxx_num_databases(chip))) return -ENOSPC; @@ -2152,6 +2139,9 @@ static int mv88e6xxx_port_vlan_join(struct mv88e6xxx_chip *chip, int port, if (!vlan.valid) { memset(&vlan, 0, sizeof(vlan)); + if (vid == MV88E6XXX_VID_STANDALONE) + vlan.policy = true; + err = mv88e6xxx_atu_new(chip, &vlan.fid); if (err) return err; @@ -2949,8 +2939,43 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) if (err) return err; + /* On chips that support it, set all DSA ports' VLAN policy to + * TRAP. In combination with loading MV88E6XXX_VID_STANDALONE + * as a policy entry in the VTU, this provides a better + * isolation barrier between standalone ports, as the ATU is + * bypassed on any intermediate switches between the incoming + * port and the CPU. + */ + if (!dsa_is_user_port(ds, port) && chip->info->ops->port_set_policy) { + err = chip->info->ops->port_set_policy(chip, port, + MV88E6XXX_POLICY_MAPPING_VTU, + MV88E6XXX_POLICY_ACTION_TRAP); + if (err) + return err; + } + + /* User ports start out in standalone mode and 802.1Q is + * therefore disabled. On DSA ports, all valid VIDs are always + * loaded in the VTU - therefore, enable 802.1Q in order to take + * advantage of VLAN policy on chips that supports it. + */ err = mv88e6xxx_port_set_8021q_mode(chip, port, - MV88E6XXX_PORT_CTL2_8021Q_MODE_DISABLED); + dsa_is_user_port(ds, port) ? + MV88E6XXX_PORT_CTL2_8021Q_MODE_DISABLED : + MV88E6XXX_PORT_CTL2_8021Q_MODE_SECURE); + if (err) + return err; + + /* Bind MV88E6XXX_VID_STANDALONE to MV88E6XXX_FID_STANDALONE by + * virtue of the fact that mv88e6xxx_atu_new() will pick it as + * the first free FID. This will be used as the private PVID for + * unbridged ports. Shared (DSA and CPU) ports must also be + * members of this VID, in order to trap all frames assigned to + * it to the CPU. + */ + err = mv88e6xxx_port_vlan_join(chip, port, MV88E6XXX_VID_STANDALONE, + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED, + false); if (err) return err; @@ -2963,7 +2988,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) * relying on their port default FID. */ err = mv88e6xxx_port_vlan_join(chip, port, MV88E6XXX_VID_BRIDGED, - MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED, + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED, false); if (err) return err; From patchwork Mon Jan 31 15:46:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Waldekranz X-Patchwork-Id: 12730802 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2FCBC433FE for ; Mon, 31 Jan 2022 15:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379866AbiAaPrU (ORCPT ); Mon, 31 Jan 2022 10:47:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379821AbiAaPrN (ORCPT ); Mon, 31 Jan 2022 10:47:13 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64CCCC06173B for ; Mon, 31 Jan 2022 07:47:12 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id t9so19946567lji.12 for ; Mon, 31 Jan 2022 07:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=oi9yvU3XKTdc5uhXdMEKWVeiea3s3v3BWMJvFWzqoII=; b=TAh0C2wliAYjMd4G1rAPxd/DFTr3IOIZa1naAEywf9trhKvRPRrNYFhN+R2+nFtnnf 9dC8Fxiv09pGPLaUC7kv4Qb2jWaeOUFfpc8zhviw7bSWy2EnvMVIF5MFFheCw4LFob7N BqX9W2bCzfIa2Am3hkOr5nYSbkC/Eo1kNXWPBX0XHfFv0jBNvqo5KhFG8JmVtGZVd52A ih8KTtrXhhbTtizICgog7Kk9GEE8DO/PS8PL8eBKnXwCaYRRzuHoEA4aDHDwmZ3rnh0s Y0dR6NwKUGZnj+JSbwOXd+fJfs/2jclqvGudIcMNoCTfrKiMoNEfNN/Xbu1JkCAf6oKp ApSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=oi9yvU3XKTdc5uhXdMEKWVeiea3s3v3BWMJvFWzqoII=; b=4FlYGiQ5EEGXMLTNTU25RtUppPCNLhvQfLNCHFVPzrpxT8WfmKg058UNQlKU3hYpZ/ 6d4QJ6DnVXQqcFE01zI380M7uppUTM8S0rE7/AEVsEJAbFpdZUt5BDD1Vxmz783wVLPh B3wxl3OWBX2+5x71cVANq7+JhICy93zvZ5ZsFIWu47guuAo/LOD0b20C6IQJkyXKMp88 r2FEQgK+uX+2fFHIuvAzQlhtAb3vWmeZ17iQm1eohhF/27EnC9xHaboGaHvnqey9fdvl RpIagwc/VYEgE/yxcocF+IRRcaAUXqwmJ5Wc1mRg0t7LkIdFiyrrpCZqdyidpTSwBkpJ wwZA== X-Gm-Message-State: AOAM5322dlATIkK4e32MsondX2OWRhRGfCLxnK6ddThhtkhqXFw7/4Le rMoOajSxpuzBDt5Fa010BX9MpQ== X-Google-Smtp-Source: ABdhPJyQQfbSWV9V3EsbXhsuEJCNUlwB19GG+Vcl3voDZSZwcVMWvgDaeQzvVe++yfXD/cZJKwGaaw== X-Received: by 2002:a2e:9d96:: with SMTP id c22mr10537327ljj.293.1643644030741; Mon, 31 Jan 2022 07:47:10 -0800 (PST) Received: from veiron.westermo.com (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id y36sm3374769lfa.82.2022.01.31.07.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 07:47:10 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Shuah Khan , Ido Schimmel , Amit Cohen , David Ahern , Hangbin Liu , Stephen Suryaputra , Petr Machata , Florian Fainelli , Vladimir Oltean , Guillaume Nault , Po-Hsu Lin , Danielle Ratson , Baowen Zheng , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 5/5] selftests: net: bridge: Parameterize ageing timeout Date: Mon, 31 Jan 2022 16:46:55 +0100 Message-Id: <20220131154655.1614770-6-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com> References: <20220131154655.1614770-1-tobias@waldekranz.com> MIME-Version: 1.0 Organization: Westermo Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Allow the ageing timeout that is set on bridges to be customized from forwarding.config. This allows the tests to be run on hardware which does not support a 10s timeout (e.g. mv88e6xxx). Signed-off-by: Tobias Waldekranz Reviewed-by: Petr Machata --- tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh | 5 +++-- .../testing/selftests/net/forwarding/bridge_vlan_unaware.sh | 5 +++-- .../selftests/net/forwarding/forwarding.config.sample | 2 ++ tools/testing/selftests/net/forwarding/lib.sh | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh index b90dff8d3a94..64bd00fe9a4f 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh @@ -28,8 +28,9 @@ h2_destroy() switch_create() { - # 10 Seconds ageing time. - ip link add dev br0 type bridge vlan_filtering 1 ageing_time 1000 \ + ip link add dev br0 type bridge \ + vlan_filtering 1 \ + ageing_time $LOW_AGEING_TIME \ mcast_snooping 0 ip link set dev $swp1 master br0 diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh index c15c6c85c984..1c8a26046589 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh @@ -27,8 +27,9 @@ h2_destroy() switch_create() { - # 10 Seconds ageing time. - ip link add dev br0 type bridge ageing_time 1000 mcast_snooping 0 + ip link add dev br0 type bridge \ + ageing_time $LOW_AGEING_TIME \ + mcast_snooping 0 ip link set dev $swp1 master br0 ip link set dev $swp2 master br0 diff --git a/tools/testing/selftests/net/forwarding/forwarding.config.sample b/tools/testing/selftests/net/forwarding/forwarding.config.sample index b0980a2efa31..4a546509de90 100644 --- a/tools/testing/selftests/net/forwarding/forwarding.config.sample +++ b/tools/testing/selftests/net/forwarding/forwarding.config.sample @@ -41,6 +41,8 @@ NETIF_CREATE=yes # Timeout (in seconds) before ping exits regardless of how many packets have # been sent or received PING_TIMEOUT=5 +# Minimum ageing_time (in centiseconds) supported by hardware +LOW_AGEING_TIME=1000 # Flag for tc match, supposed to be skip_sw/skip_hw which means do not process # filter by software/hardware TC_FLAG=skip_hw diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 7da783d6f453..e7e434a4758b 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -24,6 +24,7 @@ PING_COUNT=${PING_COUNT:=10} PING_TIMEOUT=${PING_TIMEOUT:=5} WAIT_TIMEOUT=${WAIT_TIMEOUT:=20} INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600} +LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000} REQUIRE_JQ=${REQUIRE_JQ:=yes} REQUIRE_MZ=${REQUIRE_MZ:=yes}