Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8714981imu; Tue, 4 Dec 2018 12:58:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wyi8Zrwj0HqHVVTonPQ5GYgYDCivBwDUMRTQkNdUKeR++DZYpafKibPnm+7TK4XTwQ6lWn X-Received: by 2002:a63:7154:: with SMTP id b20mr18035366pgn.342.1543957104440; Tue, 04 Dec 2018 12:58:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543957104; cv=none; d=google.com; s=arc-20160816; b=OY8FG/tqWhJk1md/3SO4XNnnhvndXvR/w2fspmSs1TDnzct2Z0ldr2hOjPtnTOEvoF dGRslCRX+43gmg95doYFMsQd2Vwui3fYF/5ordkpcFZtOgF6zkQ/umevOnbEm7x+2Ayb I2y07uuPQvDIirtmuTiblXTQRW+cM0UOOpYimE7yG2gvoc++l+eoCUqmPMtLAarN4C7F eJXU0kWyRUiWcEjKnS/KQDExzAMmOI8W5T/TcnonrVOSBgxjwJRpv0o6tYrUpbzs9/mK nmOBv4nInAfOy+xBED4OWngz8QPsSsf0LiSitRbWEASaPM+VMTYUBL9qTOUq5ucbxgVQ bd9w== 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-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=B7BOo/ioTGSlavDojRcRnvYJit55SwpNVV26uUKd3QE=; b=0yptwJ64BPQtLge/ecHK8noO3SGMQUvXVwaa0YDL8A16F4/wLYJGuC/0RY9gz7VnbR fnI/MJM+ARYuG/lp/PqZBzkzRrqvUVwcezjmViCfWCkc4FrrrQr31qjYBQx4E/JbCUUs s8+cLOeYHpkmyksW/L/7KMrxhh3tN5//4Wy6Jcv7OFenRtoIUBIjj5oCSpfueqlVb2UG 2E2A3gxfX+0YDknJ9BxWg7vVeXwKaxexFOdhdtVggdYjJZ+owJh6Fc23uynRN5Z2Nt/j Kf6fPSQEcuLzU5QF/+mPhrcwMGxCKjYjfLeTnLz4dssImaPqYcokRVO8Y6q36h5SB8sp YNGA== 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 h68si19531141plb.375.2018.12.04.12.58.09; Tue, 04 Dec 2018 12:58:24 -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 S1726135AbeLDUzi convert rfc822-to-8bit (ORCPT + 99 others); Tue, 4 Dec 2018 15:55:38 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:32799 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725880AbeLDUzi (ORCPT ); Tue, 4 Dec 2018 15:55:38 -0500 Received: from lhreml702-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id ECF939022A973; Tue, 4 Dec 2018 20:55:33 +0000 (GMT) Received: from FRAEML703-CAH.china.huawei.com (10.206.14.34) by lhreml702-cah.china.huawei.com (10.201.108.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 4 Dec 2018 20:55:36 +0000 Received: from FRAEML521-MBX.china.huawei.com ([169.254.1.167]) by fraeml703-cah.china.huawei.com ([10.206.14.34]) with mapi id 14.03.0415.000; Tue, 4 Dec 2018 21:55:30 +0100 From: Salil Mehta To: Andrew Lunn CC: David Miller , "jakub.kicinski@netronome.com" , "Zhuangyuzeng (Yisen)" , "lipeng (Y)" , "mehta.salil@opnsrc.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linuxarm , Liuzhongzhu , "jiri@resnulli.us" , "f.fainelli@gmail.com" Subject: RE: [RFC net-next 3/9] net: hns3: Add "port vlan table" information query function Thread-Topic: [RFC net-next 3/9] net: hns3: Add "port vlan table" information query function Thread-Index: AQHUipRWcc4RvlD+b0Kh0MVNnjjtYqVtlV4AgAAAJYCAALCJsIAAE+IAgABlhbA= Date: Tue, 4 Dec 2018 20:55:29 +0000 Message-ID: References: <20181202230933.15560-1-salil.mehta@huawei.com> <20181202230933.15560-4-salil.mehta@huawei.com> <20181203151222.6e56efcd@cakuba.netronome.com> <20181203.151253.1348214769326219632.davem@davemloft.net> <20181204105554.GD741@lunn.ch> In-Reply-To: <20181204105554.GD741@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.226.54] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Andrew Lunn [mailto:andrew@lunn.ch] > Sent: Tuesday, December 4, 2018 10:56 AM > To: Salil Mehta > Cc: David Miller ; jakub.kicinski@netronome.com; > Zhuangyuzeng (Yisen) ; lipeng (Y) > ; mehta.salil@opnsrc.net; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; Linuxarm ; > Liuzhongzhu ; jiri@resnulli.us; > f.fainelli@gmail.com > Subject: Re: [RFC net-next 3/9] net: hns3: Add "port vlan table" > information query function > > > > > Adding debugfs files for basic switch concepts like MAC and VLAN tables > > > > seems like a bit of a stretch to me. I wonder what others think. > > > > > > Agreed. > > > > > > I was wondering how other vendors are solving this? One way I could > > understand is to use "Switchdev" framework which in turn will expose > > entries to the kernel using the switch driver. In our NIC we don't > > have a proper switch and it cannot learn/age entries. > > Your hardware is there to accelerate what linux can do in software. > How do we manage the software version of this feature? Yes, so it can kind of represent switch in the hardware, has vports and has tables for mac-vlan, port-vlan, vlan (which I guess kernel also supports in vlan aware mode of bridging?). Perhaps, only way I can understand now to be able to use standard bridge, ip link tools to fetch this info is by having represented them by "Switchdev"? > > > Also, on-SoC NIC contains other tables which might not have any standard > > user-space interface at all. What are your suggestions regarding that? > > How are these tables map to software features the Linux stack > implements? If you refer output shown in patch you will get an idea, [RFC net-next 5/9] net: hns3: Add "manager table" information query function Manager Table stores entries for any exception packet matching or for matching any special types like control packets which we might not want to forward using general forwarding route using mac-vlan table. Not sure if this makes sense inside Linux kernel? Therefore, we thought of exposing them through the debugfs. Thanks Salil