<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/gro.h, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-08-25T23:07:42+00:00</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2022-08-25T23:07:42+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-08-25T23:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=880b0dd94f0399cf772a8582e7b5a47f180c8618'/>
<id>urn:sha1:880b0dd94f0399cf772a8582e7b5a47f180c8618</id>
<content type='text'>
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
  21234e3a84c7 ("net/mlx5e: Fix use after free in mlx5e_fs_init()")
  c7eafc5ed068 ("net/mlx5e: Convert ethtool_steering member of flow_steering struct to pointer")
https://lore.kernel.org/all/20220825104410.67d4709c@canb.auug.org.au/
https://lore.kernel.org/all/20220823055533.334471-1-saeed@kernel.org/

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: gro: skb_gro_header helper function</title>
<updated>2022-08-25T08:33:21+00:00</updated>
<author>
<name>Richard Gobert</name>
<email>richardbgobert@gmail.com</email>
</author>
<published>2022-08-23T07:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35ffb66547295c72650978f9c28e670e014d0957'/>
<id>urn:sha1:35ffb66547295c72650978f9c28e670e014d0957</id>
<content type='text'>
Introduce a simple helper function to replace a common pattern.
When accessing the GRO header, we fetch the pointer from frag0,
then test its validity and fetch it from the skb when necessary.

This leads to the pattern
skb_gro_header_fast -&gt; skb_gro_header_hard -&gt; skb_gro_header_slow
recurring many times throughout GRO code.

This patch replaces these patterns with a single inlined function
call, improving code readability.

Signed-off-by: Richard Gobert &lt;richardbgobert@gmail.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://lore.kernel.org/r/20220823071034.GA56142@debian
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: Fix a data-race around gro_normal_batch.</title>
<updated>2022-08-24T12:46:58+00:00</updated>
<author>
<name>Kuniyuki Iwashima</name>
<email>kuniyu@amazon.com</email>
</author>
<published>2022-08-23T17:46:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8db24af3f02ebdbf302196006ebb270c4c3a2706'/>
<id>urn:sha1:8db24af3f02ebdbf302196006ebb270c4c3a2706</id>
<content type='text'>
While reading gro_normal_batch, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its reader.

Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
Signed-off-by: Kuniyuki Iwashima &lt;kuniyu@amazon.com&gt;
Acked-by: Edward Cree &lt;ecree.xilinx@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<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>
</feed>
