Hi Andrew, On 04/05/2018 03:48 PM, Andrew Lunn wrote: >>> Hi Laurentiu >>> >>> So i can use switchdev without it? I can modprobe the switchdev >>> driver, all the physical interfaces will appear, and i can use ip addr >>> add etc. I do not need to use a user space tool at all in order to use >>> the network functionality? >> >> Absolutely! > > Great. > > Then the easiest way forwards is to simply drop the IOCTL code for the > moment. Get the basic support for the hardware into the kernel > first. Then come back later to look at dynamic behaviour which needs > some form of configuration.
Hmm, not sure I understand. We already have a fully functional ethernet driver [1] and a switch driver [2] ... >> In normal use cases the system designer, depending on the requirements, >> configures the various devices that it desires through a firmware >> configuration (think something like a device tree). The devices >> configured are presented on the mc-bus and probed normally by the >> kernel. The standard networking linux tools can be used as expected. > > So what you should probably do is start a discussion on what this > device tree binding looks like. But you need to be careful even > here. Device tree describes the hardware, not how you configure the > hardware. So maybe DT does not actually fit. It's not an actual device tree, but a configuration file that happens to reuse the DTS format. I guess my analogy with a device tree was not the best. Detailed documentation on the syntax can be found here [3], chapter 22. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/fsl-dpaa2/ethernet [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/fsl-dpaa2/ethsw [3] https://www.nxp.com/docs/en/user-guide/DPAA2_UM.pdf --- Best Regards, Laurentiu