Cleaning up drivers/ethernet Kconfig files


Piotr Mienkowski <piotr.mienkowski@...>
 

I've created Ethernet driver for Atmel SAM board I'm working with, however integrating it cleanly with Zephyr is a bit tricky. I believe Kconfig files in drivers/ethernet directory need cleaning up.

Issues:
- Currently Ethernet Drivers appear flat in the main Device Drivers Kconfig menu rather than in their own submenu like all other drivers.
- Ethernet Drivers are visible only if "> Networking > Generic networking support > Wired networking support (Ethernet drivers)" is selected. This means that it is not possible to use Ethernet driver without higher level networking stuff. While not common, I believe that we should support an application that wants to implement their own networking stack, e.g. to send pure ip packets in some very efficient way. Hiding lower level driver when some high level feature is not enabled also breaks the logic common to all other device drivers. It would be better if higher level feature selected lower level one as it is typically done.

Currently config ETHERNET which is defined in ./net/ip/Kconfig file is overloaded and means use Ethernet driver for wired networking as well as enable Ethernet drivers. I believe we need to split this config in two, e.g. NETWORKING_ETHERNET and ETHERNET.

Does that sound reasonable?

--
Piotr


Tomasz Bursztyka
 

Hi Piotr,

I've created Ethernet driver for Atmel SAM board I'm working with, however integrating it cleanly with Zephyr is a bit tricky. I believe Kconfig files in drivers/ethernet directory need cleaning up.
Definitely.
Things are mixed up between net/ip/Kconfig and driver part.

You might want to take a look at net branch of Zephyr. (and port your
driver for it)
Such change will make sense there where we have NET_L2_ETHERNET in
net/yaip/l2/Kconfig
and ETHERNET in drivers/ethernet/Kconfig

(note: yaip name will disappear once the branch will be merged)

Tomasz


Issues:
- Currently Ethernet Drivers appear flat in the main Device Drivers Kconfig menu rather than in their own submenu like all other drivers.
- Ethernet Drivers are visible only if "> Networking > Generic networking support > Wired networking support (Ethernet drivers)" is selected. This means that it is not possible to use Ethernet driver without higher level networking stuff. While not common, I believe that we should support an application that wants to implement their own networking stack, e.g. to send pure ip packets in some very efficient way. Hiding lower level driver when some high level feature is not enabled also breaks the logic common to all other device drivers. It would be better if higher level feature selected lower level one as it is typically done.

Currently config ETHERNET which is defined in ./net/ip/Kconfig file is overloaded and means use Ethernet driver for wired networking as well as enable Ethernet drivers. I believe we need to split this config in two, e.g. NETWORKING_ETHERNET and ETHERNET.

Does that sound reasonable?

--
Piotr


Piotr Mienkowski <piotr.mienkowski@...>
 

Hi Tomasz,

Thanks for the clarification. I was planning to add basic Atmel SAM E70 SoC support to the master branch and without SoC support the Ethernet driver will also not work. It's anyway still going to take some time so I think I'll wait with the Ethernet driver until the net branch is merged into the master.

Cheers,
Piotr


Marcus Shawcroft <marcus.shawcroft@...>
 

On 13 October 2016 at 07:30, Tomasz Bursztyka
<tomasz.bursztyka(a)linux.intel.com> wrote:
Hi Piotr,

I've created Ethernet driver for Atmel SAM board I'm working with, however
integrating it cleanly with Zephyr is a bit tricky. I believe Kconfig files
in drivers/ethernet directory need cleaning up.

Definitely.
Things are mixed up between net/ip/Kconfig and driver part.
Hi,

I have a patch in my stack that essentially makes the refactor
proposed. I've refrained from upstreaming it on the assumption that
yaip is coming and un-necessary churn around the ethernet driver
configuration right now will just create pain for the net branch when
rebasing. However I'm happy to clean it up and push it up to gerrit
if folks want to see it...

You might want to take a look at net branch of Zephyr. (and port your driver
for it)
Such change will make sense there where we have NET_L2_ETHERNET in
net/yaip/l2/Kconfig
and ETHERNET in drivers/ethernet/Kconfig

(note: yaip name will disappear once the branch will be merged)
Whats the expected timeline on a yaip->master merge? I'm not asking
for commitments here, just interested in best guess / aspiration ?

Cheers
/Marcus