rmnet.txt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. 1. Introduction
  2. rmnet driver is used for supporting the Multiplexing and aggregation
  3. Protocol (MAP). This protocol is used by all recent chipsets using Qualcomm
  4. Technologies, Inc. modems.
  5. This driver can be used to register onto any physical network device in
  6. IP mode. Physical transports include USB, HSIC, PCIe and IP accelerator.
  7. Multiplexing allows for creation of logical netdevices (rmnet devices) to
  8. handle multiple private data networks (PDN) like a default internet, tethering,
  9. multimedia messaging service (MMS) or IP media subsystem (IMS). Hardware sends
  10. packets with MAP headers to rmnet. Based on the multiplexer id, rmnet
  11. routes to the appropriate PDN after removing the MAP header.
  12. Aggregation is required to achieve high data rates. This involves hardware
  13. sending aggregated bunch of MAP frames. rmnet driver will de-aggregate
  14. these MAP frames and send them to appropriate PDN's.
  15. 2. Packet format
  16. a. MAP packet (data / control)
  17. MAP header has the same endianness of the IP packet.
  18. Packet format -
  19. Bit 0 1 2-7 8 - 15 16 - 31
  20. Function Command / Data Reserved Pad Multiplexer ID Payload length
  21. Bit 32 - x
  22. Function Raw Bytes
  23. Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command
  24. or data packet. Control packet is used for transport level flow control. Data
  25. packets are standard IP packets.
  26. Reserved bits are usually zeroed out and to be ignored by receiver.
  27. Padding is number of bytes to be added for 4 byte alignment if required by
  28. hardware.
  29. Multiplexer ID is to indicate the PDN on which data has to be sent.
  30. Payload length includes the padding length but does not include MAP header
  31. length.
  32. b. MAP packet (command specific)
  33. Bit 0 1 2-7 8 - 15 16 - 31
  34. Function Command Reserved Pad Multiplexer ID Payload length
  35. Bit 32 - 39 40 - 45 46 - 47 48 - 63
  36. Function Command name Reserved Command Type Reserved
  37. Bit 64 - 95
  38. Function Transaction ID
  39. Bit 96 - 127
  40. Function Command data
  41. Command 1 indicates disabling flow while 2 is enabling flow
  42. Command types -
  43. 0 for MAP command request
  44. 1 is to acknowledge the receipt of a command
  45. 2 is for unsupported commands
  46. 3 is for error during processing of commands
  47. c. Aggregation
  48. Aggregation is multiple MAP packets (can be data or command) delivered to
  49. rmnet in a single linear skb. rmnet will process the individual
  50. packets and either ACK the MAP command or deliver the IP packet to the
  51. network stack as needed
  52. MAP header|IP Packet|Optional padding|MAP header|IP Packet|Optional padding....
  53. MAP header|IP Packet|Optional padding|MAP header|Command Packet|Optional pad...
  54. 3. Userspace configuration
  55. rmnet userspace configuration is done through netlink library librmnetctl
  56. and command line utility rmnetcli. Utility is hosted in codeaurora forum git.
  57. The driver uses rtnl_link_ops for communication.
  58. https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/dataservices/tree/rmnetctl