Skip to content

UBLOX_EVK_ODIN_W2 bridge implementation #9204

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

Closed

Conversation

AmmadRehmatCUS
Copy link

Description

  • Bridge functionality added

  • To enable the bridge add the below macro and increase the lwIP pbuf pool size in mbed_app.json, for example:
    "macros": ["MBED_EMAC_LWIP_L2_BRIDGE=1"],
    "lwip-pbuf-pool-size":
    { "help": "Number of pbuf pool buffers", "value": "80" }

  • Tests performed
    mbed_os_tests_arm.txt
    mbed_os_tests_gcc.txt
    mbed_os_tests_iar.txt

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[x] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ciarmcom
Copy link
Member

@AmmadRehmat, thank you for your changes.
@ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 2, 2019

@AmmadRehmat Please review travis astyle job failures

@AmmadRehmatCUS
Copy link
Author

@AmmadRehmat Please review travis astyle job failures

travis astyle job failures fixed

#if MBED_EMAC_LWIP_L2_BRIDGE
macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_ENABLE,
#else
macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be aligned the same as the line 1608 and above

#define EMAC_LWIP_L2B_ENTRY_TIMEOUT (120) //timer ticks before removing inactive L2B entry
#endif

err_t emac_lwip_l2b_register_interface(struct netif *netif);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should have doxygen?

@AmmadRehmatCUS
Copy link
Author

@0xc0170 Modified according to review comments

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 8, 2019

@ARMmbed/mbed-os-ipcore Please review

@SeppoTakalo
Copy link
Contributor

@AmmadRehmat

I cannot justify the LwIP specific API changes.

Why cannot this be implemented in EMAC layer without touching any existing public APIs?

I think you could, at least in theory, create a device that takes in EMAC interface, and is EMAC interface itself.

image

Using this kind of approach does not force you to pull in the LwIP stack. You could use it, but you are not required to. Also, would not require any API changes.

@AmmadRehmatCUS
Copy link
Author

@SeppoTakalo
Do you want us to revise the design? or is it possible to merge it as it is? We have designed it this way so that there is standard API instead of local one for ublox only. That way other users can also use it and ublox wont need to rework the bridge when a new API is introduced.

You could use it, but you are not required to

@SeppoTakalo
Copy link
Contributor

Yes, I would prefer the design to be revised.

I do like the fact that you did it without touching the driver API, but I don't like that it touches the LwIPInterface making this work only on LwIP.

I strongly feel that this could have been done in separate class that sits between EMAC driver and the network stack. That would make it work for both stacks that we have (LwIP and Nanostack).

@AmmadRehmatCUS
Copy link
Author

@SeppoTakalo the latest version of lwip has a bridge interface available, is there any plan to move lwip to latest version?

@SeppoTakalo
Copy link
Contributor

@AmmadRehmat We have plan to update LwIP to latest version very soon.

However, there are some refactorings ongoing, so I cannot promise that it will come in 5.12 timeframe but that is our target.

Still the proposal is the same, I prefer that this work is going to be done without the IP stack and in the EMAC interface. It would allow bridge devices even without IP stack at all, or it would allow bridge devices with Nanostack as well.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 23, 2019

Based on the latest comments, this PR should be closed and a solution further discussed here (even PR is closed) ? This feels like a good candidate for new design document https://github.com/ARMmbed/mbed-os/tree/master/docs/design-documents

@screamerbg
Copy link
Contributor

@0xc0170 I'll hold on a bit while there are product level discussions on this.

@cmonr
Copy link
Contributor

cmonr commented Feb 12, 2019

@screamerbg Any updates/outcomes from those discussions?

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 18, 2019

Removed 5.12 release label for now. If not, and this will is targeting 5.12, let us know

@AmmadRehmatCUS
Copy link
Author

@0xc0170 @screamerbg We are waiting for new version of lwIP to be introduced in 5.12 and will be using that bridge in our release. Meanwhile lets keep this PR open until the latest lwIP version is integrated

@cmonr
Copy link
Contributor

cmonr commented Feb 19, 2019

@AmmadRehmat Checking, do you know when the PR to update LWIP will be opened?

@AmmadRehmatCUS
Copy link
Author

@cmonr according to above discussion with ARM team , it looks like its going to be in release 5.12

@cmonr
Copy link
Contributor

cmonr commented Mar 19, 2019

@AmmadRehmat Has there been any progress on either this PR or the LWIP dependency?

@AmmadRehmatCUS
Copy link
Author

@cmonr we are in touch with Pasi Pikkarainen , he is yet to provide a date for lwip release

@cmonr
Copy link
Contributor

cmonr commented Apr 9, 2019

@AmmadRehmat Any update?

@AmmadRehmatCUS
Copy link
Author

@cmonr we dont have any commitment for date for latest lwip version from ARM team

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 10, 2019

@cmonr we dont have any commitment for date for latest lwip version from ARM team

lwip 2.1.2 here #10353, is this the one needed?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 17, 2019

@AmmadRehmat @SeppoTakalo As this is not progressing, can we take this offline if still needed?

@AmmadRehmatCUS
Copy link
Author

@0xc0170 let me have a look at the lwip version, is the 5.13 mbed-os out? it contains this PR you refered?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 17, 2019

It's not - it's only on master so use that one as your base. We are going to release 5.12.2 the next week (few more patch releases until we get to 5.13).

@AmmadRehmatCUS
Copy link
Author

@SeppoTakalo this looks quite similar to what we were trying to do.

https://github.com/ARMmbed/mbed-os/blob/master/docs/design-documents/features/connectivity/Multihoming%20-%20Design%20document.md

Correct me if i am wrong. It looks like bridging is already supported

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 3, 2019

@AmmadRehmat 5.13 is out. Shall this be closed and reopen with an update ?

@SeppoTakalo will be back in a week.

@SeppoTakalo
Copy link
Contributor

@AmmadRehmat, no I don't think the bridging is implemented.
We did multihoming work for LwIP to ensure that two interfaces can be up at the same time. Also made some tricks to allow DNS queries to go out on specific interfaces, etc. But all done in IP level.
Bridging is one level below.
Can be implemented in EMAC driver level as I originally suggested.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 9, 2019

Can be implemented in EMAC driver level as I originally suggested.

@AmmadRehmat Would the issue suit better here or rather a new PR with suggestions implemented? It looks like this PR won't progress for a while.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2019

I am closing this PR @AmmadRehmat . Let's create an issue for further discussion or keep it here.

@0xc0170 0xc0170 closed this Aug 26, 2019
@AmmadRehmatCUS
Copy link
Author

@0xc0170 sorry for not replying earlier. Yes its OK to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants