]> git.baikalelectronics.ru Git - kernel.git/commit
gro: simplify gro_list_prepare()
authorAlexander Lobakin <alobakin@pm.me>
Sat, 13 Mar 2021 20:30:05 +0000 (20:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Mar 2021 21:41:08 +0000 (14:41 -0700)
commit8af214b04383cacf223cef2e86b08ac1a1d895fb
tree817fd9202857df9590a1fb7da4e66e47c80a99f5
parentfb309806fea08e3321333885c3c0c7bfd431f51f
gro: simplify gro_list_prepare()

gro_list_prepare() always returns &napi->gro_hash[bucket].list,
without any variations. Moreover, it uses 'napi' argument only to
have access to this list, and calculates the bucket index for the
second time (firstly it happens at the beginning of
dev_gro_receive()) to do that.
Given that dev_gro_receive() already has an index to the needed
list, just pass it as the first argument to eliminate redundant
calculations, and make gro_list_prepare() return void.
Also, both arguments of gro_list_prepare() can be constified since
this function can only modify the skbs from the bucket list.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c