Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1268448rdb; Wed, 20 Sep 2023 04:48:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyOdA9e4JP01XTIswaGML4FBXb+KQa0aQQU1yyA0ROIHZELR9qUBwH6R5kNiwpdssotUwR X-Received: by 2002:a17:903:41c7:b0:1be:f45c:bc38 with SMTP id u7-20020a17090341c700b001bef45cbc38mr2399768ple.2.1695210490154; Wed, 20 Sep 2023 04:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695210490; cv=none; d=google.com; s=arc-20160816; b=b1yqNhJroz+8ThjGlgTsT9nn7M6HxRSwpme4L5hKbASlwGXFFJnMOuiDulJQ+OdVb3 QKJY4f2PmJv2mjQ7JtiNU7LoHu5FWjtfdQpOQJukEl2DPssBi/G9mbjkpO2LudGmO0Uy 1GvLVHaCAt/sb2fON7v8PQGEH/7W8EZeCPa7Voxle+WrjONcQyDBN+1Dbk1pjvbZzRFO bQNqhd4TsAo2sy+9tZTqdIuEAaRIaVE+lsJuzm317SQRQuDH9lbFgbqXhAsjPt62I6Sd CCSRV+tTlI7kmwm+j4RA2MvwPhHFM9T683RfFpiA/y7mVJGYy4Y/HfMN2vXSmSQz6iDa ybzw== 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=7O7mWyhJga1IYEYoLQcrmnzYFbmyVRQyHT7Q+TKsjdE=; fh=r8zpVSSoSO6PfqQy7ooLS7GpPkua5AzwTepuYCrhBPo=; b=B4480BmSPbLavpCYfDJyUoyE+bT/uLnvDiKdp4pEivVoawTTkP+//WX//qOMwBXWX/ PWKW5QG9tceQLqBamMRYbO56S8XIMIsj2oeSRRi+pQNDXernxPqNZmZcnd/mht3C2DRb vAqP3eIiBQ8Ix+b4OX/Pa/f03GRJuSIMo02kQWRhZ/jPT0pDQggtgUG0435nuCR/Wvfd rSAvPHl70LHd/rGP3WL39xNpoTcviEK00IEiPkBBPZWjurtygnd8O9lGRP7MckcQGzdZ gNTepbLc/H3qI/P+TsneCM4OVqbYIG1/9WwsSioJFEi/Ui6u/eEXHjgizXFzRbES9aAK CqtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=E2hk2cM2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t7-20020a17090340c700b001bbd91b1e94si11659118pld.505.2023.09.20.04.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 04:48:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=E2hk2cM2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2596D828F223; Wed, 20 Sep 2023 03:44:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234267AbjITKod (ORCPT + 99 others); Wed, 20 Sep 2023 06:44:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234054AbjITKo0 (ORCPT ); Wed, 20 Sep 2023 06:44:26 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6215CA for ; Wed, 20 Sep 2023 03:44:19 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9aa2c6f0806so874894766b.3 for ; Wed, 20 Sep 2023 03:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20230601.gappssmtp.com; s=20230601; t=1695206658; x=1695811458; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7O7mWyhJga1IYEYoLQcrmnzYFbmyVRQyHT7Q+TKsjdE=; b=E2hk2cM20Acvnfd3/3r7bxco2Xyc0iWlKaxvEDn66gMvg4j+yLaCjLxSS/1XLzeztT 0GcjIrAB0g+8dMRdvSv7aWe5QgdE6XIrv2MCva65kYwn7SKMr2RiOOM325asIkrK3rNW mHnSubkPq1b1fmG0LeLgvEeUvm4V26zsB5rCSkGRAY8nId+FCUl13RTZasWpJkx3AfWR v3+IQz9WtWFjdzvBYZ5k0Epw1IqS3o13qrHRlXsvSKBJ94uhop8fRmAeKiW38UrvmI+9 leITM0vDHseACWXK2MYiHb5qOYCOFS9m/0hrG+umiugsv3ZtC1xmAtm7JaGW85q2k907 14og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695206658; x=1695811458; 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:subject:date:message-id:reply-to; bh=7O7mWyhJga1IYEYoLQcrmnzYFbmyVRQyHT7Q+TKsjdE=; b=jCDSFDl+y9g7a27vpJH/Inb9+o1U4h4+FaGyd/C/+n/4C64yeOv4AQGQ+KKc5XErDj lfkpU0+eNHK0CJ7qu5PZrQsCVVEHoC29FVfhALRRYN/gy+28Tc0W4e0Fhbn6gLjvyp96 95QhiGjcAAZQOjhGazXQbnKj0C5HPzvee9kt03C0jFRAkLVWt7/9aua+7ItPBtTEeeJN Yw37Xk/+uH4EPr6T1FSiI7RGqKW54YBRlcCHvwMCF+NJkyYcTzGqbv5qNqViD6Yn1vC2 0c/iTDYwGc1R9h76D/bnBBu82TYpH9r/1pQHeaqLmV1LHKfYz0O69sq2zh563cKzPlKn 4vsA== X-Gm-Message-State: AOJu0Yxq5HkNaKauuBSgLoh9ddWV9M9Pdg+IF2RDZJv4N+B7YG5sm8No Ejur/Df6VLiOvdXA8evOnxOnGg== X-Received: by 2002:a17:907:75c2:b0:9aa:25f5:8d95 with SMTP id jl2-20020a17090775c200b009aa25f58d95mr1711323ejc.59.1695206658146; Wed, 20 Sep 2023 03:44:18 -0700 (PDT) Received: from [192.168.0.105] (haunt.prize.volia.net. [93.72.109.136]) by smtp.gmail.com with ESMTPSA id i13-20020a170906114d00b00992afee724bsm8979517eja.76.2023.09.20.03.44.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Sep 2023 03:44:17 -0700 (PDT) Message-ID: Date: Wed, 20 Sep 2023 13:44:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH net-next v4 1/6] net: bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry Content-Language: en-US To: Johannes Nixdorf , "David S. Miller" , Andrew Lunn , David Ahern , Eric Dumazet , Florian Fainelli , Ido Schimmel , Jakub Kicinski , Oleksij Rempel , Paolo Abeni , Roopa Prabhu , Shuah Khan , Vladimir Oltean Cc: bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20230919-fdb_limit-v4-0-39f0293807b8@avm.de> <20230919-fdb_limit-v4-1-39f0293807b8@avm.de> From: Nikolay Aleksandrov In-Reply-To: <20230919-fdb_limit-v4-1-39f0293807b8@avm.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:44:38 -0700 (PDT) On 9/19/23 11:12, Johannes Nixdorf wrote: > In preparation of the following fdb limit for dynamically learned entries, > allow fdb_create to detect that the entry was added by the user. This > way it can skip applying the limit in this case. > > Signed-off-by: Johannes Nixdorf > --- > net/bridge/br_fdb.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c > index e69a872bfc1d..f517ea92132c 100644 > --- a/net/bridge/br_fdb.c > +++ b/net/bridge/br_fdb.c > @@ -1056,7 +1056,8 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source, > if (!(flags & NLM_F_CREATE)) > return -ENOENT; > > - fdb = fdb_create(br, source, addr, vid, 0); > + fdb = fdb_create(br, source, addr, vid, > + BIT(BR_FDB_ADDED_BY_USER)); > if (!fdb) > return -ENOMEM; > > @@ -1069,6 +1070,8 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source, > WRITE_ONCE(fdb->dst, source); > modified = true; > } > + > + set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags); > } > > if (fdb_to_nud(br, fdb) != state) { > @@ -1100,8 +1103,6 @@ static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source, > if (fdb_handle_notify(fdb, notify)) > modified = true; > > - set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags); > - > fdb->used = jiffies; > if (modified) { > if (refresh) > Acked-by: Nikolay Aleksandrov