jhelovuo / RustDDS

Rust implementation of Data Distribution Service
Apache License 2.0
330 stars 66 forks source link

64ko message size limit #244

Closed steux closed 1 year ago

steux commented 1 year ago

Hi, Following your last update to master, I've made a test to test fragmentation, and apparently it works OK now, BUT messages of size > 64ko are still discarded. To test this, you can use this: cargo run -- -r foobar to launch a reader cargo run -- -w foobar -s 65000 works correctly. The reader gets the message. cargo run -- -w foobar -s 66000 fails. The reader doesn't get any message. This is probably not directly linked to fragmentation, since fragmentation occurs starting from size 1024, according to tcpdump and the source code : src/dds/writer.rs:253 : data_max_size_serialized: 1024, src/dds/writer.rs:414 : let fragmentation_needed = ddsdata.payload_size() > self.data_max_size_serialized; This is something else. Would you have any idea ? Best regards.

jhelovuo commented 1 year ago

A good find.

This seems to be caused by retransmits that are made in response to ACKNACK from Reader, in handle_repair_data_send_worker. The problem is that fragmented send is just not implemented there, like it is in process_writer_command.

It may take some time before I can get to fixing this, but you are welcome to submit a PR if you are able to.

steux commented 1 year ago

OK. What I understand now is that there are actually two bugs:

jhelovuo commented 1 year ago

Yes, I agree that the second bug is as you describe.

But how does the first one occur?

steux commented 1 year ago

Hi, I think I've found why the first one occurs. I've corrected it and sent you a PR. Now packets over 64kb of size are correctly transmitted. Still have to correct the second bug. Regards. B. Steux