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, 5 Jan 2020 17:59:18 -0500 From: "Jason A. Donenfeld" <Jason@...c4.com> To: David Miller <davem@...emloft.net> Cc: Netdev <netdev@...r.kernel.org> Subject: Re: [PATCH net-next 0/3] WireGuard bug fixes and cleanups On Sun, Jan 5, 2020 at 5:13 PM David Miller <davem@...emloft.net> wrote: > Series applied. Thanks! > > I wonder if, for patch #3, we should have a gro cells helper which just > does that list thing and thus makes the situation self documenting. I was thinking about something along those lines... If you recall from the netdev presentation, wireguard encrypts/decrypts packets on multiple cores and spreads packets out to whatever core is available. In order to improve cache locality and fallout from scheduler latency, the driver opts in to receive gso super packets, splits them up using the function for that, and then encrypts that list as a unit, on a single core. The result achieved is that alike packets are encrypted together and not spread out. For the receive path, however, this is not the case, since encap_recv gives us just one packet at a time. I was thinking of reworking this to add an encap_recv_gro function, or similar, which is passed entire lists. Right now the implementation of udp_queue_rcv_skb is something along the lines of: if (!udp_unexpected_gso(skb)) return encap_recv(skb); else for_each_gso_seg(skb, seg) encap_recv(seg); That bottom part could be split up into: if (encap_recv_gro) encap_recv_gro(skb); else for_each_gso_seg(skb, seg) encap_recv(seg); I still need to look further into this (e.g. why it's "unexpected" as in the "udp_unexpected_gso" function), and I vaguely recall Steffen Klassart working on some similar ideas. But I may post an RFC something to this effect in the coming weeks. Jason
Powered by blists - more mailing lists