From owner-freebsd-bugs@FreeBSD.ORG Thu May 28 12:27:50 2015 Return-Path: Delivered-To: freebsd-bugs@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 8C1BBE25 for ; Thu, 28 May 2015 12:27:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CFD2FA0 for ; Thu, 28 May 2015 12:27:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t4SCRoeD087506 for ; Thu, 28 May 2015 12:27:50 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 200472] aesni module corrupt IP packets during encryption with IPSec Date: Thu, 28 May 2015 12:27:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: olivier@cochard.me X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2015 12:27:50 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200472 --- Comment #5 from olivier@cochard.me --- If I unload aesni module on "encrypter" side, the problem disappear: Then how can the packet being corrupted after decryption ? New test without aesni module loaded on the "encrypter side" (srv1), but still loaded on "decrypter side" (srv2): Encrypter: [root@srv1]~# kldstat Id Refs Address Size Name 1 8 0xffffffff80200000 17dc0f0 kernel 2 1 0xffffffff81c11000 2dd6 ichsmb.ko 3 1 0xffffffff81c14000 e7e smbus.ko 4 1 0xffffffff81c15000 2a16 coretemp.ko Decrypter: [root@srv2]~# kldstat Id Refs Address Size Name 1 11 0xffffffff80200000 17dc0f0 kernel 2 1 0xffffffff81c11000 7fe8 aesni.ko 3 1 0xffffffff81c19000 2dd6 ichsmb.ko 4 1 0xffffffff81c1c000 e7e smbus.ko 5 1 0xffffffff81c1d000 2a16 coretemp.ko Then, again, generating exactly 100 000 packets in a low-rate of 1000 paquet-per-second using netmap's pktgen crossing these 2 FreeBSD IPSec gateway. Stat on "decrypter side" (srv2): [root@srv2]~# sysctl dev.igb.2.mac_stats.rx_frames_512_1023 dev.igb.2.mac_stats.rx_frames_512_1023: 100000 [root@srv2]~# sysctl dev.igb.3.mac_stats.tx_frames_512_1023 dev.igb.3.mac_stats.tx_frames_512_1023: 100000 => All packets are correctly decrypted AND forwarded No more "bad ip packet" errors on decrypter side: [root@srv2]~# netstat -ssp ip ip: 200064 total packets received 100064 packets for this host 100000 packets forwarded 69 packets sent from this host Then, should I still do a new test in Transport mode ? -- You are receiving this mail because: You are the assignee for the bug.