RE: [RFC net-next 3/9] net: hns3: Add "port vlan table" information query function
From: Salil Mehta
Date: Tue Dec 04 2018 - 05:10:46 EST
> From: David Miller [mailto:davem@xxxxxxxxxxxxx]
> Sent: Monday, December 3, 2018 11:13 PM
> To: jakub.kicinski@xxxxxxxxxxxxx
> Cc: Salil Mehta <salil.mehta@xxxxxxxxxx>; Zhuangyuzeng (Yisen)
> <yisen.zhuang@xxxxxxxxxx>; lipeng (Y) <lipeng321@xxxxxxxxxx>;
> mehta.salil@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Linuxarm <linuxarm@xxxxxxxxxx>; Liuzhongzhu
> <liuzhongzhu@xxxxxxxxxx>; jiri@xxxxxxxxxxx; f.fainelli@xxxxxxxxx
> Subject: Re: [RFC net-next 3/9] net: hns3: Add "port vlan table"
> information query function
>
> From: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>
> Date: Mon, 3 Dec 2018 15:12:22 -0800
>
> > On Sun, 2 Dec 2018 23:09:27 +0000, Salil Mehta wrote:
> >> From: liuzhongzhu <liuzhongzhu@xxxxxxxxxx>
> >>
> >> This patch prints port vlan table information.
> >>
> >> debugfs command:
> >> echo dump port vlan tbl > cmd
> >>
> >> Sample Command:
> >> root@(none)# echo dump port vlan tbl > cmd
> >> vlan | port filter bitMap:
> >> 0000 | 00000000:00000000:00000000:00000000:00000000:00000001
> >> root@(none)#
> >>
> >> Signed-off-by: liuzhongzhu <liuzhongzhu@xxxxxxxxxx>
> >> Signed-off-by: Salil Mehta <salil.mehta@xxxxxxxxxx>
> >
> > 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.
Also, on-SoC NIC contains other tables which might not have any standard
user-space interface at all. What are your suggestions regarding that?
Thanks
Salil