Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1738039img; Wed, 27 Feb 2019 04:40:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IbY9hBSWd2HL2Q9knqP1Y4rMuEhs3tg4wjjy3p2H8NqJPX1g6Pk5SGJr/2/ZCCGrdVKVlev X-Received: by 2002:a17:902:8a91:: with SMTP id p17mr1971983plo.316.1551271225433; Wed, 27 Feb 2019 04:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551271225; cv=none; d=google.com; s=arc-20160816; b=yTbt6vs084THlZoC1xIfcf9OJw2uWJavZCbppCK8n/g6t5mrbNx3i/J5mjczje0CiD Mjh2rEcb3F7VD2AcqPw6JjgDQcaHIn7ZDTxIkw1wDCgUMI0k/dAKsauWdZp2yE6MJXOZ 1iu468pWJjOcxjn1PTsGl4FeAglD6Fn3YHG1XorpIZoORLprVTeLALOM1ztEZe4KTn32 j8rRLIMFkedvdgrnwxnnrUFn1jR13sMt+nZMlBGMNdERCZMRpXroIlfj91LlCPf1Y2QS ByQE3DvHu6HtG24DTvA1S1KTKE//ajP2L7GFBOhrefiGmykqUXDX78eiBUZ+QIWGxT5J 16Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=tB7WEjmYFebb1ka2RaEWjr519S6avl7PPHLsjQg0yJk=; b=I7e9VOuTYEHnGz8gg+AIN+UztvVBV5S1G4qqVizWIigidmqpLjZ8oMgbG/fWlOZnwL +k5Ir2lDSH5fJNiT7JjZl8dZg47jONaW4P33LPQ5LFmVvGXJyoLeYx5VjPThtsET1Qkg F2iwGgbYPUQhtB2K5k9lmJNZCQM8DjbqdIzqOyT84ullLesAvTFIt55bRmFtPbSHSGYl c2pJel9B+B/K9ip1UFIqdgUs+xhRihQni3Z1eS6R4IxpsnVl2cjHEJM5wK4dqSoIpRZN 4Hf2jFQDIL3knY+dRUYwrMP80knxlEwQIn1ugzLACgWvXLyuj6Ahn7/UvQ78Ke5FD7Rx ELxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=GHhAfypf; 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=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si14544907pgd.315.2019.02.27.04.40.09; Wed, 27 Feb 2019 04:40:25 -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=@Mellanox.com header.s=selector1 header.b=GHhAfypf; 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=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730070AbfB0M2j (ORCPT + 99 others); Wed, 27 Feb 2019 07:28:39 -0500 Received: from mail-eopbgr60054.outbound.protection.outlook.com ([40.107.6.54]:32462 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726229AbfB0M2j (ORCPT ); Wed, 27 Feb 2019 07:28:39 -0500 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=tB7WEjmYFebb1ka2RaEWjr519S6avl7PPHLsjQg0yJk=; b=GHhAfypfKwFcGcoUYDvZVHW6jSg3TF5RCW9pzgK3NRwnNpZ8YzLo1uzNB60LDYOqaip76pVLndClAJA8L1j1/lG/3TgJVKcL2Huq9QFeDYdoJsGEXs4buV3dB+yhb03exBa42Qa1HNsvdjkgpJneh4zL0U0YQ85vuak2lcmAMmE= Received: from DB7PR05MB5243.eurprd05.prod.outlook.com (20.178.42.15) by DB7PR05MB5512.eurprd05.prod.outlook.com (20.177.192.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Wed, 27 Feb 2019 12:28:34 +0000 Received: from DB7PR05MB5243.eurprd05.prod.outlook.com ([fe80::2df1:2e11:a3f7:ef23]) by DB7PR05MB5243.eurprd05.prod.outlook.com ([fe80::2df1:2e11:a3f7:ef23%6]) with mapi id 15.20.1643.019; Wed, 27 Feb 2019 12:28:34 +0000 From: Ido Schimmel To: Florian Fainelli CC: "netdev@vger.kernel.org" , "David S. Miller" , open list , "open list:STAGING SUBSYSTEM" , "moderated list:ETHERNET BRIDGE" , Jiri Pirko , "andrew@lunn.ch" , "vivien.didelot@gmail.com" Subject: Re: [PATCH net-next v2 7/8] net: switchdev: Replace port attr set SDO with a notification Thread-Topic: [PATCH net-next v2 7/8] net: switchdev: Replace port attr set SDO with a notification Thread-Index: AQHUzjniJhWVT3lsVUavY9LXj8/GzqXzk3GA Date: Wed, 27 Feb 2019 12:28:34 +0000 Message-ID: <20190227122831.GA13567@splinter> References: <20190227011427.16487-1-f.fainelli@gmail.com> <20190227011427.16487-8-f.fainelli@gmail.com> In-Reply-To: <20190227011427.16487-8-f.fainelli@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P193CA0082.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::23) To DB7PR05MB5243.eurprd05.prod.outlook.com (2603:10a6:10:68::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 63a2fd11-19c9-4db9-c10b-08d69caf16ed x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB7PR05MB5512; x-ms-traffictypediagnostic: DB7PR05MB5512: x-microsoft-exchange-diagnostics: =?us-ascii?Q?1;DB7PR05MB5512;23:Qwrk78QXtYW/VzE/EbJwwNmK/pXYFyeYHMDHPhVC2?= =?us-ascii?Q?XJcyW+NfB1twk0ff4q3DRJuYTOmk8ICGJZh7V8rh8ygopt9rPv110aQFf4Ve?= =?us-ascii?Q?Qc/mf1tGVaccgcWcivkGakC8XAchN8VWbJ6ZXHY4Cbk5jAt5CCzCfXluZLI6?= =?us-ascii?Q?9EQaN3HXwBhtQEgwPuD3iS3bjOvfXXzUJu2bbWGYzrZci4giqtRQNgH00t3U?= =?us-ascii?Q?TRDtRy9FtzEVB7eIZBljsA1PNLppjMTk404IXXZn+Nr97Bq2BnzFx0LhO7t9?= =?us-ascii?Q?SyHub4VlBHKJkvsddOzkdMXyMpXZO8e1T3wMGptr5itVv7YCMOfxkAB8FcJx?= =?us-ascii?Q?2YGwWgHu4AKLjrubGEdMPYJajm13ruttJIFsNsD+XsOUfypr18RDBuH2+p5E?= =?us-ascii?Q?6gIvYm5iE+8iGdE+WlJ0kfqnxwbZwQ+rJf+jCz7jqoQ2nc4deTNRerhKMD9D?= =?us-ascii?Q?fWQ47FGUEEMMohsfRWFLo3sLlonF2SeEPhUfavGE2FAlq6GdAxwGHtMPRW4u?= =?us-ascii?Q?cGiaKm+meCZL5svJHuDeNW37+lwy0Tjp0YmY8QGuHmIxUoSKkVCp48kul5NZ?= =?us-ascii?Q?2o/i2THX98P+5cHqOb/SwUknECgDpCmRGEaPfqQHLSzMF38dmYv2dy6GwUSb?= =?us-ascii?Q?6rvgGlZ+MdyYqq7aLFAdyja1oSXC3AoFinfkdkJqQY7sRm07Rl00zypNDmHZ?= =?us-ascii?Q?6LvS9TPP2Ig313fgFaGXHc7GS4B56lPRhRD17mkhBVE+NTBdAneFGZPFJQQq?= =?us-ascii?Q?xhc4hwSaskdJwm07aIonCTqJAznYhqBs9y1yFMVkcp17YdkBQzn3KvBpmC2u?= =?us-ascii?Q?wbNuc1VbNi3uu+tR6GxmAn5LSpfZy/hlHt/M9OHEBBqBWwi5/ogTbxu5jfTa?= =?us-ascii?Q?hLxvGlVRurhNjA+vMMIY+hOwd+Dz0LBxcuYVA78U3xxiPIYXjyd4LssI2U+0?= =?us-ascii?Q?zB7qvmPa+kWYQ586B0IQH7aSv3AnwcB3fuXKyKNkeb60NvTUw7dncVDRd0in?= =?us-ascii?Q?cCttJls3ueRI7rrNCTmTPYvqtLeUGVb99vnus/Fu4/67PbsgZtHGnf+4qLiZ?= =?us-ascii?Q?2bUyNsjSid/+iihQzfwa4Lk//xZfPvVh433uSLOJtkJvizlxS3jX+DoX63tp?= =?us-ascii?Q?MRX0ztZpmO1yxz+YfxVvMEBp2G8zoq2aZ8rUV+1WaRJ7pnrpsK5OaLuyWrIS?= =?us-ascii?Q?2vl8e6oPGkkD/Xo1Mzr2NEoq/JK9wT/2UUvrtFzVp7uCYV/bIiV6zmHUzi50?= =?us-ascii?Q?ZSRw0Y6747qMyDdoiYiBJTInepLbw4YnpjSJOAO0QUyDmoonAV4snypsYkWr?= =?us-ascii?Q?JroHuszZq1gbNEt5YtcMEnx1d1PViZ2WH2gUyqD0rrr?= x-microsoft-antispam-prvs: x-forefront-prvs: 0961DF5286 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(346002)(39860400002)(366004)(136003)(376002)(396003)(199004)(189003)(86362001)(14444005)(6916009)(256004)(8676002)(446003)(7736002)(99286004)(52116002)(11346002)(6116002)(3846002)(81166006)(14454004)(6486002)(81156014)(6436002)(15650500001)(33656002)(229853002)(2906002)(5660300002)(26005)(54906003)(186003)(316002)(305945005)(486006)(106356001)(105586002)(1076003)(68736007)(66066001)(25786009)(71190400001)(8936002)(4326008)(476003)(97736004)(4744005)(102836004)(53936002)(76176011)(6512007)(478600001)(6506007)(386003)(9686003)(6246003)(33716001)(71200400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR05MB5512;H:DB7PR05MB5243.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: BmttWfOHwsi/sxw7athdPLy0RYwUyVji5xJ67xovV56+GqyiMwfLAfrElYBuZTmlIXffWCIgIGw3EhfYGDVV/wTs4Ooq60KeVvsS94ijxsXoOKu89nPRnoCI/iyT8G+Yesy5i35GuQFb0J7t2HUBH9pnYGHtS3Kwe1hzUTz9b3xahz8ZBhiiQuvsmpPIsBBUJnTD9ktbOd/tRetmhLxMFGQNoc7tIm5TT/H67o9Jvw6AxBpkxV7yZB11wfxyEicpvfCfIl1AwnuggrBgH3k8AohxqDWnI+YxE7+VCGIEy2s24/ysGwIE0TeyhBaWxRqj5fUCNEWNw+wAt5pKXzWafRJq9w1Vh6G+KSGifOFQp2Xd/R4BUFXskiQRGxvzNcLi6dL3H3tS01J+CkZhgO5u4IH6zJBqgfx2O6OlKZhf0v0= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63a2fd11-19c9-4db9-c10b-08d69caf16ed X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2019 12:28:33.5092 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5512 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 26, 2019 at 05:14:26PM -0800, Florian Fainelli wrote: > diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c > index af57c4a2b78a..b7988d49d708 100644 > --- a/net/bridge/br_switchdev.c > +++ b/net/bridge/br_switchdev.c > @@ -67,12 +67,17 @@ int br_switchdev_set_port_flag(struct net_bridge_port= *p, > .id =3D SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS, > .u.brport_flags =3D mask, > }; > + struct switchdev_notifier_port_attr_info info =3D { > + .attr =3D &attr, > + }; > int err; > =20 > if (mask & ~BR_PORT_FLAGS_HW_OFFLOAD) > return 0; > =20 > - err =3D switchdev_port_attr_set(p->dev, &attr); > + /* We run from atomic context here */ > + err =3D call_switchdev_notifiers(SWITCHDEV_PORT_ATTR_SET, p->dev, > + &info.info, NULL); > if (err =3D=3D -EOPNOTSUPP) Florian, this needs to use notifier_to_errno() and check for any error. With the ops, `-EOPNOTSUPP` was returned for devices that did not implement `switchdev_ops`. Now they will simply not listen / reply to the notification. > return 0;