Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp896905imm; Wed, 26 Sep 2018 08:26:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV61GrpXjIsK+DKR8W5A+kxQ4iWcjvz/Ul/SKOdaUXbkQdWS5UDGj2o5tGvsUmyxRkLKv0aa9 X-Received: by 2002:a17:902:585:: with SMTP id f5-v6mr6697295plf.7.1537975606848; Wed, 26 Sep 2018 08:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537975606; cv=none; d=google.com; s=arc-20160816; b=dmamDJyFkq4FL6oNHLWubAT/3ck5plUKdkCODHOSh+meA5TPVJj9uDaDZQlRTBYb2Y sAu1SG3fn/q0IkIJaBVoWjHQgL6xRjfwPaXdZhasTcQ2Ke5oOBvuAYlubpYqAEQ+qiRp JdSohJTeq3sWaGzJiv5ERuKdDN+qRDFMlyE8TQ3Q6KTJb+AmW6i6EMoDfZvGy8sBqrdR HtmJiaFzZ/Byxp3q+RtniTjEEmUY9tD/6fM8ZGnaQ+C+O9+id7HBWID/8sX2ge9f37yu wcsLtXaxHGpTJv23oiSMySzKabyUviON8eU0s7lTgdEZubGbpIqB7Fz99HpgB2u3jXTo NqzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=p/8MY2KJRvFtMdrgfIegu2Fs9hyCoL/PDLnVL24L+Wg=; b=R+ACXmulzreiqwkSYkS8O5kQ3CSI6r5eqlvReiXuRIWECR/YLmjIDZg3G9gWdyy4Jn INouoUQGTE97x7x+w7/IlWSvWdijSmLFeOlzWwYD4/AJJc2za0/y3vnBXjkTCY2Rgr6R +arZF1r/rQ1xgtJIDHIG4IJkgj+Sy9V62KSAeipyuGl24FRUYpDQcGJ3Sz80q9V2BWl7 x+scxU5GSQBkU4SpoC69gvDLqzq+3hbjoDTx1ktGyUt/v4Zl0EDBLCwoEjIB9KpuxbaU QtAiZXEFdGGXSQB3WpefnqfWNin7S6JWBhFONYiaFbm96Je8kfoJMfeFo/9hBTc88lh9 GPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b="uu6x/2XD"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si5439915plr.455.2018.09.26.08.26.30; Wed, 26 Sep 2018 08:26:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b="uu6x/2XD"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728322AbeIZVjc (ORCPT + 99 others); Wed, 26 Sep 2018 17:39:32 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:56935 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726937AbeIZVjc (ORCPT ); Wed, 26 Sep 2018 17:39:32 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 4c7fbd06; Wed, 26 Sep 2018 15:07:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=YiCKe8pcP2DO+YtdsZI1AzccR5M=; b=uu6x/2 XDtgw3KonPMnNMiljE2IqpdI1blFRNvlgJSr7xOAPVOpI8ZcPxaA1GBJOssaZYtt MMUv1cqcA63BpNwlKrudbQlMWKm7SZ+6SkdKeHktbFDPfZbkd+qjp9BCGsIEiQHe Ngh4yV0Ud1C7922epM5jCqjhMMi4QctkUhLyJ8JuKSQCXTyH4ajlfScmfPB27r6D zeVarqBQXVNUXvhqI+F7LLbWBncdBlux4hKiSh7MsHUhxSmvXL+7OXQVG2kkTxCx Ka4pPMPETO6nDRgEO7nb0/7Y8CMlM+VWpF2D1bRr5rfAKPkiW4HwHtjxTXzefE7I tbudEywdWe4Dzgsw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f4a1176d (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Wed, 26 Sep 2018 15:07:27 +0000 (UTC) Received: by mail-ot1-f47.google.com with SMTP id e18-v6so28577677oti.8; Wed, 26 Sep 2018 08:26:00 -0700 (PDT) X-Gm-Message-State: ABuFfojXtd4ValtswosaANp+bPaJgGFLrv2l4JPUgoyDmL673FOXkKy8 hZ6f834IYw+xWBr0Uj9QuJhLi4tE2d4IKNsGjyk= X-Received: by 2002:a9d:3c47:: with SMTP id j7-v6mr3053925ote.317.1537975559666; Wed, 26 Sep 2018 08:25:59 -0700 (PDT) MIME-Version: 1.0 References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-8-Jason@zx2c4.com> <20180926143614.GL1676@lunn.ch> In-Reply-To: <20180926143614.GL1676@lunn.ch> From: "Jason A. Donenfeld" Date: Wed, 26 Sep 2018 17:25:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v6 07/23] zinc: ChaCha20 ARM and ARM64 implementations To: Andrew Lunn Cc: Ard Biesheuvel , Jean-Philippe Aumasson , Netdev , LKML , Russell King - ARM Linux , Samuel Neves , Linux Crypto Mailing List , Andrew Lutomirski , Greg Kroah-Hartman , David Miller , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 26, 2018 at 4:36 PM Andrew Lunn wrote: > The wireguard interface claims it is GSO capable. This means the > network stack will pass it big chunks of data and leave it to the > network interface to perform the segmentation into 1500 byte MTU > frames on the wire. I've not looked at how wireguard actually handles > these big chunks. But to get maximum performance, it should try to > keep them whole, just add a header and/or trailer. Will wireguard pass > these big chunks of data to the crypto code? Do we now have 64K blocks > being worked on? Does the latency jump from 4K to 64K? That might be > new, so the existing state of the tree does not help you here. No, it only requests GSO superpackets so that it can group the pieces and encrypt them on the same core. But they're each encrypted separately (broken up immediately after ndo_start_xmit), and so they wind up being ~1420 bytes each to encrypt. I spoke about this at netdev2.2 if you're interested in the architecture; there's a paper: https://www.wireguard.com/papers/wireguard-netdev22.pdf https://www.youtube.com/watch?v=54orFwtQ1XY https://www.wireguard.com/talks/netdev2017-slides.pdf