Hi all,
I work on huge transfer for j1939 stack.
Current stack works as following:
* RX path:
on J1939_(E)TP_CMD_RTS, see if transfer size correct according to the
protocol. Try to allocate, if filed send J1939_XTP_ABORT_RESOURCE
* TX path:
- Userspace app calls send(..buf, size,...).
- j1939: Try to allocated skb for the size (for huge transfer it will
fail at some point.)
- send J1939_(E)TP_CMD_RTS
- after J1939_(E)TP_CMD_CTS, pick data out of huge skb and create tiny
skbs suitable for CAN (this part can be probably optimized with
skb_fragments)
So far I have following questions:
- How IsoBUS devices handle huge transfers? Do all of them able to
transfer 112MiB in one run? If system has no enough resources for one
big transfer, how is it handled?
- how should be handled aborted transfer? 112MiB will take probably some
hours to run. In case of error, even at the end of transfer, socket will
just return error to the user space. In current state, complete
retransmission will be needed, and it makes no real sense...
What are your common practices and experience?
If i see it correctly, ETP is good to reduce time needed for handshake
on each transfer. At what size this advantage do not provide additional
performance?
Regards,
Oleksij