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
F106176528: D13368.id36204.diff
Thu, Dec 26, 3:58 PM
F106145887: D13368.diff
Thu, Dec 26, 3:54 AM
Unknown Object (File)
Fri, Dec 6, 5:45 PM
Unknown Object (File)
Oct 29 2024, 8:26 AM
Unknown Object (File)
Oct 29 2024, 8:26 AM
Unknown Object (File)
Oct 29 2024, 8:26 AM
Unknown Object (File)
Oct 29 2024, 8:26 AM
Unknown Object (File)
Oct 29 2024, 8:09 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 13333
Build 13566: 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.