Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1115145imj; Thu, 14 Feb 2019 01:19:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IYqQalGiC8pD390Fd06ISwH78C5nAccjsrfxkmTDZaC/RsAJmj5lv3zJDdPhMLpZEcLob4c X-Received: by 2002:a17:902:6b03:: with SMTP id o3mr3108004plk.126.1550135940468; Thu, 14 Feb 2019 01:19:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550135940; cv=none; d=google.com; s=arc-20160816; b=0HqnBZ+vVLkbe3vlxRI2JC4EuyXTaGAuElFK8Q1YstNfIioAhhBXAHro8SYUXinEY2 5SQp8VNuJGIh36i21b474pte8j2fppKYAi5qR7bt988u+57gUged4yZG3FkNBiLS3xEP VHRGM8djdh7VaQMyA4GaoG2k2/HMXvWJbu+UixeK+kk4TC7idUUkol5ScDThBbKqAk0f hzvFUAWBrK1oIWD4vkh9CzkOEOdKvxHTqtFKJHDJT2Gx1j4MvPjdlJt1+K+UydjIfNsy SAphbm/WATilCuYDz2QRwGucooaHFQpOdhZFJ9F9xrR8h96Rs7QWsVFDxKJxUJV0wKf0 9oVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=g2+XpA5ni4P8phE+1KGFcK1ujquQd92gmwto6EnDuBU=; b=XpgQkk3Pg6RglkRWkXAFAMt336+0PlahvhHb2B7h2AKDbw/kNvWcbyPqMVAb7q4d0C uduuHqCaGsB9xwBOO3pTB9GJjsp39a2RVGHAHK7efC8DZOjNrj5qoJT5SniONNATpWMV fluKix6TOyMRxkyGIuS4P14jVSe+bLch6qig5BwP36M2m/jjMCWOELK5trg10hE3yP+E pTUGxShWYDY90zujNr9EEXHwWi2g8Ja+ElKpi+783KMJVkYEZXmSpui7WGrPZPXVUMN7 ztlJ3ZvjFEANlz23DdqD+smJ9PYNWcaDiAleOAJx5i2qRyzxCp8ZKcZeZYAFcxkSbk/d vLAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ukcGLI2h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t75si1998288pfa.170.2019.02.14.01.18.43; Thu, 14 Feb 2019 01:19:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ukcGLI2h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392441AbfBMWHu (ORCPT + 99 others); Wed, 13 Feb 2019 17:07:50 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45064 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730382AbfBMWHr (ORCPT ); Wed, 13 Feb 2019 17:07:47 -0500 Received: by mail-pl1-f196.google.com with SMTP id r14so1855417pls.12; Wed, 13 Feb 2019 14:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g2+XpA5ni4P8phE+1KGFcK1ujquQd92gmwto6EnDuBU=; b=ukcGLI2hsEhE6xbWBPkxxgsFDgBFuHWRCSi9hoOAVgn72tC0EekrHfFaCqyHHLo1xR QFui0eDUHVJjFScQ2zisheQZ7xyv83Vkn8OwqOehwhM820Xk5bJshNAjwnNGYl5n8FKH 7cOuKYldlMnH1GRf1cEG1hXpVTM+EFNcCxcVvWPptXeqiRiniJKxuFqvQXv/g+E69VEr 5Dglu80QWA3AwO1zPKi0YvG4YEIpQmMa9B6JAp1EBSOeiScpc9bDqdODcUekd8SUPQmT LktmUJJMbX1Rky5B3GFHBnSqLP5Mcl1+3+09GZDy/8miZ0agPCOffUlV+n6L8cxbDy7N 0PfA== 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; bh=g2+XpA5ni4P8phE+1KGFcK1ujquQd92gmwto6EnDuBU=; b=AsWV/ELQAnJ6Nx5rhwATlpQWiLWN6Mox1+rnAMrsaHkW6lIVEr2wVnjH6FDfzNArwV I0P+a7M1T8n14KIyMfa4LrqvD8HjUwggDuJ4Ahp6Xpg/cDzqxZOU0xDnOH81WM2uhh3A ZBDLBJHwNUf8FAM8dVpuUgt0qvFse2JjkRi1p9sURR1n4QRr2R9ogwDo8gEDRHupwCCh lgeq+UlFB7ovpkF1Izq9kVftJBH/mYW3ZlE7a3dZHd9k3WJWz5Z2FiK5l1GCR0NMtfnX M9nrEVGaDr0VP91J+fFaBb26X5/351H2DR9yq5q5hnfapD+WWCYVEp3AqUZraIEAgqEj V+Kg== X-Gm-Message-State: AHQUAuapoPVNG54nNbwF+6wHqP06f7npgca0ZLL0Yb4F8WsSw84vbVWL hpVztgiy+H3DD865fRiAO2hekf/h X-Received: by 2002:a17:902:bd82:: with SMTP id q2mr456485pls.156.1550095666611; Wed, 13 Feb 2019 14:07:46 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id o1sm383735pgn.63.2019.02.13.14.07.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 14:07:45 -0800 (PST) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , "David S. Miller" , Ido Schimmel , linux-kernel@vger.kernel.org (open list), devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), bridge@lists.linux-foundation.org (moderated list:ETHERNET BRIDGE), jiri@mellanox.com, andrew@lunn.ch, vivien.didelot@gmail.com Subject: [PATCH net-next 8/9] net: Remove SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT Date: Wed, 13 Feb 2019 14:06:37 -0800 Message-Id: <20190213220638.1552-9-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190213220638.1552-1-f.fainelli@gmail.com> References: <20190213220638.1552-1-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have converted the bridge code and the drivers to check for bridge port(s) flags at the time we try to set them, there is no need for a get() -> set() sequence anymore and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT therefore becomes unused. Signed-off-by: Florian Fainelli --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 11 +---------- drivers/net/ethernet/rocker/rocker_main.c | 14 +------------- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 10 +--------- include/net/switchdev.h | 2 -- net/dsa/slave.c | 10 +--------- 5 files changed, 4 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index 7616eab50035..c11cf7fa4863 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c @@ -434,16 +434,7 @@ static void mlxsw_sp_bridge_vlan_put(struct mlxsw_sp_bridge_vlan *bridge_vlan) static int mlxsw_sp_port_attr_get(struct net_device *dev, struct switchdev_attr *attr) { - switch (attr->id) { - case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT: - attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD | - BR_MCAST_FLOOD; - break; - default: - return -EOPNOTSUPP; - } - - return 0; + return -EOPNOTSUPP; } static int diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c index 863a8b32e6e9..8e80301eae7b 100644 --- a/drivers/net/ethernet/rocker/rocker_main.c +++ b/drivers/net/ethernet/rocker/rocker_main.c @@ -2057,19 +2057,7 @@ static const struct net_device_ops rocker_port_netdev_ops = { static int rocker_port_attr_get(struct net_device *dev, struct switchdev_attr *attr) { - const struct rocker_port *rocker_port = netdev_priv(dev); - int err = 0; - - switch (attr->id) { - case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT: - err = rocker_world_port_attr_bridge_flags_support_get(rocker_port, - &attr->u.brport_flags_support); - break; - default: - return -EOPNOTSUPP; - } - - return err; + return -EOPNOTSUPP; } static int rocker_port_attr_set(struct net_device *dev, diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index f788a9458b89..5f58c7df67bb 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -643,15 +643,7 @@ static void ethsw_teardown_irqs(struct fsl_mc_device *sw_dev) static int swdev_port_attr_get(struct net_device *netdev, struct switchdev_attr *attr) { - switch (attr->id) { - case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT: - attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD; - break; - default: - return -EOPNOTSUPP; - } - - return 0; + return -EOPNOTSUPP; } static int port_attr_stp_state_set(struct net_device *netdev, diff --git a/include/net/switchdev.h b/include/net/switchdev.h index de72b0a3867f..0f352019ef99 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -45,7 +45,6 @@ enum switchdev_attr_id { SWITCHDEV_ATTR_ID_UNDEFINED, SWITCHDEV_ATTR_ID_PORT_STP_STATE, SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, - SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS, SWITCHDEV_ATTR_ID_PORT_MROUTER, SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME, @@ -63,7 +62,6 @@ struct switchdev_attr { union { u8 stp_state; /* PORT_STP_STATE */ unsigned long brport_flags; /* PORT_{PRE}_BRIDGE_FLAGS */ - unsigned long brport_flags_support; /* PORT_BRIDGE_FLAGS_SUPPORT */ bool mrouter; /* PORT_MROUTER */ clock_t ageing_time; /* BRIDGE_AGEING_TIME */ bool vlan_filtering; /* BRIDGE_VLAN_FILTERING */ diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 417388c9f1fa..a176d3ba3b7a 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -388,15 +388,7 @@ static int dsa_slave_get_port_parent_id(struct net_device *dev, static int dsa_slave_port_attr_get(struct net_device *dev, struct switchdev_attr *attr) { - switch (attr->id) { - case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT: - attr->u.brport_flags_support = 0; - break; - default: - return -EOPNOTSUPP; - } - - return 0; + return -EOPNOTSUPP; } static inline netdev_tx_t dsa_slave_netpoll_send_skb(struct net_device *dev, -- 2.17.1