eternetif.c buffer ETH_LWIP_0-App v4.0.4

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User8819
Level 4
Level 4
Hi,

I am using ethernetif.c from ETH_LWIP app in my application with freetros. I am experiencing weird response delays on ping. Normally, response time is short 1ms, but occasionally it drops down to 150/200ms. I have noticed that ethernetif.c is using same *buffer* to copy frames from MAC to pbufand oposit in low_level_input and low_level_output functions.

1. Has anyone experienced problems with this design? Can you comment on this...

2. There are two copies [memcpy] of data from MAC to buffer and from buffer to pbuf. Are there any plans to provide more efficient driver design?

3. Which is the latest example of lwip with OS which I can test?

rum
0 Likes
7 Replies
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

We have updated the xmc_eth_mac peripheral library and the ethernetif.c. The intermediate buffer is removed.
The updates will be available in end of July in the next release.
In the mean time find attached a beta version not fully tested. Any feedback is welcome.

Best regards,
Jesus
0 Likes
User8819
Level 4
Level 4
Hi Jesus,

Thank you for response and project. I have few questions.

1. Why do you always change eternetif? (especially low_level_init function and others) There are numerous versions I downloaded from Infineon website, apps, projects etc... over two years.
2. Where is the description of solved problems and new features?
3. By quick look at code I see that buffer is removed, but library memcpy has been replaced by some assembler code, why you don't use DMA?
4. When contacting experts from lwip about my problem their answer was that there is a problem in vendor driver (and they were right, you made some improvements in latest lwip app as compared to previous) I will see how this one goes and I will post the result.

rum
0 Likes
User8819
Level 4
Level 4
Hi Jesus,

Your project has exactly same problem with ping as mine. Let the ping run forever -t switch, wait about 1min, delay in response appear as in the attached picture.

rum

2152.attach
0 Likes
Not applicable
very interesting. May I know how did you send out ping command continuously in cycle?
0 Likes
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

I cannot reproduce your problem. See attached WireShark capture.
@shenj: To run the ping continuously just use ping -t
.

Which board are you using? Could you upload your project so that we can reproduce your observation?

BTW: Latest version of ETH_LWIP is v4.0.6

Best regards,
Jesus
0 Likes
User8819
Level 4
Level 4
Hi,

I am testing on hexagon4400. I will send you entire project by a private message if you enable it. Thanks.
BTW in your project you have some mix of libraries versions.

rum
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi rum,

You should now be able to send me the project.
Yes, the project I sent is based on XMClib 2.1.6 where some drivers has been modified.

Jesus
0 Likes