Page MenuHomeFreeBSD

Avoid calling CURVNET_[SET|RESTORE] up to twice per packet
ClosedPublic

Authored by shurd on Dec 4 2017, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 8:54 AM
Unknown Object (File)
Dec 31 2023, 11:46 AM
Unknown Object (File)
Dec 20 2023, 4:36 AM
Unknown Object (File)
Dec 17 2023, 4:38 AM
Unknown Object (File)
Oct 31 2023, 10:57 AM
Unknown Object (File)
Sep 26 2023, 4:25 AM
Unknown Object (File)
Aug 18 2023, 5:20 PM
Unknown Object (File)
Aug 6 2023, 4:17 AM
Subscribers

Details

Summary

The LRO possible test was calling CURVNET_SET once for IPv4
and once for IPv6 for each packet in a chain. Only call it once per
chain instead.

Test Plan

Check for improved performance

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 13357
Build 13589: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Dec 4 2017, 11:04 PM
sys/net/iflib.c
2471

I would call this kind of operation "get" rather than "set"

2475

Also spelled *v6 = (VNET(ip6_forwarding) == 0);

sys/net/iflib.c
2474

Both conditions should be guarded with #ifdef INET and #ifdef INET6.

Integrate feedback from ae and cem

Rename functions and variables to better indicate what the represent
rather than what they're used for. Simplify logic, check INET and INET6
definitions.

This revision now requires review to proceed.Dec 5 2017, 6:48 PM
shurd marked 3 inline comments as done.Dec 5 2017, 6:48 PM

Updated, thanks.

A static analyzer may reject passing uninitialized values to iflib_check_lro_possible in the case that one of INET or INET6 is disabled. But I don't think there is any real problem as the uninitialized value is unused.

This revision is now accepted and ready to land.Dec 5 2017, 7:01 PM
This revision was automatically updated to reflect the committed changes.