<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.14.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2021-06-21T19:19:19Z</updated>
<entry>
<title>net: qualcomm: rmnet: fix two pointer math bugs</title>
<updated>2021-06-21T19:19:19Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-06-19T13:52:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=753ba09aa3ea14b593b168d3ef541da00f4659f5'/>
<id>urn:sha1:753ba09aa3ea14b593b168d3ef541da00f4659f5</id>
<content type='text'>
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 &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Subash Abhinov Kasiviswanathan &lt;subashab@codeaurora.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: Remove some unneeded casts</title>
<updated>2021-06-16T19:19:50Z</updated>
<author>
<name>Subash Abhinov Kasiviswanathan</name>
<email>subashab@codeaurora.org</email>
</author>
<published>2021-06-16T07:59:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=56a967c4f7e5fed2e66d90906ff5956abf69364a'/>
<id>urn:sha1:56a967c4f7e5fed2e66d90906ff5956abf69364a</id>
<content type='text'>
Remove the explicit casts in the checksum complement functions
and pass the actual protocol specific headers instead.

Signed-off-by: Subash Abhinov Kasiviswanathan &lt;subashab@codeaurora.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: always expose a few functions</title>
<updated>2021-06-14T19:43:45Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-13T14:25:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b84b53ee8337ca69512d25295961571fa08a219d'/>
<id>urn:sha1:b84b53ee8337ca69512d25295961571fa08a219d</id>
<content type='text'>
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 &lt;lkp@intel.com&gt;
Fixes: 75db5b07f8c39 ("net: qualcomm: rmnet: eliminate some ifdefs")
Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: IPv6 payload length is simple</title>
<updated>2021-06-12T20:18:49Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=185a108fe0429ddde6388d5a85d701a39beadfec'/>
<id>urn:sha1:185a108fe0429ddde6388d5a85d701a39beadfec</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: drop some unary NOTs</title>
<updated>2021-06-12T20:18:49Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=411a795e14b1fcbf64bc9ef6869d2bf9a5bf3c9a'/>
<id>urn:sha1:411a795e14b1fcbf64bc9ef6869d2bf9a5bf3c9a</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: trailer value is a checksum</title>
<updated>2021-06-12T20:18:49Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=be754f6435936e78dafe0ebb9d1e9d52c3bde842'/>
<id>urn:sha1:be754f6435936e78dafe0ebb9d1e9d52c3bde842</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: remove unneeded code</title>
<updated>2021-06-12T20:18:48Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=698aa6c46bf09070310cd2c8893ea2de5a796644'/>
<id>urn:sha1:698aa6c46bf09070310cd2c8893ea2de5a796644</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: return earlier for bad checksum</title>
<updated>2021-06-12T20:18:48Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fab01a6f3a61748b9c2e038c84498c6624b06236'/>
<id>urn:sha1:fab01a6f3a61748b9c2e038c84498c6624b06236</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: show that an intermediate sum is zero</title>
<updated>2021-06-12T20:18:48Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9d0407bc4c9ca7a2378230dd86f8ce90a2b6ad09'/>
<id>urn:sha1:9d0407bc4c9ca7a2378230dd86f8ce90a2b6ad09</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: qualcomm: rmnet: rearrange some NOTs</title>
<updated>2021-06-12T20:18:48Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2021-06-12T14:37:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bbd45f10ed0e032b599973d56d5c221266cf2ccf'/>
<id>urn:sha1:bbd45f10ed0e032b599973d56d5c221266cf2ccf</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
