summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/ndp_test.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-03-13 12:20:09 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-13 12:22:19 -0700
commit86409c91813256f45ebcb08efeac9d7f9e56a804 (patch)
tree7507be8b78b3bc47fc70846e61725b729dbbd73c /pkg/tcpip/stack/ndp_test.go
parentb78cee3bae142eb5c602d51874d0cbad274777e2 (diff)
Avoid unnecessary work in transportDemuxer.deliverPacket().
- Don't allocate []*endpointsByNic in transportDemuxer.deliverPacket() unless actually needed for UDP broadcast/multicast. - Don't allocate []*endpointsByNic via transportDemuxer.findEndpointLocked() => transportDemuxer.findAllEndpointsLocked(). - Skip unnecessary map lookups in transportDemuxer.findEndpointLocked() => transportDemuxer.findAllEndpointsLocked() (now iterEndpointsLocked). For most deliverable packets other than UDP broadcast/multicast packets, this saves two slice allocations and three map lookups per packet. PiperOrigin-RevId: 300804135
Diffstat (limited to 'pkg/tcpip/stack/ndp_test.go')
0 files changed, 0 insertions, 0 deletions