Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3620695imu; Mon, 28 Jan 2019 07:59:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7YRIefLRkkVFsXW4Rw4DfrmyDd1h/gRIpVw00UQ/mvyPoX3fTlyl/iEaowRmdkouLLVsBP X-Received: by 2002:a63:5153:: with SMTP id r19mr20177250pgl.281.1548691187068; Mon, 28 Jan 2019 07:59:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691187; cv=none; d=google.com; s=arc-20160816; b=IJXHKQXasCgRaXC4JDI7MhbFOHSOVEYwkWmYvinorhNnZRHV5O5uaIXiN9RANEWt4R X3bQqsV4Cft3rhFqeodTLn1bKyVEbzJchog9t92TpZSJVtI3ktrDVF+4QqlO32rm+9R5 /nefOYvcNb/2EAVv+Zloapnn7RhHqmVEo64CVLXTeYdW7ZH7Dnk9igaTg8KOJN21yuoR yd/WkCRg6ocAhDbm5gDhKzWgjSYbffQ/BZ3RruFmouayw8fJRqlhghj5IgUDVWo5epLq brw+JaSRABsNRXALqEIzyNJ+oQ22JrWFKf3vCYBu5EBAJZoiMJ3Oci3zEzkWJ+D5LpN/ FagQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=JC82VrnAi/K8HODUmJFsufdUrRVCDEfh+TKQDg3T5jc=; b=RMlGChccef0SAbS06f7T488F3F9Y7Nfd6J4oxiUdBM/1xkIXn63NM34xstEEQFDpHV ACZvg1quIOD6qSL2btGwuewoO72+fTLl8iYSt5ETNUsKQrWzo88/yNT71oG3rgG8WJYq 4/x78wjljO9o77euoZm6mDfZ9pi7Ne8aV8UqDjxYtk00yXRwLUqpydcqAZUTt7MF6FNw LQolZKmaYpj6NfqJ/6hOANDsdOZ0M9X15naptQFy0WMh+LqFiVSv5moCGZoWftOD3qI7 hmVHH+Jp/xe5HMZtbx2b2Q9WokeicayUxpltoAVWga7At3TuJ6Qp1W3Tl+EpVek/FJ+f KJaQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd16si34474779plb.47.2019.01.28.07.59.32; Mon, 28 Jan 2019 07:59:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730328AbfA1P54 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 28 Jan 2019 10:57:56 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48417 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729597AbfA1P5y (ORCPT ); Mon, 28 Jan 2019 10:57:54 -0500 X-Originating-IP: 90.88.29.206 Received: from xps13 (aaubervilliers-681-1-87-206.w90-88.abo.wanadoo.fr [90.88.29.206]) (Authenticated sender: miquel.raynal@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id B583BE000A; Mon, 28 Jan 2019 15:57:50 +0000 (UTC) Date: Mon, 28 Jan 2019 16:57:49 +0100 From: Miquel Raynal To: Andrew Lunn Cc: Florian Fainelli , Vivien Didelot , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Gregory Clement , Antoine Tenart , Maxime Chevallier , Nadav Haklai Subject: Re: [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: Save switch rules Message-ID: <20190128165749.6abf2dc4@xps13> In-Reply-To: <20190128144417.GG4765@lunn.ch> References: <20190125095507.29334-1-miquel.raynal@bootlin.com> <20190125095507.29334-2-miquel.raynal@bootlin.com> <20190128152456.212ae5ac@xps13> <20190128144417.GG4765@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, Thanks for helping! Andrew Lunn wrote on Mon, 28 Jan 2019 15:44:17 +0100: > > I don't see where VLAN and bridge information are cached, can you point > > me to the relevant locations? > > Miquèl > > The bridge should have all that information. You need to ask it to > enumerate the current configuration and replay it to the switch. > > There might be something in the Mellanox driver you can copy? But i've > not looked, i'm just guessing. I am still searching but so far I did not find a mechanism reading the configuration of the bridge out of a 'net' object. Indeed there are multiple lists with the configuration but they are all 'mellanox' objects, they do not belong to the core. Maybe I don't find this configuration because I don't know what it is. I imagine this configuration being one (or multiple) list(s), stored somewhere in a net_device being a bridge. Am I on the wrong path? Otherwise I might just save my own structures in net/dsa/switch.c like I did for the mv88e6xx driver, and once this works, net-folks might want to optimize the memory consumption and re-use the bridge configuration directly? > We also need to think about how we are going to test this. There is a > lot of state information in a switch. So we are going to need some > pretty good tests to show we have recreated all of it. My understanding of all this is rather short, until know I used what you proposed in the v1 of this series but I am all ears if I need to add anything to my test list. Thanks, Miquèl