Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3047067ybc; Thu, 21 Nov 2019 02:29:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwUV7J51PSYg4m0YifMHrWA9gYJQAEalKgtozHCJbT7JRd1trLjHw4FM5c05peZsqGBiiQn X-Received: by 2002:a17:906:3602:: with SMTP id q2mr12990486ejb.167.1574332192928; Thu, 21 Nov 2019 02:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574332192; cv=none; d=google.com; s=arc-20160816; b=Qxteti29KSJEfRawaf9xfwWP2jlyqqJpNnDjDng/Xmserl2C1nRm98xvtuZV2gg31b Ov0BBn8gTaPkhQhiBnPbgtm/xu00xgq8BavRLmv9h1TsUxF6YjG5ClmAavEHiD3EAvpg 1vzIR8m7Trtc1DICiL1oOmaxZLymHh0Uy5JXBj+wjhRG2BU6uuJARHvhvRqspzm1EgBC GadOYco6QvQiff5rS0XBd1JA0WjuZaekcsOluYpIBGPimPyeUPILTA6mJkwfb3+Qrl+B Qr4nbA8CJ1utXYaGMtYAoiTauC+NmuOzS54FefZTEGsrhmnEKRMAag8y3/SGe8Djlq+a k0oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=t9X1E0mPwcgFWQfrAV192xVl6AHfJK9mk2N8XSWyhdc=; b=kE5pBm9y7BvRwJJg9ulK4W1ummokIYJHtslslza3Ku4k95HCAMipj5KVeLfMF9aEwJ QL+kulRNpO2Z8RgzUpil3wxNpIgG7xqd2vVQh/PGFnCO79Cw4Ni89BUs9pYkmI1kyDfq 9mKBM3+V16ewlZVkHfq/9M0esIIMxSDQt68PlG/kVgv5kAeTLesL/BFUH3pPLcwU+P3M J6qk3ojXiDmpbn6IrCVMz7jOPvAdoJZZxx8wJ8fGOM6JtVXDPBBzo2nAYaNGTgVu+z44 Jh/ex0pNNaWns+edmyC3/rPaFDfA/5USvKcDpH+Hx221Ws6aflLhf9aUowA3+Aeqbfww yviA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G0lDyO0P; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si1432066ejr.129.2019.11.21.02.29.24; Thu, 21 Nov 2019 02:29:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@redhat.com header.s=mimecast20190719 header.b=G0lDyO0P; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726230AbfKUK3W (ORCPT + 99 others); Thu, 21 Nov 2019 05:29:22 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:41332 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726197AbfKUK3W (ORCPT ); Thu, 21 Nov 2019 05:29:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574332162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t9X1E0mPwcgFWQfrAV192xVl6AHfJK9mk2N8XSWyhdc=; b=G0lDyO0PmhCDN8jRJJyn911GzV0W9GZvwWoShmF7/ZpzLzLucvQVSIgGNFeO3ftF9rNacU uSigUA0hEZcA5QP+LRNF1QUCdDpJ19JG9QctDsFZHgPPNZQUqt6GavChaBZUMKTBw03Gk5 /qTwV0Jyn+Psk6gzxij4qltYAFIyJcM= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-d2UgjTnFN9-xBOesawV21A-1; Thu, 21 Nov 2019 05:29:20 -0500 Received: by mail-lj1-f198.google.com with SMTP id y17so464549ljm.16 for ; Thu, 21 Nov 2019 02:29:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ucqBuN/GyC2pdnb4QcrvifWl2PtH/4rDjAh47h8mEbo=; b=Zet7jHH9qvM59VB+BmoCBtlbyURn95L3HxDfWdj5dhzwKgTLPDW3Fko38rQwiOP6ur L4e7mV8+D3kPT8poHFJERaGOUsvljmDRzTqw+JZ6A1AKG5/EA2ks0sGRue7ivEorDl3v 50KOQAcMhff9Jdie/Lq+9MvekO4W0pgZWdx+iyEZe8GKuU8b4CfbcdWaG9G6ITJHXmrh FOz5G3dv0qYL6MoJds2ZxdQNzSCaM1aeZQOanieImKEo09E9iaXSfRyagxCz9T9SMDTQ sn/BjyE7B8W47OEk5fS6IGQ5azosoUNS1SmdaF9eWYzoRnHt0Rheb81+Ddot8Day59hH owkQ== X-Gm-Message-State: APjAAAXgRny56LFBu+Y2neUwk0f7J5Gezxx4+WxrgdwcOEyuEfTC6vPY WGQKjw2Vt0ojjnefGs4WPmxqDrvYOKPfi9NjPBAWsDswwVV6ZgztQe+MRZHmSjxrSmgBb2nqlQf ijLSRvlJ1tbZsKqEGZTSX/dwY X-Received: by 2002:a05:651c:390:: with SMTP id e16mr6751318ljp.196.1574332158700; Thu, 21 Nov 2019 02:29:18 -0800 (PST) X-Received: by 2002:a05:651c:390:: with SMTP id e16mr6751297ljp.196.1574332158521; Thu, 21 Nov 2019 02:29:18 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a00:7660:6da:443::2]) by smtp.gmail.com with ESMTPSA id 141sm1013079ljj.37.2019.11.21.02.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 02:29:17 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id CE1A11818B9; Thu, 21 Nov 2019 11:29:16 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: "Jason A. Donenfeld" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" , David Miller , Greg KH , Linus Torvalds , Herbert Xu , linux-crypto@vger.kernel.org Subject: Re: [PATCH RFC net-next] net: WireGuard secure network tunnel In-Reply-To: <20191120203538.199367-1-Jason@zx2c4.com> References: <20191120203538.199367-1-Jason@zx2c4.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 21 Nov 2019 11:29:16 +0100 Message-ID: <877e3t8qv7.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: d2UgjTnFN9-xBOesawV21A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org "Jason A. Donenfeld" writes: > RFC Note: > This is a RFC for folks who want to play with this early, because > Herbert's cryptodev-2.6 tree hasn't yet made it into net-next. I'll > repost this as a v1 (possibly with feedback incorporated) once the > various trees are in the right place. This compiles on top of the > Frankenzinc patchset from Ard, though it hasn't yet received suitable > testing there for me to call it v1 just yet. Preliminary testing with > the usual netns.sh test suite on x86 indicates it's at least mostly > functional, but I'll be giving things further scrutiny in the days to > come. Hi Jason Great to see this! Just a few small comments for now: > +/* > + * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rig= hts Reserved. > + */ Could you please get rid of the "All Rights Reserved" (here, and everywhere else)? All rights are *not* reserved: this is licensed under the GPL. Besides, that phrase is in general dubious at best: https://en.wikipedia.org/wiki/All_rights_reserved > +=09MAX_QUEUED_INCOMING_HANDSHAKES =3D 4096, /* TODO: replace this with D= QL */ > +=09MAX_STAGED_PACKETS =3D 128, > +=09MAX_QUEUED_PACKETS =3D 1024 /* TODO: replace this with DQL */ Yes, please (on the TODO) :) FWIW, since you're using pointer rings I think the way to do this is probably to just keep the limits in place as a maximum size, and then use DQL (or CoDel) to throttle enqueue to those pointer rings instead of just letting them fill. Happy to work with you on this (as I believe I've already promised), but we might as well do that after the initial version is merged... -Toke