From patchwork Mon Jun 25 13:29:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10486137 X-Patchwork-Delegate: idosch@idosch.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED0FD603B5 for ; Mon, 25 Jun 2018 13:30:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDCCF27FE4 for ; Mon, 25 Jun 2018 13:30:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0FA02808F; Mon, 25 Jun 2018 13:30:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RDNS_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from lists.ozlabs.org (unknown [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 19B93280CF for ; Mon, 25 Jun 2018 13:30:25 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41DqmZ3fyJzF18L for ; Mon, 25 Jun 2018 23:30:22 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="szS5VLcJ"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=104.47.0.56; helo=eur01-he1-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="szS5VLcJ"; dkim-atps=neutral Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0056.outbound.protection.outlook.com [104.47.0.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41DqmG050XzDrq6 for ; Mon, 25 Jun 2018 23:30:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JTU7Bo+TcnAL9ZE8nCjgFLsqW6fKrSR4rXrg6mK0bSY=; b=szS5VLcJRK8yOVYVnfgLMc4aILIRY0lJqe2HLP91zDhsYHLIOc3M3wphwe9uk+XPAH1iSOgqRyTuhOs808d9Gqbrjo05uAV/0BWn4yBs9UPZ2sXG4e2WMF4vrD3kKZ01hoYbgbjqkF4fX0azhDZXu2PXzLmF0PmJg54KLd2TeaE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by DB7PR05MB4188.eurprd05.prod.outlook.com (2603:10a6:5:18::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.24; Mon, 25 Jun 2018 13:29:58 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw 1/2] net: Add lag.h, net_lag_port_dev_txable() In-Reply-To: References: Message-Id: Date: Mon, 25 Jun 2018 15:29:54 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: LO2P265CA0108.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::24) To DB7PR05MB4188.eurprd05.prod.outlook.com (2603:10a6:5:18::29) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0db4dc6f-a5bd-43e5-d203-08d5da9fbf82 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4188; X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4188; 3:d6/Z5lWcxv7MDEc/9UOXux0im1P5Lp0FJyjDfMsFiAJJQJVZ7cJaGaKx75vWY4EIZzF+AoyuXEenZRGx9jNRh8jXdlQhSUmz/wDvKcENZHZFdW9pSsTCPgq8rSINrrluyKKLpMarDderhT0RC8bunomMhOXv2MD83rH+d+VrzKIiXJHsDfGzbIco3W8VW68frD06QVDc3eYht2nsfGYI2aER4Gl231hkoEtnspNVBWDltAvEruVrgbCaPgpXMZbP; 25:MtCCzMOVWHlVFuQYfQTsuzyRaOzw07/z5Fg1avzPdln850sbHs/LtaC1xZ6lZt0nq5zHsCZVej/0X253VdDIuYvwgO1yS7mpEVJ5pNjyUJ0sMB6h4Jrog9v3MQG7UdfWPn3E+QHsEVbWA30w7cavyKQr5nblN05yTcfZUjs7E/chv9vBVuwj/btw0fgEGRzIN6OEa4iSrTYP5S1NB+79KFzvDlY80AFM3mRrGjh1xKOHgeRBoYWWy/uTOfNJQJR0dS7xezYFT858g2QwmIBRkSHkRfjmQ2L7t4blE41cFgWXViT0VEgHbURr9ny3LMIa1OFd6NI+sTTiSEu8mAe0MA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B3eJs7uPxJRh2UBpQ+jj3LWLb7x8bYpaw1O5g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4188; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4188; X-Forefront-PRVS: 0714841678 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(366004)(39860400002)(39380400002)(189003)(199004)(7736002)(81166006)(3846002)(8676002)(6116002)(81156014)(8936002)(118296001)(105586002)(68736007)(305945005)(956004)(2351001)(106356001)(476003)(11346002)(446003)(2616005)(486006)(6636002)(5660300001)(6666003)(2906002)(53936002)(6862004)(48376002)(186003)(16526019)(386003)(25786009)(59450400001)(50466002)(6486002)(26005)(86362001)(66066001)(97736004)(58126008)(478600001)(316002)(16586007)(36756003)(51416003)(37006003)(6496006)(76176011)(52116002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4188; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB7PR05MB4188; 23:NYkYEzRi/u4wqaHYCfkL9UbUd2/v0/ALA49xiQqqF?= =?us-ascii?Q?P7x5ItDQYgt5ktPK5Q9eY+z1sckDc5UDTsVdOIThg4Bv3eGkHDZfhCq6p5Yf?= =?us-ascii?Q?37yaltI0JzSIiPNkCMYRu2XMJmsYnulil/RzZilDuhLko2i0hmTFCQJn7Tqj?= =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9bCmu9QlolDQsOrzI4uBFUtZ1AWKw1OIdp/C/tzbwiWVXcJiiPlweyW6BBPu+ni6LX98h+onG45N0FY7i5/TMEjWFhyE04PP57LTaTMt98WJptQ==; 5:98a1o1v9r+zxjMREEY32+JjOu6Lzj2lQSLuSpJ3n+zjqDjqZqcJS6EtYHyXvPT19pVhfx4+cKswbLqvxDoEYjxLWxBlspPXDrwX+MSUDuu++nRYnX7l1e6VXEl50O0Gf3vznpbmO8QSQdaxhGy+O1q6WMSFcAaKDyFDsZu5JKoo=; 24:2fasL8yRJz9+i7kWsP+Sr+qEp9DDA0Htp9VS+KQwrbxEGDB4S9yam0LJ/adVnsIhSG8PrFu/PymAkB+s1Kt5iks9MObfxWnV3y4p7Zwv9wA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4188; 7:kze3Cf1lEtGd3NbYkRjQbqPZT2IsEEIhvcrDB85CpiIyeJ2Jorbr+h8VgoK0mpIHY3C9KzNRubkuk5glAabfwBtbXW4iZKaYk5hnQjcu6/KpxX0ae1vfWJdLZkt+1sFUUWJvp3b52km7CaDxyuepmmzl+jJA8JyXdyCKQqUo+RWvOUlP8SlS4/epUU2fTc3w2JH2cV0iOAEM+7jF/RoTQ0/yoOAwBseVyXUR1q0536RA/6VZ9QuwfqRu+czfH1mD X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2018 13:29:58.8282 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0db4dc6f-a5bd-43e5-d203-08d5da9fbf82 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4188 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP LAG devices (team or bond) recognize for each one of their slave devices whether LAG traffic is going to be send through that device. Bond calls such devices "active", team calls them "txable". When this state changes, a NETDEV_CHANGELOWERSTATE notification is distributed, together with a netdev_notifier_changelowerstate_info structure that for LAG devices includes a tx_enabled flag that refers to the new state. The notification thus makes it possible to react to the changes in txability in drivers. However there's no way to query txability from the outside on demand. That is problematic namely for mlxsw, which when resolving ERSPAN packet path, may encounter a LAG device, and needs to determine which of the slaves it should choose. To that end, introduce a new function, net_lag_port_dev_txable(), which determines whether a given slave device is "active" or "txable" (depending on the flavor of the LAG device). That function then dispatches to per-LAG-flavor helpers, bond_is_active_slave_dev() resp. team_port_dev_txable(). Because there currently is no good place where net_lag_port_dev_txable() should be added, introduce a new header file, lag.h, which should from now on hold any logic common to both team and bond. (But keep netif_is_lag_master() together with the rest of netif_is_*_master() functions). Signed-off-by: Petr Machata --- drivers/net/bonding/bond_main.c | 14 ++++++++++++++ drivers/net/team/team.c | 13 +++++++++++++ include/linux/if_team.h | 9 +++++++++ include/net/bonding.h | 9 +++++++++ include/net/lag.h | 17 +++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 include/net/lag.h diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index bd53a71f6b00..a336fcdf3d27 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1349,6 +1349,20 @@ void bond_lower_state_changed(struct slave *slave) netdev_lower_state_changed(slave->dev, &info); } +bool bond_is_active_slave_dev(const struct net_device *slave_dev) +{ + struct slave *slave; + bool active; + + rcu_read_lock(); + slave = bond_slave_get_rcu(slave_dev); + active = bond_is_active_slave(slave); + rcu_read_unlock(); + + return active; +} +EXPORT_SYMBOL(bond_is_active_slave_dev); + /* enslave device to bond device */ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev, struct netlink_ext_ack *extack) diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 8863fa023500..abc09d2130d6 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1345,6 +1345,19 @@ static int team_port_del(struct team *team, struct net_device *port_dev) return 0; } +bool team_port_dev_txable(const struct net_device *port_dev) +{ + struct team_port *port; + bool txable; + + rcu_read_lock(); + port = team_port_get_rcu(port_dev); + txable = port ? team_port_txable(port) : false; + rcu_read_unlock(); + + return txable; +} +EXPORT_SYMBOL(team_port_dev_txable); /***************** * Net device ops diff --git a/include/linux/if_team.h b/include/linux/if_team.h index d95cae09dea0..0e2b2d01ac2a 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h @@ -84,6 +84,15 @@ static inline bool team_port_txable(struct team_port *port) return port->linkup && team_port_enabled(port); } +#if IS_ENABLED(CONFIG_NET_TEAM) +bool team_port_dev_txable(const struct net_device *port_dev); +#else +static inline bool team_port_dev_txable(const struct net_device *port_dev) +{ + return false; +} +#endif + #ifdef CONFIG_NET_POLL_CONTROLLER static inline void team_netpoll_send_skb(struct team_port *port, struct sk_buff *skb) diff --git a/include/net/bonding.h b/include/net/bonding.h index 808f1d167349..36f6878e3463 100644 --- a/include/net/bonding.h +++ b/include/net/bonding.h @@ -411,6 +411,15 @@ static inline bool bond_slave_can_tx(struct slave *slave) bond_is_active_slave(slave); } +#if IS_ENABLED(CONFIG_BONDING) +bool bond_is_active_slave_dev(const struct net_device *slave_dev); +#else +static inline bool bond_is_active_slave_dev(const struct net_device *slave_dev) +{ + return false; +} +#endif + static inline void bond_hw_addr_copy(u8 *dst, const u8 *src, unsigned int len) { if (len == ETH_ALEN) { diff --git a/include/net/lag.h b/include/net/lag.h new file mode 100644 index 000000000000..95b880e6fdde --- /dev/null +++ b/include/net/lag.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_IF_LAG_H +#define _LINUX_IF_LAG_H + +#include +#include +#include + +static inline bool net_lag_port_dev_txable(const struct net_device *port_dev) +{ + if (netif_is_team_port(port_dev)) + return team_port_dev_txable(port_dev); + else + return bond_is_active_slave_dev(port_dev); +} + +#endif /* _LINUX_IF_LAG_H */