• Willem de Bruijn's avatar
    gve: Add optional metadata descriptor type GVE_TXD_MTD · 497dbb2b
    Willem de Bruijn authored
    Allow drivers to pass metadata along with packet data to the device.
    Introduce a new metadata descriptor type
    
    * GVE_TXD_MTD
    
    This descriptor is optional. If present it immediate follows the
    packet descriptor and precedes the segment descriptor.
    
    This descriptor may be repeated. Multiple metadata descriptors may
    follow. There are no immediate uses for this, this is for future
    proofing. At present devices allow only 1 MTD descriptor.
    
    The lower four bits of the type_flags field encode GVE_TXD_MTD.
    The upper four bits of the type_flags field encodes a *sub*type.
    
    Introduce one such metadata descriptor subtype
    
    * GVE_MTD_SUBTYPE_PATH
    
    This shares path information with the device for network failure
    discovery and robust response:
    
    Linux derives ipv6 flowlabel and ECMP multipath from sk->sk_txhash,
    and updates this field on error with sk_rethink_txhash. Allow the host
    stack to do the same. Pass the tx_hash value if set. Also communicate
    whether the path hash is set, or more exactly, what its type is. Define
    two common types
    
      GVE_MTD_PATH_HASH_NONE
      GVE_MTD_PATH_HASH_L4
    
    Concrete examples of error conditions that are resolved are
    mentioned in the commits that add sk_rethink_txhash calls. Such as
    commit 7788174e ("tcp: change IPv6 flow-label upon receiving
    spurious retransmission").
    
    Experimental results mirror what the theory suggests: where IPv6
    FlowLabel is included in path selection (e.g., LAG/ECMP), flowlabel
    rotation on TCP timeout avoids the vast majority of TCP disconnects
    that would otherwise have occurred during link failures in long-haul
    backbones, when an alternative path is available.
    
    Rotation can be applied to various bad connection signals, such as
    timeouts and spurious retransmissions. In aggregate, such flow level
    signals can help locate network issues. Define initial common states:
    
      GVE_MTD_PATH_STATE_DEFAULT
      GVE_MTD_PATH_STATE_TIMEOUT
      GVE_MTD_PATH_STATE_CONGESTION
      GVE_MTD_PATH_STATE_RETRANSMIT
    Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
    Signed-off-by: default avatarDavid Awogbemila <awogbemila@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    497dbb2b
gve_tx.c 20.6 KB