-
Notifications
You must be signed in to change notification settings - Fork 19
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
"Message too long" when running test #46
Comments
Hi @taismi , Thanks for opening this issue! Please can you provide the following outputs?
|
|
@taismi Thanks for the quick response! Sorry but I made a mistake in my previous comment, can you please provide the output of this command: Note the uppercase "V", I put lowercase in my previous comment. |
|
Delay Tx error seems caused by an incorrectly ordered assignments in defaults.c/set_default_values. > diff --git a/defaults.c b/defaults.c
index 0eea55e..83e94d7 100644
--- a/defaults.c
+++ b/defaults.c
@@ -92,11 +92,11 @@ void set_default_values(struct app_params *app_params,
frame_headers->src_mac[3] = 0x00;
frame_headers->src_mac[4] = 0x00;
frame_headers->src_mac[5] = 0x01;
+ frame_headers->tlv_size = sizeof(uint8_t) + sizeof(uint16_t) +
+ sizeof(uint32_t);
frame_headers->sub_tlv_size = frame_headers->tlv_size +
sizeof(uint8_t) + sizeof(uint16_t) +
sizeof(uint64_t);
- frame_headers->tlv_size = sizeof(uint8_t) + sizeof(uint16_t) +
- sizeof(uint32_t);
frame_headers->tx_buffer = (uint8_t*)calloc(1, F_SIZE_MAX);
frame_headers->vlan_dei = 0;
frame_headers->vlan_id = VLAN_ID_DEF;
@@ -328,4 +328,4 @@ int16_t setup_socket_interface(struct frame_headers *frame_headers, |
Speed test Tx error seems caused by SOCK_RAW -> SOCK_DGRAM in defaults.c/setup_socket. At least for deb9. It is possible to workaround with command line parameter -f (etherate -f 1460 for example). Still have problems with Speed test Tx error : Resource temporarily unavailable. PS: To run etherate in ACK mode this patch should be applied: diff --git a/functions.c b/functions.c
index a36ece5..faad4f4 100644
--- a/functions.c
+++ b/functions.c
@@ -2214,7 +2214,7 @@ void sync_settings(struct app_params *app_params,
// TX has set ACK mode frame count
} else if (ntohs(*frame_headers->rx_sub_tlv_type) == TYPE_ACKCOUNT) {
- test_params->f_ack_timeout = (uint32_t)ntohll(*frame_headers->rx_sub_tlv_value);
+ test_params->f_ack_count = (uint32_t)ntohll(*frame_headers->rx_sub_tlv_value);
printf("ACK mode set to ACK every %" PRIu32 " frames\n", test_params->f_ack_count);
// TX has requested MTU sweep test |
@yskripachov - Thanks for reporting the issue in I've put this in it's own issue record here: #47 Also thanks for reporting the issue in In this issue record I will focus on the problem reported by @taismi. |
The fix for your issue is as follows: https://github.com/jwbensley/Etherate/blob/master/defaults.c#L232 test_interface->sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ALL)); ///// Was SOCK_RAW I was testing SOCK_DGRAM must have left that in the code when I made my last git push. SOCK_DGRAM expects a smaller packet size because the Kernel will build the Ether/IP/TCP/UDP headers for you. Etherate should use SOCK_RAW because it builds the frame including the Ethernet headers. This means that using SOCK_DGRAM the Kernel reports EMSGSIZE because it wants to build the headers onto the frame which is already 1500 bytes in size, and exceeds you 1500 byte link MTU. This is why In addition to this each instance of https://github.com/jwbensley/Etherate/blob/master/speed_tests.c#L229 I will fix this in the next version. |
@taismi - Can you please test again with the latest version? I have put a short term fix in for you to check by removing the |
Now etherate starts sending. Rx node says "Settings have been synchronised" and "Frame size is 1514 bytes" and "Calculating delay between hosts..." but the too long error is still there.
|
Hi @taismi Please grab the latest copy again, I've also added the fix from @yskripachov I was very tired from work yesterday and forgot to add this in :) |
@taismi is the issue fixed for you now? |
This is fixed in version 1.17 (2018-04). |
Hello
I'm trying to run tests atm in our LAN.
'sudo etherate -i enp0s25'
prints
'Delay test Tx error: Message tool long'
and
'Speed test Tx error: Message too long'
What can cause this? It does't matter if I define -f 1000 etc. We are using non managed switches.
The text was updated successfully, but these errors were encountered: