I have a few questions/discussion points related to the new
networking stack in context of Ethernet driver development.
- Currently Ethernet drivers are by default initialized before
the networking stack (as set by CONFIG_ETH_INIT_PRIORITY).
That's going to be problematic for a zero-copy implementation of
Ethernet driver. Such driver will need to reserve during the
initialization phase a set of net data buffers where the
incoming packets can be stored. Later when the complete frame is
received these buffers will be passed to the higher layer.
However, the net buffer pool is initialized by the networking
stack so reserving net buffers is only possible after networking
stack was initialized. That implies that the Ethernet driver
should be initialized after the networking stack. Secondly, even
in case of the more typical implementation of the Ethernet
driver, the one which has its own set of RX/TX buffers and
copies data between them and net buffers, as currently done in
Zephyr, the driver will start working immediately after being
initialized. If it receives a frame just at that moment it will
try to pass it to the higher layer even if the rest of the
networking stack was not yet initialized. Once again that
implies that the Ethernet driver should be initialized after the
networking stack is.
- Modern Ethernet modules in most of the SoC devices have
ability to generate IP, TCP and UDP checksums in hardware. Is it
possible to tell networking stack not to compute these checksums
- One of the parameters to NET_DEVICE_INIT is MTU. Shouldn't we
have a set of predefined constants provided by the networking
stack for some typical interfaces. E.g.
NET_MTU_ETHERNET set to 1500? Should we configure the MTU value