linux/drivers/net/ethernet/google/gve
Willem de Bruijn 497dbb2b97 gve: Add optional metadata descriptor type GVE_TXD_MTD
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 7788174e87 ("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: Willem de Bruijn <willemb@google.com>
Signed-off-by: David Awogbemila <awogbemila@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-16 10:41:54 +00:00
..
gve.h gve: Add optional metadata descriptor type GVE_TXD_MTD 2021-12-16 10:41:54 +00:00
gve_adminq.c gve: Move the irq db indexes out of the ntfy block struct 2021-12-16 10:41:53 +00:00
gve_adminq.h gve: Add a jumbo-frame device option. 2021-10-25 14:13:12 +01:00
gve_desc.h gve: Add optional metadata descriptor type GVE_TXD_MTD 2021-12-16 10:41:54 +00:00
gve_desc_dqo.h gve: Add dqo descriptors 2021-06-24 12:47:37 -07:00
gve_dqo.h gve: Move the irq db indexes out of the ntfy block struct 2021-12-16 10:41:53 +00:00
gve_ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
gve_main.c gve: Update gve_free_queue_page_list signature 2021-12-16 10:41:53 +00:00
gve_register.h gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags. 2020-09-11 14:31:54 -07:00
gve_rx.c gve: remove memory barrier around seqno 2021-12-16 10:41:54 +00:00
gve_rx_dqo.c gve: Implement packet continuation for RX. 2021-10-25 14:13:12 +01:00
gve_tx.c gve: Add optional metadata descriptor type GVE_TXD_MTD 2021-12-16 10:41:54 +00:00
gve_tx_dqo.c gve: DQO: avoid unused variable warnings 2021-09-28 15:24:36 +01:00
gve_utils.c gve: fix for null pointer dereference. 2021-12-07 20:57:17 -08:00
gve_utils.h gve: Implement packet continuation for RX. 2021-10-25 14:13:12 +01:00
Makefile gve: DQO: Add core netdev features 2021-06-24 12:47:38 -07:00