Reply by "Tom...@tomlogic.com [rabbit-semi]" January 29, 20162016-01-29
Mike,

Thanks for reporting this with that added detail. I was able to reproduce it on my end, and have pushed a fix up to GitHub.

https://github.com/digidotcom/DCRabbit_10/commit/18114a8d72d545b7ecca5581b37eb2d0dd520080

You can download the updated ASIX.LIB file using the following URL, and just replace the version in Dynamic C 10.72:

https://raw.githubusercontent.com/digidotcom/DCRabbit_10/18114a8d72d545b7ecca5581b37eb2d0dd520080/Lib/Rabbit4000/tcpip/ASIX.LIB

For those interested in knowing more, ip_print_ifs() calls ifmtu() in 10.72 instead of just pulling it from a field in the interface table (as it did in 10.66). Because of a bug in ASIX.LIB, ifmtu() would get an uninitialized value from the stack instead of 0, the correct return value for unimplemented ioctl features.

This bug could have caused other networking-related errors on boards with an ASIX Ethernet controller.

-Tom
On Jan 29, 2016, at 9:16 AM, m...@gmail.com [rabbit-semi] wrote:

> Hi Tom,
>
> I applied the patch (TCP/IP.LIB) patch to DC 10.72 and re-ran the tests.
> The results were the same.
>
> However when I used DC 10.66 then the problem went away.
> In other words, the value set by "ETH_MTU 1234" was correctly reported by ip_print_ifs() as;
>
> Interface table:
>
> # IP addr. Mask Up Lnk Pwr Type MTU Flags Peer/router
> -- --------------- --------------- --- --- --- ---- ---- ------ ---------------
> 0 192.168.1.5 255.255.255.0 yes yes yes eth 1234 * 192.168.1.254
>
> MTU:1234
>
> So DC 10.66 works correctly with the RCM4300, while DC 10.72 does not.
> I don't have any of the intermediate versions between 10.66 and 10.72.
>
> Regards,
> Mike
Reply by "mjm...@gmail.com [rabbit-semi]" January 29, 20162016-01-29
Hi Tom,

I applied the patch (TCP/IP.LIB) patch to DC 10.72 and re-ran the tests.
The results were the same.

However when I used DC 10.66 then the problem went away.
In other words, the value set by "ETH_MTU 1234" was correctly reported by ip_print_ifs() as;

Interface table:

# IP addr. Mask Up Lnk Pwr Type MTU Flags Peer/router
-- --------------- --------------- --- --- --- ---- ---- ------ ---------------
0 192.168.1.5 255.255.255.0 yes yes yes eth 1234 * 192.168.1.254

MTU:1234

So DC 10.66 works correctly with the RCM4300, while DC 10.72 does not.
I don't have any of the intermediate versions between 10.66 and 10.72.

Regards,
Mike
Reply by "mjm...@gmail.com [rabbit-semi]" January 29, 20162016-01-29
Hi Tom,

I am using DC 10.72.

I see that there is a patch "DC10.72_tcp_patch.zip" available, I haven't applied this yet.
After I have applied this I will repeat the tests again.

Regards,
Mike
Reply by "mjm...@gmail.com [rabbit-semi]" January 29, 20162016-01-29
Hi Tom,

I am using DC 10.72.

I see that there is a patch "DC10.72_tcp_patch.zip" available, I haven't applied this yet.
After I have applied this I will repeat the tests again.

Regards,
Mike
Reply by "mjm...@gmail.com [rabbit-semi]" January 29, 20162016-01-29
Hi Tom,

I am using DC 10.72.

I see that there is a patch "DC10.72_tcp_patch.zip" available, I haven't applied this yet.
After I have applied this I will repeat the tests again.

Regards,
Mike
Reply by "mjm...@gmail.com [rabbit-semi]" January 29, 20162016-01-29
Hi Tom,

I am using DC 10.72.

I see that there is a patch "DC10.72_tcp_patch.zip" available, I haven't applied this yet.
After I have applied this I will repeat the tests again.

Regards,
Mike
Reply by "Tom...@tomlogic.com [rabbit-semi]" January 29, 20162016-01-29
If you're using Dynamic C 10.70, please try with 10.72 and see if that changes anything.

If not, can you take one of the simplest networking samples (maybe one of the PING samples) and see what ip_print_ifs() reports there? We need to isolate the issue, and find out if its present in the 10.72 libraries, or if it's something in the configuration of your particular program.

-Tom
On Jan 28, 2016, at 9:45 PM, m...@gmail.com [rabbit-semi] wrote:

> Hi Peter,
>
> Thanks.
> If I use my RCM4010 then ip_print_ifs() correctly reports the MTU as set by the macro.
> So the problem is specific to the RCM4300 module.
Reply by "mjm...@gmail.com [rabbit-semi]" January 29, 20162016-01-29
Hi Peter,

Thanks.
If I use my RCM4010 then ip_print_ifs() correctly reports the MTU as set by the macro.
So the problem is specific to the RCM4300 module.
Reply by "pet...@yahoo.com [rabbit-semi]" January 28, 20162016-01-28
From what I can see ip_print_ifs() actually prints the minimum MTU across all the interfaces.

Regards,
Peter
Reply by "'Mi...@femtodesigns.com [rabbit-semi]" January 28, 20162016-01-28
Hi Steve,
Thanks for the reply.
I only set the MTU once right in beginning of my code.

I did as you suggested and added;

“printf("MTU:%d\r\n",ETH_MTU);”

I chose a value of 1400, and when I run it this I get:
“MTU:1400 “.

But if I also add “ip_print_ifs();” then I get this;
“Interface table:

# IP addr. Mask Up Lnk Type MTU Flags Peer/router
-- --------------- --------------- --- --- ---- ---- ------ ---------------
0 192.168.1.10 255.255.255.0 yes yes eth 16 * 192.168.1.254 “

I run this in a loop to see if anything is changing and it provides the same output messages.

To me it appears if the macro value is being set correctly but not being implemented?

Below are the only macros that I set;
//-----------------------------------
#define HTTP_MAXSERVERS 4
#class auto
#define RWEB_ZHTML_MAXVARLEN 1024
#define HTTP_MAXBUFFER 1024
#define USE_RABBITWEB 1
//

The complete system works fine but I must know if the MTU is set to 1500 or some higher value than 16.

Regards,
Mike

From: r... [mailto:r...]
Sent: Thursday, January 28, 2016 5:01 PM
To: r...
Subject: Re: [rabbit-semi] RCM4300 MTU Stuck at 16

If ETH_MTU is not defined in your code, the value is defined in net.lib and is either
1500 or 1489, depending on whether WIFI is used and if the board is a R5000 series.

Are you sure you haven't defined it somewhere? I suggest using a printf() statement
to send the value to the output window of the debugger and verify the value set.

printf("MTU: %d\r\n", ETH_MTU);

Steve

_____

From: "Femto Com m...@femtodesigns.com [rabbit-semi]"
To: r...
Sent: Thursday, January 28, 2016 4:02 AM
Subject: [rabbit-semi] RCM4300 MTU Stuck at 16

Good day,
I'm hoping that someone could assist me with setting the MTU value for the RCM4300.
On boot-up the interface table reports that "eth MTU 16".

Using the ETH_MTU macro has no effect, no matter which value I chose it remains at 16.

I can change the MTU of my RCM4010 to a value of my choice using the ETH_MTU macro.

Both modules are loaded with the same code.
I'm using DC 10.7.
Any idea where I can go and look?
Regards
Mike