From owner-freebsd-net@FreeBSD.ORG Fri Apr 24 00:55:32 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 265483CD for ; Fri, 24 Apr 2015 00:55:32 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFDEB1AC4 for ; Fri, 24 Apr 2015 00:55:31 +0000 (UTC) Received: by wgyo15 with SMTP id o15so35073382wgy.2 for ; Thu, 23 Apr 2015 17:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:content-type:mime-version:subject:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=T+O2pt+aHY3JbugIi81c3+1ILDy/6ulvCPZ2Ka6ik/Q=; b=u2bP+c2TbtJs3fe0u5kUR2qx1NLkV6V7bn5TYJKrvWQnf4v79Vw6CYBJHvul/mJVkH W6Ks5hK907MKO6jpiuLkzf+nR780cegyUZkmSu1kELoHO9hcHXDhDTkuQ697Q1L/Mkqd LtsG0dKYQ2+mQGVegvQ+h8MuS3tK1u+AJzBRqp80v83MondCZztQdEU40x6dd4PT8wqe o5MGoy3IzpPRxwv7xlw3jjlI7VUtGzeZFbdyhSnj5RIDpQTDYPa5BTShbMzFi2loEbTl hAqLDTDvzUnIXZWYQXKOgAHEQnlC0ZzgUqE5Uq5XEdNHgYWK9Dds9hpFTlQfz0JxkOkM 7FoA== X-Received: by 10.180.223.7 with SMTP id qq7mr1594783wic.21.1429836930174; Thu, 23 Apr 2015 17:55:30 -0700 (PDT) Received: from ?IPv6:2a02:a03f:a39:de00:9b8:308d:8797:6d7c? ([2a02:a03f:a39:de00:9b8:308d:8797:6d7c]) by mx.google.com with ESMTPSA id u9sm8152369wjx.15.2015.04.23.17.55.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Apr 2015 17:55:29 -0700 (PDT) From: Sydney Meyer X-Google-Original-From: Sydney Meyer Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: IPSec Performance under Xen In-Reply-To: <55397FB3.6080702@yandex.ru> Date: Fri, 24 Apr 2015 02:55:26 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <079851FA-50AC-47E8-B4BE-D97DE4C185B5@gmail.com> References: <55397FB3.6080702@yandex.ru> To: freebsd-net@freebsd.org X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 00:55:32 -0000 Andrey, with your patch applied the performance drop while using the = IPSEC-enabled kernel without doing actual IPSec traffic seems to be = gone. I haven't tested IPSec itself yet, as i had to start from scratch with = new VM's but i will set up a IPSec connection and report back. S. > On Apr 24, 2015, at 01:26, Andrey V. Elsukov = wrote: >=20 > On 24.04.2015 01:00, Sydney Meyer wrote: >> Hello, >>=20 >> I have set up 2 VM's under Xen running each one IPSec-Endpoint. >> Everything seems to work fine, but (measured with benchmarks/iperf) >> the performance drops from ~10 Gb/s on a non-IPSec-Kernel to ~200 >> Mb/s with IPSec compiled in, regardless of whether actually using >> IPSec or not. >=20 > Can you test this patch to see the difference? It isn't a fix. It is > just to see how will help avoiding of PCB check. >=20 > --- ip_output.c (revision 281867) > +++ ip_output.c (working copy) > @@ -482,7 +482,7 @@ again: >=20 > sendit: > #ifdef IPSEC > - switch(ip_ipsec_output(&m, inp, &flags, &error)) { > + switch(ip_ipsec_output(&m, NULL, &flags, &error)) { > case 1: > goto bad; > case -1: >=20 >=20 > --=20 > WBR, Andrey V. Elsukov