lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 17 Nov 2019 12:52:24 +0300 From: Alexander Lobakin <alobakin@...nk.ru> To: David Miller <davem@...emloft.net> Cc: ecree@...arflare.com, jiri@...lanox.com, edumazet@...gle.com, idosch@...lanox.com, pabeni@...hat.com, petrm@...lanox.com, sd@...asysnail.net, f.fainelli@...il.com, jaswinder.singh@...aro.org, manishc@...vell.com, GR-Linux-NIC-Dev@...vell.com, johannes.berg@...el.com, emmanuel.grumbach@...el.com, luciano.coelho@...el.com, linuxwifi@...el.com, kvalo@...eaurora.org, netdev@...r.kernel.org, linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v2 net-next] net: core: allow fast GRO for skbs with Ethernet header in head David Miller wrote 17.11.2019 00:01: > From: Alexander Lobakin <alobakin@...nk.ru> > Date: Fri, 15 Nov 2019 12:11:35 +0300 > >> Commit 78d3fd0b7de8 ("gro: Only use skb_gro_header for completely >> non-linear packets") back in May'09 (v2.6.31-rc1) has changed the >> original condition '!skb_headlen(skb)' to >> 'skb->mac_header == skb->tail' in gro_reset_offset() saying: "Since >> the drivers that need this optimisation all provide completely >> non-linear packets" (note that this condition has become the current >> 'skb_mac_header(skb) == skb_tail_pointer(skb)' later with commmit >> ced14f6804a9 ("net: Correct comparisons and calculations using >> skb->tail and skb-transport_header") without any functional changes). >> >> For now, we have the following rough statistics for v5.4-rc7: >> 1) napi_gro_frags: 14 >> 2) napi_gro_receive with skb->head containing (most of) payload: 83 >> 3) napi_gro_receive with skb->head containing all the headers: 20 >> 4) napi_gro_receive with skb->head containing only Ethernet header: 2 >> >> With the current condition, fast GRO with the usage of >> NAPI_GRO_CB(skb)->frag0 is available only in the [1] case. >> Packets pushed by [2] and [3] go through the 'slow' path, but >> it's not a problem for them as they already contain all the needed >> headers in skb->head, so pskb_may_pull() only moves skb->data. >> >> The layout of skbs in the fourth [4] case at the moment of >> dev_gro_receive() is identical to skbs that have come through [1], >> as napi_frags_skb() pulls Ethernet header to skb->head. The only >> difference is that the mentioned condition is always false for them, >> because skb_put() and friends irreversibly alter the tail pointer. >> They also go through the 'slow' path, but now every single >> pskb_may_pull() in every single .gro_receive() will call the *really* >> slow __pskb_pull_tail() to pull headers to head. This significantly >> decreases the overall performance for no visible reasons. > ... >> Signed-off-by: Alexander Lobakin <alobakin@...nk.ru> > > Applied to net-next, thanks. Thank you! Regards, ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ
Powered by blists - more mailing lists