From patchwork Fri Jan 29 11:51:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Aleksandrov X-Patchwork-Id: 12055887 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 X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62A10C433E0 for ; Fri, 29 Jan 2021 11:58:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 101FF64E32 for ; Fri, 29 Jan 2021 11:58:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232326AbhA2L6I (ORCPT ); Fri, 29 Jan 2021 06:58:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232919AbhA2L5K (ORCPT ); Fri, 29 Jan 2021 06:57:10 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5487C033255 for ; Fri, 29 Jan 2021 03:51:53 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id gx5so12560605ejb.7 for ; Fri, 29 Jan 2021 03:51:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W+AoUXtDRqmvCnzMPgUsFve3ZW9qFjze1BaacgAckyQ=; b=rP7bBBZ1y4rd4WfGTlIm+GisET+CW5rLxqmHCokDkYwVzZePgFY5fSj9316v4KKNjm 51gkDjnuaT5LGRN1GJvODnoLAKomScvIzrnLbLJx1EJE194d7fTqkcnJNXw8Y8z2LTwy no0BDxl/TyxRwRrijqB1yR1srEqxWMNc11ILC3jy0ZhIBSSlxCkZlA4pirKFaEpwio4f F9J3iwWXddGMsyBiudQkShN9NUn2aihtJcyaDuDNJBU6LdMf3+oBbN18enZqq8P14wDI PS5uwcBTI2iXYsw9bIeSNeqct/vK1Lc9czduDJs8WlignzTUGeMsFM+Dto8k7Ix4vMf3 xMcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W+AoUXtDRqmvCnzMPgUsFve3ZW9qFjze1BaacgAckyQ=; b=JItd0ZELotc6hzYbHstAhnHx+4BAbHV01Skux901jY5VLugeYOGPjNGiEvcmXz4Uz8 m/a6EXEEbhzmpo54YnP9soZbME2/jaVfHAM3gNjPc/rVKxZUqWFgE2lv4pWthKFMCeax IxmyoJ+Ua7RS2Hjo9iw8YIdwA3+YCfuU+zPqxmd7s3pCsiH7qXn0f3UeE/YJx7rOyF5L ef7AoZdgr9ru1RbMHR8+iREihlHvTlEVqP5CuYn7sALHICRN3pBu0tQ+46xAiKQROCP4 LbUDIh5CiSTE3nvs9WYl+8wP92c7s4euOf0DjGoRvxPKdC3KIdakZsPWaTu9opCO2ruR p8sQ== X-Gm-Message-State: AOAM533MTirXZj+MPqY6qhCRdlREciK7rOcw8OUcilFQigXj1131+w5B nO/iMrITt9PzYUdu3lpMHA/eb4rAeWyv+P4tejQ= X-Google-Smtp-Source: ABdhPJzykpfYOLoKVtG9t7sWcnMN1AImUAoa606abQ+tJgkMFwGfZATd223/UpA9Rsa3lfVzGrVzFg== X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr4169186ejc.258.1611921112197; Fri, 29 Jan 2021 03:51:52 -0800 (PST) Received: from debil.vdiclient.nvidia.com (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id u23sm4450130edt.87.2021.01.29.03.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:51:51 -0800 (PST) From: Nikolay Aleksandrov To: netdev@vger.kernel.org Cc: roopa@nvidia.com, bridge@lists.linux-foundation.org, kuba@kernel.org, davem@davemloft.net, Nikolay Aleksandrov Subject: [PATCH net-next 1/2] net: bridge: mcast: drop hosts limit sysfs support Date: Fri, 29 Jan 2021 13:51:41 +0200 Message-Id: <20210129115142.188455-2-razor@blackwall.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129115142.188455-1-razor@blackwall.org> References: <20210129115142.188455-1-razor@blackwall.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Nikolay Aleksandrov We decided to stop adding new sysfs bridge options and continue with netlink only, so remove hosts limit sysfs support. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_sysfs_if.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c index b66305fae26b..7a59cdddd3ce 100644 --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c @@ -16,7 +16,6 @@ #include #include "br_private.h" -#include "br_private_mcast_eht.h" struct brport_attribute { struct attribute attr; @@ -246,29 +245,6 @@ static int store_multicast_router(struct net_bridge_port *p, static BRPORT_ATTR(multicast_router, 0644, show_multicast_router, store_multicast_router); -static ssize_t show_multicast_eht_hosts_limit(struct net_bridge_port *p, - char *buf) -{ - return sprintf(buf, "%u\n", p->multicast_eht_hosts_limit); -} - -static int store_multicast_eht_hosts_limit(struct net_bridge_port *p, - unsigned long v) -{ - return br_multicast_eht_set_hosts_limit(p, v); -} -static BRPORT_ATTR(multicast_eht_hosts_limit, 0644, - show_multicast_eht_hosts_limit, - store_multicast_eht_hosts_limit); - -static ssize_t show_multicast_eht_hosts_cnt(struct net_bridge_port *p, - char *buf) -{ - return sprintf(buf, "%u\n", p->multicast_eht_hosts_cnt); -} -static BRPORT_ATTR(multicast_eht_hosts_cnt, 0444, show_multicast_eht_hosts_cnt, - NULL); - BRPORT_ATTR_FLAG(multicast_fast_leave, BR_MULTICAST_FAST_LEAVE); BRPORT_ATTR_FLAG(multicast_to_unicast, BR_MULTICAST_TO_UNICAST); #endif @@ -298,8 +274,6 @@ static const struct brport_attribute *brport_attrs[] = { &brport_attr_multicast_router, &brport_attr_multicast_fast_leave, &brport_attr_multicast_to_unicast, - &brport_attr_multicast_eht_hosts_limit, - &brport_attr_multicast_eht_hosts_cnt, #endif &brport_attr_proxyarp, &brport_attr_proxyarp_wifi, From patchwork Fri Jan 29 11:51:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Aleksandrov X-Patchwork-Id: 12055889 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 X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA3E7C433E0 for ; Fri, 29 Jan 2021 11:59:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79BCF64E32 for ; Fri, 29 Jan 2021 11:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232444AbhA2L67 (ORCPT ); Fri, 29 Jan 2021 06:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbhA2L5K (ORCPT ); Fri, 29 Jan 2021 06:57:10 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B006CC033256 for ; Fri, 29 Jan 2021 03:51:54 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id dj23so10185555edb.13 for ; Fri, 29 Jan 2021 03:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZvmKhhGuNfQqKYS0ONCipHml5PaR0WqqxykEBH6rscI=; b=ip6LdHc/G3yEH9xz5h6f+xeDxBXZwmiONIChDNt1lGD19nYiDc5DCCLV7DxI555Xn+ bUMtYieBQ6B1aLSk42ueetUHQenPlixh/wlXfBONAPcEVP6SrBbKhR+HTee0o+YZv+qP Y0IBsyKgJMFi6JOScWUujlkZtAwGvtCK3a4KsyGtTYuhOnUY+THayB0DQPMe9eVZy6RT y/zPae2K1TC+d7Y6z1jlPCe109/JGMabIq+EWdBi+OKdKgNukHTIouABMas6FY++1Zt/ Z6KKFFEb52V8o3tsPp8ybiRzmCZallGfD066bIRU3xFog5Ts20bAfDDR/rpktm0comUI rfGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZvmKhhGuNfQqKYS0ONCipHml5PaR0WqqxykEBH6rscI=; b=BZdp8BqbDRbeMSiiK3D7h0t8zGiQQgBywP+d3rN3O7mzIOQ3GpG/oBQkhCB++5imYN U73A7tsA0QvzaFJfUQ21Gs88x5wbYCdDnr6zK5bf29OrS+V0cFP+bAtkWj7fZyZz2uhU hbVMj2P/BdZVwzZbqj5pX6WuCbcjbdKAU4JMgUzhCE0VzOzD7v0tZsi04w5AL2+A/nc5 Mi0mGwO6dN4LGl4B42o2mdysTRa/VU7VTpRsOI6FJzIQQMEeL7qyLaCSmSNa2TDXkG9A MUqfUxl7YmmYU5F6/jPcXPiSf4T2hCazNYIl4vlfyDTUxWkdToFP7ERvgLaUFI6BkIqT 8Omw== X-Gm-Message-State: AOAM532Tr/OmFmP43R6mpB4k+ZNOQEhq4ZXLhCAjEcGUe88tDjlg96AN iuQlGH8Ejg5OO6d8GujIM5ghQBSL7BK6eNmjDxU= X-Google-Smtp-Source: ABdhPJyvSKxl3ILg15YLnCwXHKL/JiYO/eXmx7WRqWlc2kDJuNUygPlLKWZbyjXNrVQiCRRJ0SdPHQ== X-Received: by 2002:aa7:cdc7:: with SMTP id h7mr4674096edw.353.1611921113225; Fri, 29 Jan 2021 03:51:53 -0800 (PST) Received: from debil.vdiclient.nvidia.com (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id u23sm4450130edt.87.2021.01.29.03.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:51:52 -0800 (PST) From: Nikolay Aleksandrov To: netdev@vger.kernel.org Cc: roopa@nvidia.com, bridge@lists.linux-foundation.org, kuba@kernel.org, davem@davemloft.net, Nikolay Aleksandrov Subject: [PATCH net-next 2/2] net: bridge: add warning comments to avoid extending sysfs Date: Fri, 29 Jan 2021 13:51:42 +0200 Message-Id: <20210129115142.188455-3-razor@blackwall.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129115142.188455-1-razor@blackwall.org> References: <20210129115142.188455-1-razor@blackwall.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Nikolay Aleksandrov We're moving to netlink-only options, so add comments in the bridge's sysfs files to warn against adding any new sysfs entries. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_sysfs_br.c | 4 ++++ net/bridge/br_sysfs_if.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 7db06e3f642a..71f0f671c4ef 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c @@ -19,6 +19,10 @@ #include "br_private.h" +/* IMPORTANT: new bridge options must be added with netlink support only + * please do not add new sysfs entries + */ + #define to_bridge(cd) ((struct net_bridge *)netdev_priv(to_net_dev(cd))) /* diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c index 7a59cdddd3ce..96ff63cde1be 100644 --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c @@ -17,6 +17,10 @@ #include "br_private.h" +/* IMPORTANT: new bridge port options must be added with netlink support only + * please do not add new sysfs entries + */ + struct brport_attribute { struct attribute attr; ssize_t (*show)(struct net_bridge_port *, char *);