diff options
author | Jeroen de Borst <jeroendb@google.com> | 2024-02-29 13:22:35 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-04 10:03:32 +0000 |
commit | 5e37d8254e7f551dda62e7590e819d69c7491845 (patch) | |
tree | a33c25419a519742d5ca3e62648033cb0ec02882 /drivers/net/ethernet/intel/igc | |
parent | 0b43cf527d1d6b75597b0f6c40a60a8b67837afe (diff) | |
download | linux-5e37d8254e7f551dda62e7590e819d69c7491845.tar.gz linux-5e37d8254e7f551dda62e7590e819d69c7491845.tar.bz2 linux-5e37d8254e7f551dda62e7590e819d69c7491845.zip |
gve: Add header split data path
Add header buffers and ethtool support to enable header split via the
tcp-data-split flag in ethtool's ringparam config. A coherent dma memory
is allocated for the header buffers. There is one header buffer per ring
entry by calculating the offset to the header-buffers starting address.
The header buffer is always copied directly into the skb and payload is
always added as frags. When there is a header buffer overflow or the
header length is 0, the driver places the whole unsplit packet in frags.
When toggling header split, the driver will call gve_adjust_config to
set its queues appropriately. If header split is enabled by the user and
the max packet buffer size is no less than 4KB, driver will set the
packet buffer size as 4KB to support TCP_ZEROCOPY_RECEIVE. Otherwise the
driver will use the default 2KB as the packet buffer size.
`ethtool -G <dev> tcp-data-split on/off` is the command to toggle header
split.
`ethtool -g <dev>` will show the status of header split with the field
of `tcp-data-split`.
Co-developed-by: Ziwei Xiao <ziweixiao@google.com>
Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
Signed-off-by: Jeroen de Borst <jeroendb@google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/igc')
0 files changed, 0 insertions, 0 deletions