-
Notifications
You must be signed in to change notification settings - Fork 3k
Networking update: general refactoring, unifying EMAC #5202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Work picked up by Kari Haapalehto in ARMmbed#4918, from Bartek Szatkowsi's branch at ARMmbed#4079, commit 8c28917. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Refactor k64f_emac * Remove lwip depencies * Correct doxygen warnings * Add weak definitions for mbed_ipstack.h functions. * Remove emac_interface_t - drivers register with emac_interface_ops_t and void *, and get an mbed_ipstack_interface_t to pass to stack. * Reinstate use of EthInterface abstraction * ipstack_lwip.c renamed as mbed_ipstack_lwip.c * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with mbed_ipstack_lwip.cpp
This PR squashes together everything from #4079 and #4918, reintegrates bits from master lost in #4918, and merges it with current master, incorporating the PPP work and K64F updates that happened since. I think this PR should finalise the API - it would leave only K64F Ethernet functional. Other driver updates can follow onto the feature_emac branch. To do now:
|
@KariHaapalehto Please look at CI failures (travis and jenkins CI) |
This is a PR to a feature branch, rather than to master - I think we'd be expecting failures on a number of platforms until driver updates follow. Will check though. |
Would it make sence to unify emac_stack_mem.h and emac_api.h so that also memory interface would use function pointers and ip stack would register call backs to those. |
@kjbracey-arm Bump. What's going on with this PR? |
We reviewed this with @sg-, and agreed that we're going to go for a significant rework, making it more C++-ey. I'll probably start review of that in a new PR, so close this one for archiving? |
thanks for the update, +1, closing it then |
Initial work by Bartek Szatkowski in ARMmbed#4079, reworked following review of ARMmbed#5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since ARMmbed#4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in ARMmbed#4079, reworked following review of ARMmbed#5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since ARMmbed#4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in #4079, reworked following review of #5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since #4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in #4079, reworked following review of #5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since #4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in #4079, reworked following review of #5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since #4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in ARMmbed#4079, reworked following review of ARMmbed#5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since ARMmbed#4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in ARMmbed#4079, reworked following review of ARMmbed#5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since ARMmbed#4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Initial work by Bartek Szatkowski in #4079, reworked following review of #5202 to transform the entire system into C++, retaining the basic functionality. Bartek's summary: * Porting ethernet to EMAC * Updating EMAC to enable multiple interfaces * Untangling networking classes, making the abstractions a bit clearer to follow, etc * General refactoring * Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI Revisions since initial branch: * Remove lwip depencies * Correct doxygen warnings * Remove emac_api.h, replace with C++ EMAC abstract class. * Create OnboardNetworkInterface, and LWIP implementation. * Mappings since #4079 lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp netsocket/mbed_ipstack.h -> OnboardNetworkStack.h hal/emac_api.h -> EMAC.h * Reinstate use of EthInterface abstraction * Correct and clarify HW address EMAC ops * Restore MBED_MAC_ADDR implementation * Integrate PPP support with LWIP::Interface. * Convert K64F lwIP driver to K64F_EMAC. To do: * Convert emac_stack_mem.h to follow this pattern. * Figure out DEVICE_ETH/EMAC * Update all drivers to use EMAC
Work picked up by Kari Haapalehto in
#4918, from Bartek Szatkowsi's
branch at #4079, commit 8c28917.
Bartek's summary:
Revisions since initial branch:
void *, and get an mbed_ipstack_interface_t to pass to stack.