db8a563a | 11-Jan-2023 |
Daniele Palmas <dnlplm@gmail.com> |
net: qualcomm: rmnet: add ethtool support for configuring tx aggregation
Add support for ETHTOOL_COALESCE_TX_AGGR for configuring the tx aggregation settings.
Signed-off-by: Daniele Palmas <dnlplm@
net: qualcomm: rmnet: add ethtool support for configuring tx aggregation
Add support for ETHTOOL_COALESCE_TX_AGGR for configuring the tx aggregation settings.
Signed-off-by: Daniele Palmas <dnlplm@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
185a108f | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: IPv6 payload length is simple
We don't support any extension headers for IPv6 packets. Extension headers therefore contribute 0 bytes to the payload length. As a result we ca
net: qualcomm: rmnet: IPv6 payload length is simple
We don't support any extension headers for IPv6 packets. Extension headers therefore contribute 0 bytes to the payload length. As a result we can just use the IPv6 payload length as the length used to compute the pseudo header checksum for both UDP and TCP messages.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
411a795e | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: drop some unary NOTs
We compare a payload checksum with a pseudo checksum value for equality in rmnet_map_ipv4_dl_csum_trailer(). Both of those values are computed with a unar
net: qualcomm: rmnet: drop some unary NOTs
We compare a payload checksum with a pseudo checksum value for equality in rmnet_map_ipv4_dl_csum_trailer(). Both of those values are computed with a unary NOT (~) operation. The result of the comparison is the same if we omit that NOT for both values.
Remove these operations in rmnet_map_ipv6_dl_csum_trailer() also.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
be754f64 | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: trailer value is a checksum
The csum_value field in the rmnet_map_dl_csum_trailer structure is a "real" Internet checksum. It is a 16 bit value, in big endian format, which re
net: qualcomm: rmnet: trailer value is a checksum
The csum_value field in the rmnet_map_dl_csum_trailer structure is a "real" Internet checksum. It is a 16 bit value, in big endian format, which represents an inverted ones' complement sum over pairs of bytes.
Make that clear by changing its type to __sum16.
This makes a typecast in rmnet_map_ipv4_dl_csum_trailer() and another in rmnet_map_ipv6_dl_csum_trailer() unnecessary.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
698aa6c4 | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: remove unneeded code
The previous patch makes rmnet_map_ipv4_dl_csum_trailer() return early with an error if it is determined that the computed checksum for the IP payload does
net: qualcomm: rmnet: remove unneeded code
The previous patch makes rmnet_map_ipv4_dl_csum_trailer() return early with an error if it is determined that the computed checksum for the IP payload does not match what was expected.
If the computed checksum *does* match the expected value, the IP payload (i.e., the transport message), can be considered good. There is no need to do any further processing of the message.
This means a big block of code is unnecessary for validating the transport checksum value, and can be removed.
Make comparable changes in rmnet_map_ipv6_dl_csum_trailer().
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
fab01a6f | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: return earlier for bad checksum
In rmnet_map_ipv4_dl_csum_trailer(), if the sum of the trailer checksum and the pseudo checksum is non-zero, checksum validation has failed. We
net: qualcomm: rmnet: return earlier for bad checksum
In rmnet_map_ipv4_dl_csum_trailer(), if the sum of the trailer checksum and the pseudo checksum is non-zero, checksum validation has failed. We can return an error as soon as we know that.
We can do the same thing in rmnet_map_ipv6_dl_csum_trailer().
Add some comments that explain where we're headed.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
9d0407bc | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: show that an intermediate sum is zero
This patch simply demonstrates that a checksum value computed when verifying an offloaded transport checksum value for both IPv4 and IPv6
net: qualcomm: rmnet: show that an intermediate sum is zero
This patch simply demonstrates that a checksum value computed when verifying an offloaded transport checksum value for both IPv4 and IPv6 is (normally) 0. It can be squashed into the next patch.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
bbd45f10 | 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: rearrange some NOTs
With the ones' complement arithmetic, the sum of two negated values is equal to the negation of the sum of the two original values [1]. Rearrange the calcul
net: qualcomm: rmnet: rearrange some NOTs
With the ones' complement arithmetic, the sum of two negated values is equal to the negation of the sum of the two original values [1]. Rearrange the calculation ip6_payload_sum using this property.
[1] https://tools.ietf.org/html/rfc1071
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|