svn commit: r242473 - user/andre/tcp_workqueue/sys/dev/ixgbe
Andre Oppermann
andre at freebsd.org
Fri Nov 2 14:43:25 UTC 2012
On 02.11.2012 14:43, Andre Oppermann wrote:
> Author: andre
> Date: Fri Nov 2 13:43:17 2012
> New Revision: 242473
> URL: http://svn.freebsd.org/changeset/base/242473
>
> Log:
> Merge ixgbe_tx_ctx_setup() and ixgbe_tso_setup() together into
> ixgbe_offload_setup() as they have a large overlap in packet
> inspection and variables.
>
> Add UDP fragmentation offload functionality as well.
>
> Also the driver can assume that the necessary headers for the
> activated offload functions are contiguously present in the
> first mbuf. This assumption is not formalized yet but significantly
> simplify the driver code. The upper layers of the stack adhere
> to this assumption as well. We leave enough leading space in the
> mbufs to prepend all registered (max_linkhdr) encapsulations.
> There may be misbehaving packet transformations that have to be
> fixed. Assertion functions have to be provided as well.
The new formal assumptions at the stack/driver boundary will be:
CSUM_IP:
lower and IP header including IP options contiguous in first mbuf
ip_sum is zero
CSUM_TCP:
lower and TCP header including TCP options contiguous in first mbuf
pseudo header checksum is valid and present in th_sum
CSUM_IP is implied, but should be flagged as well
CSUM_UDP:
lower and UDP header contiguous in first mbuf
pseudo header checksum is valid and present in uh_sum
CSUM_IP is implied, but should be flagged as well
CSUM_SCTP:
lower and SCTP header contiguous in first mbuf
CSUM_IP is implied, but should be flagged as well
CSUM_TSO:
lower and TCP header including TCP options contiguous in first mbuf
pseudo header checksum is valid and present in th_sum
CSUM_IP and CSUM_TCP is implied, but should be flagged as well
no TSO flag when no TCP segmentation is required (m_pkthdr.len <= mss + tcpiphdr)
no IP options present
As I said the standard upper layers already behave like this. The
step now is to formalize and assert/enforce this. Enforcement is
done by returning an error for a misbehaving packet w/o trying to
fix it up.
If you have any comments, please speak up.
--
Andre
More information about the freebsd-net
mailing list