Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2954804rwe; Mon, 29 Aug 2022 03:25:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR5PnBAZAYVkjyhXg4jawD0PoA019QdlrwKuiPA46i517ObY/JIcgPtPW5kyNe6kyiqUjuWR X-Received: by 2002:a05:6402:538a:b0:43a:298e:bc2b with SMTP id ew10-20020a056402538a00b0043a298ebc2bmr15653374edb.125.1661768722109; Mon, 29 Aug 2022 03:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661768722; cv=none; d=google.com; s=arc-20160816; b=pDDXgYq9ncCQYQY3Adg5VH1OEKhpQMiFpmeVU+kbXoOUh1t9lzuekaJ5Ql0kjp8+aX LbCDQo8DmHOZGcDNJrIyIW+H8c1t1QWE2a2JMRPHWNdjT5KKG/ra+WbWddaAYR9G+shY QD/sRF/YtiZJbIdyDp0tttHgf4TfgRV0+GKzLccB/yWeltbJ54OAIIvksQiVmL8eDQkO YkXfyNJYrdsve4wYCtu6cY83j2nNEahArbyajHPv8NUvnZhkVoRF84OmBHSOSP6wYvTU JB+VXC2t6XYvCKk4onUoTZE5jbqZUQoA/OVU0prJVJEzqqyoGBsKmTQbidkT24gGSOVO 5HTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SlYMUlG2qSvFZB0N2mq5+Vuwq77kZgSrLYVLPhtOEnc=; b=ltLZkLsvnNS8caMsZRQ1UUgrThlKVH/7KHR0CT7era06uGSANS0RR8IjifXiKEbLvE hiHDWYZkMDGD8CPE2qeVdcuAr0g7abHeBz3ETkEN5mDOV46GRYRtlkcsOb3OHUS0mJfL Izqlm9mDcLPxZywuw7IUt81SrSYXcfKUudaSPmc4hm4E3qRcLNDmhwbytaAcd7vsXbMY iz/pnNOQVWhzZ1vOWqFNR7NRykTeWtpPLBDlY8bxJb7m0OTimnce1If/YTCkgzTA/vbP BRbaClm8q6qcsL9T85ftb6eaEu+5s95d/FA3QdeBdCiELp18RLHOh5TWvLhf/259Jua7 pN1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@blackwall-org.20210112.gappssmtp.com header.s=20210112 header.b=VA8mRlDI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a1709061f4500b0073097bd94ebsi5542003ejk.473.2022.08.29.03.24.56; Mon, 29 Aug 2022 03:25:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@blackwall-org.20210112.gappssmtp.com header.s=20210112 header.b=VA8mRlDI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbiH2JvV (ORCPT + 99 others); Mon, 29 Aug 2022 05:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbiH2JvU (ORCPT ); Mon, 29 Aug 2022 05:51:20 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC2F58B57 for ; Mon, 29 Aug 2022 02:51:18 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id y3so14615416ejc.1 for ; Mon, 29 Aug 2022 02:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=SlYMUlG2qSvFZB0N2mq5+Vuwq77kZgSrLYVLPhtOEnc=; b=VA8mRlDIJuRpUjAr2wap2tw76G9iqQ95P1eKHRbi0MXQ+y5IRx86u42xLbqDa3N5Uw WBpv8t9zipWs3CctFwvBsrOIu5XtbCOP1buoXyRAK4MLU31Yw5ngEBFKEMkK8zVonfRa j0ONoFy8E5axclexgQI8Deix+KM6vUXYS29+vk/m2cgOGWRgF4irThnGgYZYmbUaOgFL UAiaDDzB1hu/DAZMMj9RMnoiMeWabPFTFH2n9WQhu3VNwHXDNrCWsZF6emYbnh58OVDq r+pUZaGHVx50qLZUXUjESZfGWi8gRrSNSOgOjZjybuBNJVt27lkMLyDAdhTM/SlwI1T9 rD/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=SlYMUlG2qSvFZB0N2mq5+Vuwq77kZgSrLYVLPhtOEnc=; b=6MoqbnyKjjF4WVg05ZZhlAe18bHkQJh6miu/tFk1/IKF/bPv0ogyDLulqJ8N6/ieoE 8a64f+YsvPqYNHCidxK3nmI5wjI1ziK91K74KvjmSUijyxQHIbzVqdqiY5h7HO7U1pc8 gO4HFnip0VfYhrmKMqZfoPeGsAHgFPb/hYotuGx6Hx5nckWO8tI0ZhvsC8QcDEYBjcWF lylGVEqS0iT41krfeHnY8KOax5dEwDe6/q9X+72upAUfU/ab1Gta/kysanvrZruU1moU xqxg91LXZbvRjZ7FHE0YxJWyD9dNasC9VgTAByr/k4T3tTdwSk9Hcz0VeP3N3f0rD1ej 3zfw== X-Gm-Message-State: ACgBeo0RK9ljegHdff39K8X866Fc+mbQ4rYlv2nZ/D+KogLdVuPfP/kC ImV943dctpZ75HmxGN7+8Gn2Xw== X-Received: by 2002:a17:907:2d23:b0:730:acf0:4907 with SMTP id gs35-20020a1709072d2300b00730acf04907mr13239673ejc.700.1661766676786; Mon, 29 Aug 2022 02:51:16 -0700 (PDT) Received: from [192.168.0.111] (87-243-81-1.ip.btc-net.bg. [87.243.81.1]) by smtp.gmail.com with ESMTPSA id z2-20020a170906240200b0073c23616cb1sm4374177eja.12.2022.08.29.02.51.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 02:51:16 -0700 (PDT) Message-ID: <4749d6b6-c20c-fd20-f904-accee3f1947a@blackwall.org> Date: Mon, 29 Aug 2022 12:51:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v5 net-next 1/6] net: bridge: add locked entry fdb flag to extend locked port feature Content-Language: en-US To: Ido Schimmel , netdev@kapio-technology.com Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , UNGLinuxDriver@microchip.com, Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Shuah Khan , Christian Marangi , Daniel Borkmann , Yuwei Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org References: <20220826114538.705433-1-netdev@kapio-technology.com> <20220826114538.705433-2-netdev@kapio-technology.com> From: Nikolay Aleksandrov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/08/2022 10:52, Ido Schimmel wrote: > On Sun, Aug 28, 2022 at 12:23:30PM +0200, netdev@kapio-technology.com wrote: >> On 2022-08-27 17:19, Ido Schimmel wrote: >>> On Fri, Aug 26, 2022 at 01:45:33PM +0200, Hans Schultz wrote: >>>> >>>> nbp_switchdev_frame_mark(p, skb); >>>> @@ -943,6 +946,10 @@ static int br_setport(struct net_bridge_port >>>> *p, struct nlattr *tb[], >>>> br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_SUPPRESS, >>>> BR_NEIGH_SUPPRESS); >>>> br_set_port_flag(p, tb, IFLA_BRPORT_ISOLATED, BR_ISOLATED); >>>> br_set_port_flag(p, tb, IFLA_BRPORT_LOCKED, BR_PORT_LOCKED); >>>> + br_set_port_flag(p, tb, IFLA_BRPORT_MAB, BR_PORT_MAB); >>>> + >>>> + if (!(p->flags & BR_PORT_LOCKED)) >>>> + p->flags &= ~BR_PORT_MAB; >> >> The reason for this is that I wanted it to be so that if you have MAB >> enabled (and locked of course) and unlock the port, it will automatically >> clear both flags instead of having to first disable MAB and then unlock the >> port. > > User space can just do: > > # bridge link set dev swp1 locked off mab off > > I prefer not to push such logic into the kernel and instead fail > explicitly. I won't argue if more people are in favor. +1 I prefer to fail explicitly too, actually I also had a comment about this but somehow have managed to delete it before sending my review. :)