Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2178261img; Wed, 27 Feb 2019 11:46:09 -0800 (PST) X-Google-Smtp-Source: AHgI3IaPvW+5KLImSAdRVaLLN8hVwlE2Ct+Uy898ANOiYxQiNL8QuBfi8ZIVhe7H7ejjWWG9UipZ X-Received: by 2002:a63:3d7:: with SMTP id 206mr4467383pgd.350.1551296769088; Wed, 27 Feb 2019 11:46:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551296769; cv=none; d=google.com; s=arc-20160816; b=CSqncV8sTKOa5W1FtD75lia+yzYeKFyVnsu+hwyPZqYJusJa2+ZxHUC439NkLfZ8oR 7OMMSYbPB77y11bCqwQVtbc3zzsicqtxJt/M+0SUelV1CGHJSHCo2Grgx/0wrAYyUawJ zqpfU5vKk6Owzp5kPyLXQH0ZXs96NKCY6PB3D/+NzHT3joDeKFwroQG4Ns1EYVLp7n5v UWnprm5p5oKnTV/fHP8uiFJYX9mVxW2e+kmJdZuB15v4GRcrp3HyrWHFRdpf7BtSYedi LgiuLHMlq93K0D2kUqEUTLcdi5fFPhOl2I6vB14DYLTPzJlH0UoHxlQ2lJccA6+fVHNc hkJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=1pXVJqmKhJcvrRxONTsS1Oysqm17cirViqUhJzDEsoU=; b=0lf/q/VraUc0E1vZPASb65ozM/mX7kTv79u1urqOHWdCkZoHprbebwu7XFFhFVSWaz as6kPZgX4uSy4tRcQugk+F7MJR/ikqKA5faJ1AiC06aPDIpPEcAaprjMBfzhyiVBPutI wlKC4sBrFXcdkJ6mwK6/EraSWLs62P8Ghel198gIDTj32LYaCue1G75OeuZca9+GGb3x sgij1A1AuWC8wdU78b6+rMM/bwVNnY+P6g/yDxkqvcdkmD1O2hhiyJrev7AwSqygt6tO Sy8vJWbGADFhA/J+DKw4UCfpvRrBzUliyZ8yV+0zFinYR0jIYgjNCw9s6jxGNDWO2grI mVfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lhhSv0FG; 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 g186si14929404pgc.586.2019.02.27.11.45.54; Wed, 27 Feb 2019 11:46:09 -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=lhhSv0FG; 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 S1730253AbfB0TpZ (ORCPT + 99 others); Wed, 27 Feb 2019 14:45:25 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45066 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728751AbfB0TpZ (ORCPT ); Wed, 27 Feb 2019 14:45:25 -0500 Received: by mail-pg1-f195.google.com with SMTP id y4so8425877pgc.12; Wed, 27 Feb 2019 11:45:24 -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; bh=1pXVJqmKhJcvrRxONTsS1Oysqm17cirViqUhJzDEsoU=; b=lhhSv0FGaLKee7FV8Yi4Qdi4yQGF7+JN2mf1xvumG0TwmNTfiYxl0iyyZMoXbP7YbA mzmAdhr7njLaP6UrJuUDF6b2NeBjEo96RNhp//Zpmj87XQzFNaOFj/t53777E62jmh9f 8kbsOTRY4sppZqUdzUPm9Qmyq5gBJQCFu9We7NqhBjGuJYSOXKz5V+Qtdc2A2Qke+pxE +ivfmk8jtHsJg+rMawdcn8t+vfizseL1MeZ5WUXKSATqMgvc4JnWn6d8lSsfpTyWsj5B g3dvFuXtNRSvcBj2lBkGDCBWKtOqXmu4kv19mQnTi1AOIe6Ke8hVkYzlY2vdGX40UHUy 5rDQ== 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; bh=1pXVJqmKhJcvrRxONTsS1Oysqm17cirViqUhJzDEsoU=; b=NYT+hd7yPu2rhugXnfIirZJtj2ZwK5S/xZRh9pS1RwhBALGQ3oGOsh+rJIp0YkoLeI sl7ii0bJKSf8PEl+sQlXepSufA44TDpPwm5UzuV44MECsqMhRx+nDdFi3BNwdoRRqmKJ uKyNkk/m2LFhxrWq2VwEs7mQuAvq6oztEAGaKH4Luf4fIBwaaFSZJx+pQTqYAsKkxPwM U8vVbGQjRzjOnq/jVi3rRH5XHMt8yA8SswTMVxwEm380mt5ODPwxL7mD3jwQC8dbQQDK Kkdv6prHc96yFlSkxWKNRKsD9IilLk6HPIpu1y1/g5/QaGb0ZPs4N0Ku3pXWp9Af1hXV yx7Q== X-Gm-Message-State: AHQUAuav5PUtTsmFfuWTHXPbtFl2rN3Rnr0qNR/O9GnfuqiVorLAM/Nz mqkF2pLmR91yBiWmtGVmLvEMWAgm X-Received: by 2002:aa7:8186:: with SMTP id g6mr3400216pfi.138.1551296723799; Wed, 27 Feb 2019 11:45:23 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id j6sm17044642pgq.33.2019.02.27.11.45.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 11:45:22 -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 v3 0/8] net: Remove switchdev_ops Date: Wed, 27 Feb 2019 11:44:24 -0800 Message-Id: <20190227194432.725-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This patch series completes the removal of the switchdev_ops by converting switchdev_port_attr_set() to use either the blocking (process) or non-blocking (atomic) notifier since we typically need to deal with both depending on where in the bridge code we get called from. This was tested with the forwarding selftests and DSA hardware. Ido, hopefully this captures your comments done on v1, if not, can you illustrate with some pseudo-code what you had in mind if that's okay? Changes in v3: - added Reviewed-by tags from Ido where relevant - added missing notifier_to_errno() in net/bridge/br_switchdev.c when calling the atomic notifier for PRE_BRIDGE_FLAGS - kept mlxsw_sp_switchdev_init() in mlxsw/ Changes in v2: - do not check for SWITCHDEV_F_DEFER when calling the blocking notifier and instead directly call the atomic notifier from the single location where this is required Florian Fainelli (8): switchdev: Add SWITCHDEV_PORT_ATTR_SET rocker: Handle SWITCHDEV_PORT_ATTR_SET net: dsa: Handle SWITCHDEV_PORT_ATTR_SET mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_SET net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_SET staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_SET net: switchdev: Replace port attr set SDO with a notification net: Remove switchdev_ops .../net/ethernet/mellanox/mlxsw/spectrum.c | 3 - .../net/ethernet/mellanox/mlxsw/spectrum.h | 2 - .../mellanox/mlxsw/spectrum_switchdev.c | 24 ++-- drivers/net/ethernet/mscc/ocelot.c | 32 +++++- drivers/net/ethernet/mscc/ocelot.h | 1 + drivers/net/ethernet/mscc/ocelot_board.c | 2 + drivers/net/ethernet/rocker/rocker_main.c | 23 +++- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 24 +++- include/linux/netdevice.h | 3 - include/net/switchdev.h | 38 ++++--- net/bridge/br_switchdev.c | 8 +- net/dsa/slave.c | 23 +++- net/switchdev/switchdev.c | 104 +++++++++++++----- 13 files changed, 204 insertions(+), 83 deletions(-) -- 2.17.1