Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2020 10:45:49 +0200
From:      "Kristof Provost" <kp@FreeBSD.org>
To:        d@delphij.net
Cc:        freebsd-current@freebsd.org, freebsd-stable@freebsd.org
Subject:   Re: CFT: if_bridge performance improvements
Message-ID:  <BF81FE6C-D4F4-43BA-9DE1-2C6A28A65AF3@FreeBSD.org>
In-Reply-To: <8e0e2bf1-27cd-1a99-b266-c7223255942f@delphij.net>
References:  <5377E42E-4C01-4BCC-B934-011AC3448B54@FreeBSD.org> <8e0e2bf1-27cd-1a99-b266-c7223255942f@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 Apr 2020, at 10:20, Xin Li wrote:
> Hi,
>
> On 4/14/20 02:51, Kristof Provost wrote:
>> Hi,
>>
>> Thanks to support from The FreeBSD Foundation I’ve been able to 
>> work on
>> improving the throughput of if_bridge.
>> It changes the (data path) locking to use the NET_EPOCH 
>> infrastructure.
>> Benchmarking shows substantial improvements (x5 in test setups).
>>
>> This work is ready for wider testing now.
>>
>> It’s under review here: https://reviews.freebsd.org/D24250
>>
>> Patch for CURRENT: https://reviews.freebsd.org/D24250?download=true
>> Patches for stable/12: 
>> https://people.freebsd.org/~kp/if_bridge/stable_12/
>>
>> I’m not currently aware of any panics or issues resulting from 
>> these
>> patches.
>
> I have observed the following panic with latest stable/12 after 
> applying
> the stable_12 patchset, it appears like a race condition related NULL
> pointer deference, but I haven't took a deeper look yet.
>
> The box have 7 igb(4) NICs, with several bridge and VLAN configured
> acting as a router.  Please let me know if you need additional
> information; I can try -CURRENT as well, but it would take some time 
> as
> the box is relatively slow (it's a ZFS based system so I can create a
> separate boot environment for -CURRENT if needed, but that would take
> some time as I might have to upgrade the packages, should there be any
> ABI breakages).
>
Thanks for the report. I don’t immediately see how this could happen.

Are you running an L2 firewall on that bridge by any chance? An earlier 
version of the patch had issues with a stray unlock in that code path.

Best regards,
Kristof



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF81FE6C-D4F4-43BA-9DE1-2C6A28A65AF3>