<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/gro.h, branch v5.18.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.18.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.18.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-02-18T11:00:25+00:00</updated>
<entry>
<title>net: gro: Fix a 'directive in macro's argument list' sparse warning</title>
<updated>2022-02-18T11:00:25+00:00</updated>
<author>
<name>Gal Pressman</name>
<email>gal@nvidia.com</email>
</author>
<published>2022-02-17T08:07:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8467fadc115cb08bb1cbc7885cb7b7ef1871cae4'/>
<id>urn:sha1:8467fadc115cb08bb1cbc7885cb7b7ef1871cae4</id>
<content type='text'>
Following the cited commit, sparse started complaining about:
../include/net/gro.h:58:1: warning: directive in macro's argument list
../include/net/gro.h:59:1: warning: directive in macro's argument list

Fix that by moving the defines out of the struct_group() macro.

Fixes: de5a1f3ce4c8 ("net: gro: minor optimization for dev_gro_receive()")
Reviewed-by: Maxim Mikityanskiy &lt;maximmi@nvidia.com&gt;
Signed-off-by: Gal Pressman &lt;gal@nvidia.com&gt;
Acked-by: Alexander Lobakin &lt;alexandr.lobakin@intel.com&gt;
Acked-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: gro: minor optimization for dev_gro_receive()</title>
<updated>2022-02-05T15:13:52+00:00</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2022-02-04T11:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de5a1f3ce4c862150dc442530dba19e1d1dc6bc2'/>
<id>urn:sha1:de5a1f3ce4c862150dc442530dba19e1d1dc6bc2</id>
<content type='text'>
While inspecting some perf report, I noticed that the compiler
emits suboptimal code for the napi CB initialization, fetching
and storing multiple times the memory for flags bitfield.
This is with gcc 10.3.1, but I observed the same with older compiler
versions.

We can help the compiler to do a nicer work clearing several
fields at once using an u32 alias. The generated code is quite
smaller, with the same number of conditional.

Before:
objdump -t net/core/gro.o | grep " F .text"
0000000000000bb0 l     F .text	0000000000000357 dev_gro_receive

After:
0000000000000bb0 l     F .text	000000000000033c dev_gro_receive

v1  -&gt; v2:
 - use struct_group (Alexander and Alex)

RFC -&gt; v1:
 - use __struct_group to delimit the zeroed area (Alexander)

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix recent csum changes</title>
<updated>2021-12-07T00:26:46+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-12-04T04:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=45cac6754529ae17345d8f5b632d9e602a091a20'/>
<id>urn:sha1:45cac6754529ae17345d8f5b632d9e602a091a20</id>
<content type='text'>
Vladimir reported csum issues after my recent change in skb_postpull_rcsum()

Issue here is the following:

initial skb-&gt;csum is the csum of

[part to be pulled][rest of packet]

Old code:
 skb-&gt;csum = csum_sub(skb-&gt;csum, csum_partial(pull, pull_length, 0));

New code:
 skb-&gt;csum = ~csum_partial(pull, pull_length, ~skb-&gt;csum);

This is broken if the csum of [pulled part]
happens to be equal to skb-&gt;csum, because end
result of skb-&gt;csum is 0 in new code, instead
of being 0xffffffff

David Laight suggested to use

skb-&gt;csum = -csum_partial(pull, pull_length, -skb-&gt;csum);

I based my patches on existing code present in include/net/seg6.h,
update_csum_diff4() and update_csum_diff16() which might need
a similar fix.

I guess that my tests, mostly pulling 40 bytes of IPv6 header
were not providing enough entropy to hit this bug.

v2: added wsum_negate() to make sparse happy.

Fixes: 29c3002644bd ("net: optimize skb_postpull_rcsum()")
Fixes: 0bd28476f636 ("gro: optimize skb_gro_postpull_rcsum()")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Suggested-by: David Laight &lt;David.Laight@ACULAB.COM&gt;
Cc: David Lebrun &lt;dlebrun@google.com&gt;
Tested-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20211204045356.3659278-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>gro: optimize skb_gro_postpull_rcsum()</title>
<updated>2021-11-26T05:03:31+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-24T20:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bd28476f6363c7ccc841fe6a0ab0dd1fdb822f6'/>
<id>urn:sha1:0bd28476f6363c7ccc841fe6a0ab0dd1fdb822f6</id>
<content type='text'>
We can leverage third argument to csum_partial():

  X = csum_sub(X, csum_partial(start, len, 0));

  --&gt;

  X = csum_add(X, ~csum_partial(start, len, 0));

  --&gt;

  X = ~csum_partial(start, len, ~X);

This removes one add/adc pair and its dependency against the carry flag.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: add missing include in include/net/gro.h</title>
<updated>2021-11-17T16:34:09+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-17T10:01:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75082e7f46809432131749f4ecea66864d0f7438'/>
<id>urn:sha1:75082e7f46809432131749f4ecea66864d0f7438</id>
<content type='text'>
This is needed for some arches, as reported by Geert Uytterhoeven,
Randy Dunlap and Stephen Rothwell

Fixes: 4721031c3559 ("net: move gro definitions to include/net/gro.h")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20211117100130.2368319-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: gro: populate net/core/gro.c</title>
<updated>2021-11-16T13:16:54+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-15T17:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=587652bbdd06ab38a4c1b85e40f933d2cf4a1147'/>
<id>urn:sha1:587652bbdd06ab38a4c1b85e40f933d2cf4a1147</id>
<content type='text'>
Move gro code and data from net/core/dev.c to net/core/gro.c
to ease maintenance.

gro_normal_list() and gro_normal_one() are inlined
because they are called from both files.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: gro: move skb_gro_receive into net/core/gro.c</title>
<updated>2021-11-16T13:16:54+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-15T17:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e456a18a390b96f22b0de2acd4d0f49c72ed2280'/>
<id>urn:sha1:e456a18a390b96f22b0de2acd4d0f49c72ed2280</id>
<content type='text'>
net/core/gro.c will contain all core gro functions,
to shrink net/core/skbuff.c and net/core/dev.c

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: move gro definitions to include/net/gro.h</title>
<updated>2021-11-16T13:16:54+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-15T17:05:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4721031c3559db8eae61df305f10c00099a7c1d0'/>
<id>urn:sha1:4721031c3559db8eae61df305f10c00099a7c1d0</id>
<content type='text'>
include/linux/netdevice.h became too big, move gro stuff
into include/net/gro.h

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gro: add combined call_gro_receive() + INDIRECT_CALL_INET() helper</title>
<updated>2021-03-19T02:51:12+00:00</updated>
<author>
<name>Alexander Lobakin</name>
<email>alobakin@pm.me</email>
</author>
<published>2021-03-18T18:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86af2c82c28499b4b509d6b15637a96bd829201b'/>
<id>urn:sha1:86af2c82c28499b4b509d6b15637a96bd829201b</id>
<content type='text'>
call_gro_receive() is used to limit GRO recursion, but it works only
with callback pointers.
There's a combined version of call_gro_receive() + INDIRECT_CALL_2()
in &lt;net/inet_common.h&gt;, but it doesn't check for IPv6 modularity.
Add a similar new helper to cover both of these. It can and will be
used to avoid retpoline overhead when IP header lies behind another
offloaded proto.

Signed-off-by: Alexander Lobakin &lt;alobakin@pm.me&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gro: make net/gro.h self-contained</title>
<updated>2021-03-19T02:51:12+00:00</updated>
<author>
<name>Alexander Lobakin</name>
<email>alobakin@pm.me</email>
</author>
<published>2021-03-18T18:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e75ec151c1088c1aa7a49ff16a2adcaddb24a861'/>
<id>urn:sha1:e75ec151c1088c1aa7a49ff16a2adcaddb24a861</id>
<content type='text'>
If some source file includes &lt;net/gro.h&gt;, but doesn't include
&lt;linux/indirect_call_wrapper.h&gt;:

In file included from net/8021q/vlan_core.c:7:
./include/net/gro.h:6:1: warning: data definition has no type or storage class
    6 | INDIRECT_CALLABLE_DECLARE(struct sk_buff *ipv6_gro_receive(struct list_head *,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
./include/net/gro.h:6:1: error: type defaults to ‘int’ in declaration of ‘INDIRECT_CALLABLE_DECLARE’ [-Werror=implicit-int]

[...]

Include &lt;linux/indirect_call_wrapper.h&gt; directly. It's small and
won't pull lots of dependencies.
Also add some incomplete struct declarations to be fully stacked.

Fixes: 04f00ab2275f ("net/core: move gro function declarations to separate header ")
Signed-off-by: Alexander Lobakin &lt;alobakin@pm.me&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
