From patchwork Fri Oct 19 04:56:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sommerseth X-Patchwork-Id: 559 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.27.255.57]) by backend30.mail.ord1d.rsapps.net with LMTP id mNteGfn+yVtlBgAAIUCqbw for ; Fri, 19 Oct 2018 11:57:45 -0400 Received: from proxy12.mail.iad3a.rsapps.net ([172.27.255.57]) by director7.mail.ord1d.rsapps.net with LMTP id EBBfF/n+yVt8VAAAovjBpQ ; Fri, 19 Oct 2018 11:57:45 -0400 Received: from smtp40.gate.iad3a ([172.27.255.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy12.mail.iad3a.rsapps.net with LMTP id 2OIPEvn+yVu8HwAAh9K5Vw ; Fri, 19 Oct 2018 11:57:45 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp40.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=openvpn.net X-Suspicious-Flag: YES X-Classification-ID: b71e08d4-d3b7-11e8-a4e8-5254003a14f9-1-1 Received: from [216.105.38.7] ([216.105.38.7:48959] helo=lists.sourceforge.net) by smtp40.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B9/9F-00681-8FEF9CB5; Fri, 19 Oct 2018 11:57:44 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1gDX93-00060s-Pb; Fri, 19 Oct 2018 15:57:01 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gDX93-00060f-CQ for openvpn-devel@lists.sourceforge.net; Fri, 19 Oct 2018 15:57:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rbyD0RSE3qaz2f1VDI0S//Jjn7293GH4xaN0pXyPCcQ=; b=Ln4D21eDo36bDvuv8FRdGHJb2V KDkMFzvBJaxIoWmarnQECZhhfyGnrjxq5HNiODAUvnZOt3vbLI4tg68Z/p0oHTisuQt/I+MENYLHB kqr/j3KJXyM2AxfolwppziUZJ9gXRnV9ykf5n2j/Ti6iQzSKyzY5MTl4H9tur9UZW3I0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rbyD0RSE3qaz2f1VDI0S//Jjn7293GH4xaN0pXyPCcQ=; b=BxSJw3v2L1LfnGxo8WEg4PT//X MgJsdIPAYalRp2fP6gyNPZv38H/iGwTsG7RU19y4z3hgTbERoU/rvrx3R3TsvV1i4Q+e2ar98KHev I6Wk6RiGqNjpQZmfGKGMICmjR8L63xtR254o5UVOhnc+ao1ypVuc3JWlHOtIAaL/TVvU=; Received: from mx0.basenordic.cloud ([185.212.44.139]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1gDX90-0082rE-Mx for openvpn-devel@lists.sourceforge.net; Fri, 19 Oct 2018 15:57:01 +0000 Received: from localhost (unknown [IPv6:::1]) by mx0.basenordic.cloud (Postfix) with ESMTP id DE2A480C81F for ; Fri, 19 Oct 2018 15:56:50 +0000 (UTC) Received: from mx0.basenordic.cloud ([127.0.0.1]) by localhost (winterfell.topphemmelig.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uhmFfHPHlqFA for ; Fri, 19 Oct 2018 17:56:49 +0200 (CEST) Received: from zimbra.sommerseth.email (zimbra.sommerseth.email [172.16.33.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx0.basenordic.cloud (Postfix) with ESMTPS id 8418E849D4C for ; Fri, 19 Oct 2018 17:56:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.sommerseth.email (Postfix) with ESMTP id EC88A51E21D9 for ; Fri, 19 Oct 2018 17:56:48 +0200 (CEST) Received: from zimbra.sommerseth.email ([127.0.0.1]) by localhost (zimbra.sommerseth.email [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id e3qG7XHP2NfF for ; Fri, 19 Oct 2018 17:56:48 +0200 (CEST) Received: from optimus.homebase.sommerseths.net (unknown [10.35.7.3]) by zimbra.sommerseth.email (Postfix) with ESMTPS id BBE0540B371E for ; Fri, 19 Oct 2018 17:56:48 +0200 (CEST) From: David Sommerseth To: openvpn-devel@lists.sourceforge.net Date: Fri, 19 Oct 2018 17:56:34 +0200 Message-Id: <20181019155638.9498-1-davids@openvpn.net> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1gDX90-0082rE-Mx Subject: [Openvpn-devel] [PATCH 0/4] struct argv overhaul - round 2+x X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Hi, Since the hackathon a couple of weeks ago, I've picked up the work from Heiko Hund which does a big overhaul on the struct argv patches [0]. This patchset is rebased on the latest master and with my review comments embedded into Heikos patch. This was only relevant for the big 're-implement argv_printf_*()' patch. In addition, I've added a separate documentation patch which adds doxygen comments to basically all functions in argv.c, trying to explain better what each of these functions does. To make the comment flow better, I renamed a few variables and did minor refactoring changes on the coding style. --- kind regards, David Sommerseth OpenVPN Inc David Sommerseth (1): Documented all the argv related code with minor refactoring Heiko Hund (3): re-implement argv_printf_*() argv: do fewer memory re-allocations Add gc_arena to struct argv to save allocations src/openvpn/argv.c | 525 +++++++++++++++++---------- src/openvpn/argv.h | 7 +- src/openvpn/console_systemd.c | 2 +- src/openvpn/init.c | 15 +- src/openvpn/lladdr.c | 2 +- src/openvpn/multi.c | 10 +- src/openvpn/options.c | 2 +- src/openvpn/plugin.c | 2 +- src/openvpn/route.c | 16 +- src/openvpn/socket.c | 4 +- src/openvpn/ssl_verify.c | 6 +- src/openvpn/tun.c | 62 ++-- tests/unit_tests/openvpn/test_argv.c | 118 +++++- 13 files changed, 496 insertions(+), 275 deletions(-)