Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1771819imj; Sun, 10 Feb 2019 09:57:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IasnZtKfg/Wqw0/CAKKIHwe6/FeQFGl6b0TuAwv9fM3Gas2Eh+h4+42ID3pubqOUpTXGMJc X-Received: by 2002:a62:6047:: with SMTP id u68mr32518367pfb.239.1549821430103; Sun, 10 Feb 2019 09:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549821430; cv=none; d=google.com; s=arc-20160816; b=An5il6YU8iukESp0Y7h/zNelkrfsl33A5dpXctZHCug46D6ANMXI2+6o39Wdy8Ky5i w046I14OEXokvx844NjHxc7HIoaGveyqahrq9rttdJHwRxZY3v0xo1PlbnrBYBDNwvjJ T6zCYvIeWz9YtDwKAE9J9q2gd2U8GQZHY+u9iGVaFhHp6Hk9XlYPEBwKHWOwQTDNE7zQ /+FCbnmtOqOJdQqEo0k+M12f+govVEq5KVEqScHkTPqz8iKTGBCuhJ6AynifRp3bn8zD eyjjwHmjvsWhkjuRYc1RIPJfZROa3D/oWeYj5LnKLESRBk7bklHLATyYW+ODSoP6CEp0 g9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RoEf5Fd90q4JOx/RAzYyPMDHBqBYHJwO/D8F0sElp4M=; b=PRU6nWTfmrdh+nvez6cOQsAYtUUTsj5c9ScXzMUBpfe8bVrSwLprDggJ5LQO72gg+r 6/syg2+/50E+ix5gimmLLnZlkGv5k/P+UnRHpPWBz9/2Srwzy9lxlteVsGh0GgoMblt4 JcOiH/MzACj+prTgdjrgSn0m32aYEU6PrAZycilmWjfg+kWVSvmDFAnMcyJHEYC2AccK GfgcOA2sMSJGGdicwseYUQjg0KK66w9v3hzrE04TS0P1xAt5WYtM2kZHh9MuBm5qDbDy fY8bRxjLqfQjke5F9cbxtJs0cxo0mMiwKlrqmX3ud1yda6wPXArcxw9XhUXnq7Yf3499 2cNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SFF8qviz; 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 b5si7866758plr.355.2019.02.10.09.56.54; Sun, 10 Feb 2019 09:57:10 -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=SFF8qviz; 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 S1727340AbfBJRy6 (ORCPT + 99 others); Sun, 10 Feb 2019 12:54:58 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:37556 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbfBJRxX (ORCPT ); Sun, 10 Feb 2019 12:53:23 -0500 Received: by mail-ot1-f65.google.com with SMTP id s13so13923182otq.4; Sun, 10 Feb 2019 09:53:22 -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 :mime-version:content-transfer-encoding; bh=RoEf5Fd90q4JOx/RAzYyPMDHBqBYHJwO/D8F0sElp4M=; b=SFF8qviz4fxEwgKMc+kkg6W/Ia+3p6O64ML8ipA1mqvuZzVY1QeSYO1qYySPZluGzz cKFVdjChvoM9H+3lvVUbPYj8UDvkllQkzkL/uMG3zhNOiX5wNGKa6jMHFqMbNbPb6WrC iR2x2fwRPVf4QjfDlIgb5BY4dHf5W2K2vPFdR4wdqTeMW32mZXfmZUTxT2AgY2Jx3FDS OCEi7lc1ci3tovGBKrGaAyZQJZ+NDm9IVGVWHoP71apdXRIfUuIgldIDQ/7C6C/OjW9a r6h4+i+KTH6sUJG+OyfQOVCO2fBPqV9qbOPqvDPm4N43yarCJQoltXhp1zagIuEuc4AF CW+w== 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=RoEf5Fd90q4JOx/RAzYyPMDHBqBYHJwO/D8F0sElp4M=; b=Z8/S+S31M3ZOile5mTQvnLq+hHX0GLlErUdG/ZHOyGQGWDLc+Aqs2eIkFNVsn24+do 4r/VZp2NCw5WaT2vphT0pruI7XcTrfmcprx0elOhlskQaN9lq5VOcFvllN6BsT+7HQY8 y2RgI4AZZN/pO+WeJqY0AaHBvgHww3xhI5JGDahR6fTrPY+DTKsHD9mEsVBZUK9jrTQa TLmAjRibzx8mYCanTLHLGkCPzlMVSnbwpZC0SFiDAyXKH/xpm7vZAGgmdd0N/6Mpa0K8 sevl60KSkcJWCp1PsjP1bYklFtXeW8m5xj8YaQVQqXfhxcKuTajtoF1dl0UZGHTMRQzI lZzA== X-Gm-Message-State: AHQUAuZt7KirsDfVKCHsTApiO4Xa89p0Z2dJJyGEMFpo5h5m+Slt5ysA 3XTJbvxH8sTolJCw0/iu5qrB667A X-Received: by 2002:a9d:6419:: with SMTP id h25mr22238071otl.34.1549821202084; Sun, 10 Feb 2019 09:53:22 -0800 (PST) Received: from localhost.localdomain (ip68-228-73-187.oc.oc.cox.net. [68.228.73.187]) by smtp.gmail.com with ESMTPSA id n9sm3156425otq.14.2019.02.10.09.53.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Feb 2019 09:53:21 -0800 (PST) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , idosch@mellanox.com, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, bridge@lists.linux-foundation.org, jiri@mellanox.com, andrew@lunn.ch, vivien.didelot@gmail.com Subject: [PATCH net-next v2 04/16] net: dsa: Add setter for SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS Date: Sun, 10 Feb 2019 09:50:53 -0800 Message-Id: <20190210175105.31629-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190210175105.31629-1-f.fainelli@gmail.com> References: <20190210175105.31629-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, add support for a function that processes the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute and returns not supported for any flag set, since DSA does not currently support toggling those bridge port attributes (yet). Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- net/dsa/dsa_priv.h | 3 +++ net/dsa/port.c | 10 ++++++++++ net/dsa/slave.c | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 1f4972dab9f2..97594f0b6efb 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -150,6 +150,9 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering, struct switchdev_trans *trans); int dsa_port_ageing_time(struct dsa_port *dp, clock_t ageing_clock, struct switchdev_trans *trans); +int dsa_port_bridge_port_flags_set(struct dsa_port *dp, + unsigned long brport_flags, + struct switchdev_trans *trans); int dsa_port_fdb_add(struct dsa_port *dp, const unsigned char *addr, u16 vid); int dsa_port_fdb_del(struct dsa_port *dp, const unsigned char *addr, diff --git a/net/dsa/port.c b/net/dsa/port.c index 2d7e01b23572..2ce3752203cf 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -177,6 +177,16 @@ int dsa_port_ageing_time(struct dsa_port *dp, clock_t ageing_clock, return dsa_port_notify(dp, DSA_NOTIFIER_AGEING_TIME, &info); } +int dsa_port_bridge_port_flags_set(struct dsa_port *dp, + unsigned long brport_flags, + struct switchdev_trans *trans) +{ + if (brport_flags) + return -EOPNOTSUPP; + + return 0; +} + int dsa_port_fdb_add(struct dsa_port *dp, const unsigned char *addr, u16 vid) { diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 2e5e7c04821b..9b499ba88aa7 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -295,6 +295,10 @@ static int dsa_slave_port_attr_set(struct net_device *dev, case SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME: ret = dsa_port_ageing_time(dp, attr->u.ageing_time, trans); break; + case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS: + ret = dsa_port_bridge_port_flags_set(dp, attr->u.brport_flags, + trans); + break; default: ret = -EOPNOTSUPP; break; -- 2.19.1