Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10, v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19 |
|
#
64b5d1f8 |
| 11-Jan-2023 |
Daniele Palmas <dnlplm@gmail.com> |
net: qualcomm: rmnet: add tx packets aggregation
Add tx packets aggregation.
Bidirectional TCP throughput tests through iperf with low-cat Thread-x based modems revelead performance issues both in
net: qualcomm: rmnet: add tx packets aggregation
Add tx packets aggregation.
Bidirectional TCP throughput tests through iperf with low-cat Thread-x based modems revelead performance issues both in tx and rx.
The Windows driver does not show this issue: inspecting USB packets revealed that the only notable change is the driver enabling tx packets aggregation.
Tx packets aggregation is by default disabled and can be enabled by increasing the value of ETHTOOL_A_COALESCE_TX_MAX_AGGR_FRAMES.
The maximum aggregated size is by default set to a reasonably low value in order to support the majority of modems.
This implementation is based on patches available in Code Aurora repositories (msm kernel) whose main authors are
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Daniele Palmas <dnlplm@gmail.com> Reviewed-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61, v5.15.60, v5.15.59, v5.19, v5.15.58, v5.15.57, v5.15.56, v5.15.55, v5.15.54, v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45, v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26, v5.15.25 |
|
#
354ad9a8 |
| 20-Feb-2022 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
net: qualcomm: rmnet: Use skb_put_zero() to simplify code
Use skb_put_zero() instead of hand-writing it. This saves a few lines of code and is more readable.
Signed-off-by: Christophe JAILLET <chri
net: qualcomm: rmnet: Use skb_put_zero() to simplify code
Use skb_put_zero() instead of hand-writing it. This saves a few lines of code and is more readable.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v5.15.24, v5.15.23, v5.15.22, v5.15.21, v5.15.20, v5.15.19, v5.15.18, v5.15.17, v5.4.173, v5.15.16, v5.15.15, v5.16, v5.15.10, v5.15.9, v5.15.8, v5.15.7, v5.15.6, v5.15.5, v5.15.4, v5.15.3, v5.15.2, v5.15.1, v5.15, v5.14.14, v5.14.13, v5.14.12, v5.14.11, v5.14.10, v5.14.9, v5.14.8, v5.14.7, v5.14.6, v5.10.67, v5.10.66, v5.14.5, v5.14.4, v5.10.65, v5.14.3, v5.10.64, v5.14.2, v5.10.63, v5.14.1, v5.10.62, v5.14, v5.10.61, v5.10.60, v5.10.53, v5.10.52, v5.10.51, v5.10.50, v5.10.49, v5.13, v5.10.46 |
|
#
753ba09a |
| 19-Jun-2021 |
Dan Carpenter <dan.carpenter@oracle.com> |
net: qualcomm: rmnet: fix two pointer math bugs
We recently changed these two pointers from void pointers to struct pointers and it breaks the pointer math so now the "txphdr" points beyond the end
net: qualcomm: rmnet: fix two pointer math bugs
We recently changed these two pointers from void pointers to struct pointers and it breaks the pointer math so now the "txphdr" points beyond the end of the buffer.
Fixes: 56a967c4f7e5 ("net: qualcomm: rmnet: Remove some unneeded casts") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
56a967c4 |
| 16-Jun-2021 |
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> |
net: qualcomm: rmnet: Remove some unneeded casts
Remove the explicit casts in the checksum complement functions and pass the actual protocol specific headers instead.
Signed-off-by: Subash Abhinov
net: qualcomm: rmnet: Remove some unneeded casts
Remove the explicit casts in the checksum complement functions and pass the actual protocol specific headers instead.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
b84b53ee |
| 13-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: always expose a few functions
A recent change tidied up some conditional code, avoiding the use of some #ifdefs. Unfortunately, if CONFIG_IPV6 was not enabled, it meant that t
net: qualcomm: rmnet: always expose a few functions
A recent change tidied up some conditional code, avoiding the use of some #ifdefs. Unfortunately, if CONFIG_IPV6 was not enabled, it meant that two functions were referenced but never defined.
The easiest fix is to just define stubs for these functions if CONFIG_IPV6 is not defined. This will soon be simplified further by some other development in the works...
Reported-by: kernel test robot <lkp@intel.com> Fixes: 75db5b07f8c39 ("net: qualcomm: rmnet: eliminate some ifdefs") Signed-off-by: Alex Elder <elder@linaro.org> 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 ...
|
#
0e6af897 |
| 12-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: remove some local variables
In rmnet_map_ipv4_dl_csum_trailer(), remove the "csum_temp" and "addend" local variables, and simplify a few lines of code.
Remove the "csum_temp",
net: qualcomm: rmnet: remove some local variables
In rmnet_map_ipv4_dl_csum_trailer(), remove the "csum_temp" and "addend" local variables, and simplify a few lines of code.
Remove the "csum_temp", "csum_value", "ip6_hdr_csum", and "addend" local variables in rmnet_map_ipv6_dl_csum_trailer(), and simplify a few lines of code there as well.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
23a5708d |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: avoid unnecessary IPv6 byte-swapping
In the previous patch IPv4 download checksum offload code was updated to avoid unnecessary byte swapping, based on properties of the Intern
net: qualcomm: rmnet: avoid unnecessary IPv6 byte-swapping
In the previous patch IPv4 download checksum offload code was updated to avoid unnecessary byte swapping, based on properties of the Internet checksum algorithm. This patch makes comparable changes to the IPv6 download checksum offload handling.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a2918a16 |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: avoid unnecessary byte-swapping
Internet checksums are used for IPv4 header checksum, as well as TCP segment and UDP datagram checksums. Such a checksum represents the negated
net: qualcomm: rmnet: avoid unnecessary byte-swapping
Internet checksums are used for IPv4 header checksum, as well as TCP segment and UDP datagram checksums. Such a checksum represents the negated sum of adjacent pairs of bytes, using ones' complement arithmetic.
One property of the Internet checkum is byte order independence [1]. Specifically, the sum of byte-swapped pairs is equal to the result of byte swapping the sum of those same pairs when not byte-swapped.
So for example if a, b, c, d, y, and z are hexadecimal digits, and PLUS represents ones' complement addition: If: ab PLUS cd = yz Then: ba PLUS dc = zy
For this reason, there is no need to swap the order of bytes in the checksum value held in a message header, nor the one in the QMAPv4 trailer, in order to operate on them.
In other words, we can determine whether the hardware-computed checksum matches the one in the message header without any byte swaps.
(This patch leaves in place all existing type casts.)
[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 ...
|
#
e5adbbdf |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: clarify a bit of code
In rmnet_map_ipv6_dl_csum_trailer() there is an especially involved line of code that determines the ones' complement sum of the IPv6 packet header (in ho
net: qualcomm: rmnet: clarify a bit of code
In rmnet_map_ipv6_dl_csum_trailer() there is an especially involved line of code that determines the ones' complement sum of the IPv6 packet header (in host byte order). Simplify that by storing the result of computing just the header checksum in a local variable, then using that in the original assignment.
Use the size of the IPv6 header structure as the number of bytes to checksum, rather than computing the offset to the transport header. And use ip_fast_csum() rather than ipa_compute_csum(), knowing that the size of an IPv6 header (40 bytes) is a multiple of 4 bytes greater than 16.
Add some comments to match rmnet_map_ipv4_dl_csum_trailer().
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
16bf3d33 |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: IPv4 header has zero checksum
In rmnet_map_ipv4_dl_csum_trailer(), an illegal checksum subtraction is done, subtracting hdr_csum (in host byte order) from csum_value (in networ
net: qualcomm: rmnet: IPv4 header has zero checksum
In rmnet_map_ipv4_dl_csum_trailer(), an illegal checksum subtraction is done, subtracting hdr_csum (in host byte order) from csum_value (in network byte order). Despite being illegal, it generally works, because it turns out the value subtracted is (or should be) always 0, which has the same representation in either byte order.
Doing illegal operations is not good form though, so fix this by verifying the IP header checksum early in that function. If its checksum is non-zero, the packet will be bad, so just return an error. This will cause the packet to passed to the IP layer where it can be dropped.
Thereafter, there is no need subtract the IP header checksum from the checksum value in the trailer because we know it is zero. Add a comment explaining this.
This type of packet error is different from other types, so add a new statistics counter to track this condition.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
874a333f |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: simplify rmnet_map_get_csum_field()
The checksum fields of the TCP and UDP header structures already have type __sum16. We don't support any other protocol headers, so we can
net: qualcomm: rmnet: simplify rmnet_map_get_csum_field()
The checksum fields of the TCP and UDP header structures already have type __sum16. We don't support any other protocol headers, so we can simplify rmnet_map_get_csum_field(), getting rid of the local variable entirely and just returning the appropriate address.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1d257f45 |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: get rid of some local variables
The value passed as an argument to rmnet_map_ipv4_ul_csum_header() is always an IPv4 header. Rather than using a local variable, just have the
net: qualcomm: rmnet: get rid of some local variables
The value passed as an argument to rmnet_map_ipv4_ul_csum_header() is always an IPv4 header. Rather than using a local variable, just have the type of the argument reflect the proper type.
In rmnet_map_ipv6_ul_csum_header() things are defined a little differently, but make the same basic change there.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
75db5b07 |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: eliminate some ifdefs
If IPV6 is not enabled in the kernel configuration, the RMNet checksum code indicates a buffer containing an IPv6 packet is not supported. The same thing
net: qualcomm: rmnet: eliminate some ifdefs
If IPV6 is not enabled in the kernel configuration, the RMNet checksum code indicates a buffer containing an IPv6 packet is not supported. The same thing happens if a buffer contains something other than an IPv4 or IPv6 packet.
We can rearrange things a bit in two functions so that some #ifdef calls can simply be eliminated.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
e4517d8a |
| 11-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: use ip_is_fragment()
In rmnet_map_ipv4_dl_csum_trailer() use ip_is_fragment() to determine whether a socket buffer contains a packet fragment.
Signed-off-by: Alex Elder <elder
net: qualcomm: rmnet: use ip_is_fragment()
In rmnet_map_ipv4_dl_csum_trailer() use ip_is_fragment() to determine whether a socket buffer contains a packet fragment.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v5.10.43 |
|
#
118de610 |
| 03-Jun-2021 |
Nathan Chancellor <nathan@kernel.org> |
net: ethernet: rmnet: Restructure if checks to avoid uninitialized warning
Clang warns that proto in rmnet_map_v5_checksum_uplink_packet() might be used uninitialized:
drivers/net/ethernet/qualcomm
net: ethernet: rmnet: Restructure if checks to avoid uninitialized warning
Clang warns that proto in rmnet_map_v5_checksum_uplink_packet() might be used uninitialized:
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:14: warning: variable 'proto' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (skb->protocol == htons(ETH_P_IPV6)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:295:36: note: uninitialized use occurs here check = rmnet_map_get_csum_field(proto, trans); ^~~~~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:10: note: remove the 'if' if its condition is always true } else if (skb->protocol == htons(ETH_P_IPV6)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:270:11: note: initialize the variable 'proto' to silence this warning u8 proto; ^ = '\0' 1 warning generated.
This is technically a false positive because there is an if statement above this one that checks skb->protocol for not being either ETH_P_IP{,V6}. However, it is more obvious to sink that into the if statement as an else branch, which makes the code clearer and fixes the warning.
At the same time, move the "IS_ENABLED(CONFIG_IPV6)" into the else if condition so that the else branch of the preprocessor conditional can be shared, since there is no build failure with CONFIG_IPV6 disabled.
Fixes: b6e5d27e32ef ("net: ethernet: rmnet: Add support for MAPv5 egress packets") Link: https://github.com/ClangBuiltLinux/linux/issues/1390 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v5.10.42 |
|
#
b6e5d27e |
| 01-Jun-2021 |
Sharath Chandra Vurukala <sharathv@codeaurora.org> |
net: ethernet: rmnet: Add support for MAPv5 egress packets
Adding support for MAPv5 egress packets.
This involves adding the MAPv5 header and setting the csum_valid_required in the checksum header
net: ethernet: rmnet: Add support for MAPv5 egress packets
Adding support for MAPv5 egress packets.
This involves adding the MAPv5 header and setting the csum_valid_required in the checksum header to request HW compute the checksum.
Corresponding stats are incremented based on whether the checksum is computed in software or HW.
New stat has been added which represents the count of packets whose checksum is calculated by the HW.
Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
e1d9a90a |
| 01-Jun-2021 |
Sharath Chandra Vurukala <sharathv@codeaurora.org> |
net: ethernet: rmnet: Support for ingress MAPv5 checksum offload
Adding support for processing of MAPv5 downlink packets. It involves parsing the Mapv5 packet and checking the csum header to know wh
net: ethernet: rmnet: Support for ingress MAPv5 checksum offload
Adding support for processing of MAPv5 downlink packets. It involves parsing the Mapv5 packet and checking the csum header to know whether the hardware has validated the checksum and is valid or not.
Based on the checksum valid bit the corresponding stats are incremented and skb->ip_summed is marked either CHECKSUM_UNNECESSARY or left as CHEKSUM_NONE to let network stack revalidate the checksum and update the respective snmp stats.
Current MAPV1 header has been modified, the reserved field in the Mapv1 header is now used for next header indication.
Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v5.10.41, v5.10.40, v5.10.39, v5.4.119, v5.10.36, v5.10.35, v5.10.34, v5.4.116, v5.10.33, v5.12, v5.10.32, v5.10.31, v5.10.30, v5.10.27, v5.10.26, v5.10.25, v5.10.24 |
|
#
86ca860e |
| 15-Mar-2021 |
Alex Elder <elder@linaro.org> |
net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header
Replace the use of C bit-fields in the rmnet_map_ul_csum_header structure with a single two-byte (big endian) structure member,
net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header
Replace the use of C bit-fields in the rmnet_map_ul_csum_header structure with a single two-byte (big endian) structure member, and use masks to encode or get values within it. The content of these fields can be accessed using simple bitwise AND and OR operations on the (host byte order) value of the new structure member.
Previously rmnet_map_ipv4_ul_csum_header() would update C bit-field values in host byte order, then forcibly fix their byte order using a combination of byte swap operations and types.
Instead, just compute the value that needs to go into the new structure member and save it with a simple byte-order conversion.
Make similar simplifications in rmnet_map_ipv6_ul_csum_header().
Finally, in rmnet_map_checksum_uplink_packet() a set of assignments zeroes every field in the upload checksum header. Replace that with a single memset() operation.
Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|