From owner-svn-src-all@freebsd.org Fri Nov 27 09:21:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2645DA36EFA; Fri, 27 Nov 2015 09:21:04 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (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 D5F671A95; Fri, 27 Nov 2015 09:21:03 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by qkda6 with SMTP id a6so34383183qkd.3; Fri, 27 Nov 2015 01:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1LvRa+xzNxplrkbjnuPl4BLPCEnZ1WPMVbydZSNoD1U=; b=0npoGGVQI0mlZXv5VaOC2thtZSLRRal5hnBTpfSCitsOAKk6aseRpQz87ERqJPmxrz 9Dm8t38HBV93Lzv/HkP0skP/otZTBANmkNp2gji4nD9qP1WVfqDAI/HECqA2OU+5XbeC gkJPQ/dlWb7c/qyCy2Ckibs1tKknrMjquTx0Q4QfbFDgyRDgwpg/kSH64zU0/jVrK0UI nt7KPj03n94hcaFIOJ2ksg2ULzDvkjfmMBg344QVwethFI2IPH8h1Vu7dyLguffUdriC VRIIm2RpEBSaGZ+WWVgJRu4mvlqe9DVQ2aSI4K/Jb0sR7R6MIszEk/Bldux4JnWPx8/V rUAA== X-Received: by 10.55.71.199 with SMTP id u190mr48817760qka.3.1448616063049; Fri, 27 Nov 2015 01:21:03 -0800 (PST) Received: from mbp.home (179-125-135-253.desktop.com.br. [179.125.135.253]) by smtp.gmail.com with ESMTPSA id a15sm8967347qge.18.2015.11.27.01.21.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Nov 2015 01:21:02 -0800 (PST) Sender: Renato Botelho Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291355 - in stable/10/sys: netinet netipsec From: Renato Botelho In-Reply-To: <201511260224.tAQ2Ok8T023023@repo.freebsd.org> Date: Fri, 27 Nov 2015 07:20:59 -0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <37232D6B-AEC9-4271-8DB7-0606C298B25F@FreeBSD.org> References: <201511260224.tAQ2Ok8T023023@repo.freebsd.org> To: "George V. Neville-Neil" X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 09:21:04 -0000 > On Nov 26, 2015, at 00:24, George V. Neville-Neil = wrote: >=20 > Author: gnn > Date: Thu Nov 26 02:24:45 2015 > New Revision: 291355 > URL: https://svnweb.freebsd.org/changeset/base/291355 >=20 > Log: > MFC 290028: > Turning on IPSEC used to introduce a slight amount of performance > degradation (7%) for host host TCP connections over 10Gbps links, > even when there were no secuirty policies in place. There is no > change in performance on 1Gbps network links. Testing GENERIC vs. > GENERIC-NOIPSEC vs. GENERIC with this change shows that the new > code removes any overhead introduced by having IPSEC always in the > kernel. >=20 > Differential Revision: D3993 > Sponsored by: Rubicon Communications (Netgate) >=20 > Modified: > stable/10/sys/netinet/ip_ipsec.c > stable/10/sys/netinet/tcp_subr.c > stable/10/sys/netipsec/ipsec.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/netinet/ip_ipsec.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/netinet/ip_ipsec.c Thu Nov 26 02:16:25 2015 = (r291354) > +++ stable/10/sys/netinet/ip_ipsec.c Thu Nov 26 02:24:45 2015 = (r291355) > @@ -230,6 +230,10 @@ ip_ipsec_output(struct mbuf **m, struct=20 > struct secpolicy *sp =3D NULL; > struct tdb_ident *tdbi; > struct m_tag *mtag; > + > + if (!key_havesp(IPSEC_DIR_OUTBOUND)) > + return 0; > + > /* > * Check the security policy (SP) for the packet and, if > * required, do IPsec-related processing. There are two >=20 > Modified: stable/10/sys/netinet/tcp_subr.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/netinet/tcp_subr.c Thu Nov 26 02:16:25 2015 = (r291354) > +++ stable/10/sys/netinet/tcp_subr.c Thu Nov 26 02:24:45 2015 = (r291355) > @@ -1947,7 +1947,8 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp) > #endif > struct tcphdr *th; >=20 > - if ((tp =3D=3D NULL) || ((inp =3D tp->t_inpcb) =3D=3D NULL)) > + if ((tp =3D=3D NULL) || ((inp =3D tp->t_inpcb) =3D=3D NULL) || > + (!key_havesp(IPSEC_DIR_OUTBOUND))) Looks like style is broken here ^ -- Renato Botelho