[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-arch
Subject:    Re: svn commit: r242473 - user/andre/tcp_workqueue/sys/dev/ixgbe
From:       Andre Oppermann <andre () freebsd ! org>
Date:       2012-11-02 14:43:16
Message-ID: 5093DC04.2010902 () freebsd ! org
[Download RAW message or body]

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

_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic