Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: networking: Add documentation for MAPv5

Adding documentation explaining the new MAPv4/v5 packet formats
and the corresponding checksum offload headers.

Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sharath Chandra Vurukala and committed by
David S. Miller
710b797c e0ae757c

+114 -12
+114 -12
Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
··· 27 27 2. Packet format 28 28 ================ 29 29 30 - a. MAP packet (data / control) 30 + a. MAP packet v1 (data / control) 31 31 32 - MAP header has the same endianness of the IP packet. 32 + MAP header fields are in big endian format. 33 33 34 34 Packet format:: 35 35 36 - Bit 0 1 2-7 8 - 15 16 - 31 36 + Bit 0 1 2-7 8-15 16-31 37 37 Function Command / Data Reserved Pad Multiplexer ID Payload length 38 - Bit 32 - x 39 - Function Raw Bytes 38 + 39 + Bit 32-x 40 + Function Raw bytes 40 41 41 42 Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command 42 - or data packet. Control packet is used for transport level flow control. Data 43 + or data packet. Command packet is used for transport level flow control. Data 43 44 packets are standard IP packets. 44 45 45 - Reserved bits are usually zeroed out and to be ignored by receiver. 46 + Reserved bits must be zero when sent and ignored when received. 46 47 47 - Padding is number of bytes to be added for 4 byte alignment if required by 48 - hardware. 48 + Padding is the number of bytes to be appended to the payload to 49 + ensure 4 byte alignment. 49 50 50 51 Multiplexer ID is to indicate the PDN on which data has to be sent. 51 52 52 53 Payload length includes the padding length but does not include MAP header 53 54 length. 54 55 55 - b. MAP packet (command specific):: 56 + b. Map packet v4 (data / control) 56 57 57 - Bit 0 1 2-7 8 - 15 16 - 31 58 + MAP header fields are in big endian format. 59 + 60 + Packet format:: 61 + 62 + Bit 0 1 2-7 8-15 16-31 63 + Function Command / Data Reserved Pad Multiplexer ID Payload length 64 + 65 + Bit 32-(x-33) (x-32)-x 66 + Function Raw bytes Checksum offload header 67 + 68 + Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command 69 + or data packet. Command packet is used for transport level flow control. Data 70 + packets are standard IP packets. 71 + 72 + Reserved bits must be zero when sent and ignored when received. 73 + 74 + Padding is the number of bytes to be appended to the payload to 75 + ensure 4 byte alignment. 76 + 77 + Multiplexer ID is to indicate the PDN on which data has to be sent. 78 + 79 + Payload length includes the padding length but does not include MAP header 80 + length. 81 + 82 + Checksum offload header, has the information about the checksum processing done 83 + by the hardware.Checksum offload header fields are in big endian format. 84 + 85 + Packet format:: 86 + 87 + Bit 0-14 15 16-31 88 + Function Reserved Valid Checksum start offset 89 + 90 + Bit 31-47 48-64 91 + Function Checksum length Checksum value 92 + 93 + Reserved bits must be zero when sent and ignored when received. 94 + 95 + Valid bit indicates whether the partial checksum is calculated and is valid. 96 + Set to 1, if its is valid. Set to 0 otherwise. 97 + 98 + Padding is the number of bytes to be appended to the payload to 99 + ensure 4 byte alignment. 100 + 101 + Checksum start offset, Indicates the offset in bytes from the beginning of the 102 + IP header, from which modem computed checksum. 103 + 104 + Checksum length is the Length in bytes starting from CKSUM_START_OFFSET, 105 + over which checksum is computed. 106 + 107 + Checksum value, indicates the checksum computed. 108 + 109 + c. MAP packet v5 (data / control) 110 + 111 + MAP header fields are in big endian format. 112 + 113 + Packet format:: 114 + 115 + Bit 0 1 2-7 8-15 16-31 116 + Function Command / Data Next header Pad Multiplexer ID Payload length 117 + 118 + Bit 32-x 119 + Function Raw bytes 120 + 121 + Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command 122 + or data packet. Command packet is used for transport level flow control. Data 123 + packets are standard IP packets. 124 + 125 + Next header is used to indicate the presence of another header, currently is 126 + limited to checksum header. 127 + 128 + Padding is the number of bytes to be appended to the payload to 129 + ensure 4 byte alignment. 130 + 131 + Multiplexer ID is to indicate the PDN on which data has to be sent. 132 + 133 + Payload length includes the padding length but does not include MAP header 134 + length. 135 + 136 + d. Checksum offload header v5 137 + 138 + Checksum offload header fields are in big endian format. 139 + 140 + Bit 0 - 6 7 8-15 16-31 141 + Function Header Type Next Header Checksum Valid Reserved 142 + 143 + Header Type is to indicate the type of header, this usually is set to CHECKSUM 144 + 145 + Header types 146 + = ========================================== 147 + 0 Reserved 148 + 1 Reserved 149 + 2 checksum header 150 + 151 + Checksum Valid is to indicate whether the header checksum is valid. Value of 1 152 + implies that checksum is calculated on this packet and is valid, value of 0 153 + indicates that the calculated packet checksum is invalid. 154 + 155 + Reserved bits must be zero when sent and ignored when received. 156 + 157 + e. MAP packet v1/v5 (command specific):: 158 + 159 + Bit 0 1 2-7 8 - 15 16 - 31 58 160 Function Command Reserved Pad Multiplexer ID Payload length 59 161 Bit 32 - 39 40 - 45 46 - 47 48 - 63 60 162 Function Command name Reserved Command Type Reserved ··· 176 74 3 is for error during processing of commands 177 75 = ========================================== 178 76 179 - c. Aggregation 77 + f. Aggregation 180 78 181 79 Aggregation is multiple MAP packets (can be data or command) delivered to 182 80 rmnet in a single linear skb. rmnet will process the individual