Page MenuHomeFreeBSD

net: allow fast-forwarding TSO packets
AcceptedPublic

Authored by royger on May 27 2016, 4:15 PM.

Details

Reviewers
gnn
Group Reviewers
network
transport
Summary

This is important when running on a virtualized environment, where packets
might come from another VM on the same host and the segmentation might not
have happened yet because the packet has not reached a physical network
interface.

Try to handle those packets by directly forwarding them to the outbound
network interface if it also supports TSO and the input and output options
match.

Sponsored by: Citrix Systems R&D

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 4067
Build 4110: arc lint + arc unit

Event Timeline

royger retitled this revision from to net: allow fast-forwarding TSO packets.May 27 2016, 4:15 PM
royger updated this object.
royger edited the test plan for this revision. (Show Details)
royger updated this revision to Diff 17001.
royger updated this revision to Diff 17140.May 31 2016, 7:37 AM

Add more checks to make sure the output interface supports the TSO chain.

ae added a subscriber: ae.May 31 2016, 8:57 AM
ae added inline comments.
sys/netinet/ip_fastfwd.c
451

It isn't safe. There is no guarantee that mbuf's data will be contiguous more than sizeof(struct ip).

royger added inline comments.May 31 2016, 9:06 AM
sys/netinet/ip_fastfwd.c
451

What's the proper way to get the TCP payload length then?

ae added inline comments.May 31 2016, 9:21 AM
sys/netinet/ip_fastfwd.c
451

The easiest way is m_copydata() with proper offset.

royger added inline comments.May 31 2016, 9:30 AM
sys/netinet/ip_fastfwd.c
451

Thanks! Will update the patch shortly unless there are other comments.

royger updated this revision to Diff 17178.Jun 1 2016, 7:15 AM

Use m_copydata instead of mtodo in order to get the TCP header. Using mtodo
is not correct because it's possible that the TCP header is not in the first
mbuf.

royger marked an inline comment as done.Jun 1 2016, 8:08 AM
royger added a comment.Jun 6 2016, 2:53 PM

Ping? I have this and a couple more revisions (D6656 and D6611) that I would like to get committed before the code freeze (although I consider them bug-fixes, so they could also go in during the freeze).

Thanks, Roger.

gnn added a reviewer: gnn.Jun 13 2016, 11:40 PM
gnn accepted this revision.
gnn added a subscriber: gnn.
gnn added inline comments.
sys/netinet/ip_fastfwd.c
449

Minor nit but I'd prefer an extra set of braces around the first clause, before the &&

This revision is now accepted and ready to land.Jun 13 2016, 11:40 PM