mbox series

[net-next,v2,00/10] Extend GbEth checksum offload support to VLAN/IPv6 packets

Message ID 20241015133634.193-1-paul.barker.ct@bp.renesas.com (mailing list archive)
Headers show
Series Extend GbEth checksum offload support to VLAN/IPv6 packets | expand

Message

Paul Barker Oct. 15, 2024, 1:36 p.m. UTC
The GbEth IP found in Renesas RZ/G2L, RZ/G3S and related SoCs supports
hardware checksum offload for packets in the following cases:

 - there are zero or one VLAN headers with TPID=0x8100
 - the network protocol is IPv4 or IPv6
 - the transport protocol is TCP, UDP or ICMP
 - the packet is not fragmented 

To complete the support for all these cases in the ravb driver, we need
to add handling for VLAN-tagged packets and IPv6 packets in both the TX
and RX code paths. Handling for ICMP packets in the TX path is not added
as it cannot currently be tested.

These patches also do some refactoring/tidy-up, drop unnecessary checks
from performance sensitive code paths and disable unnecessary IP header
checksum offloading.

Changes v1->v2:
  - Use get_unaligned() to access hw_csum in ravb_rx_csum_gbeth().
  - Dropped patch "Support ICMP TX checksum offload for GbEth" and
    simplified TX checksum offload path.
  - Moved last_frag into if condition in ravb_can_tx_csum_gbeth().
  - Dropped unnecessary check for skb->vlan_proto in
    ravb_can_tx_csum_gbeth().
  - s/HW/hardware/ in "Simplify types in RX csum validation" commit
    message.
  - s/null/zero/ in "Simplify UDP TX checksum offload" commit message.
  - Specified TX/RX direction in "Enable IPv6 TX/RX checksum offloading
    for GbEth" commit messages.
  - Dropped unnecessary whitespace.
  - Added Sergey's Reviewed-by tags.

Paul Barker (10):
  net: ravb: Factor out checksum offload enable bits
  net: ravb: Disable IP header RX checksum offloading
  net: ravb: Drop IP protocol check from RX csum verification
  net: ravb: Combine if conditions in RX csum validation
  net: ravb: Simplify types in RX csum validation
  net: ravb: Disable IP header TX checksum offloading
  net: ravb: Simplify UDP TX checksum offload
  net: ravb: Enable IPv6 RX checksum offloading for GbEth
  net: ravb: Enable IPv6 TX checksum offload for GbEth
  net: ravb: Add VLAN checksum support

 drivers/net/ethernet/renesas/ravb.h      |   6 ++
 drivers/net/ethernet/renesas/ravb_main.c | 101 ++++++++++++-----------
 2 files changed, 61 insertions(+), 46 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 18, 2024, 2:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Andrew Lunn <andrew@lunn.ch>:

On Tue, 15 Oct 2024 14:36:24 +0100 you wrote:
> The GbEth IP found in Renesas RZ/G2L, RZ/G3S and related SoCs supports
> hardware checksum offload for packets in the following cases:
> 
>  - there are zero or one VLAN headers with TPID=0x8100
>  - the network protocol is IPv4 or IPv6
>  - the transport protocol is TCP, UDP or ICMP
>  - the packet is not fragmented
> 
> [...]

Here is the summary with links:
  - [net-next,v2,01/10] net: ravb: Factor out checksum offload enable bits
    https://git.kernel.org/netdev/net-next/c/8e3037924a36
  - [net-next,v2,02/10] net: ravb: Disable IP header RX checksum offloading
    https://git.kernel.org/netdev/net-next/c/c4e347a02b14
  - [net-next,v2,03/10] net: ravb: Drop IP protocol check from RX csum verification
    https://git.kernel.org/netdev/net-next/c/8d2109c1a515
  - [net-next,v2,04/10] net: ravb: Combine if conditions in RX csum validation
    https://git.kernel.org/netdev/net-next/c/5a2d973e3606
  - [net-next,v2,05/10] net: ravb: Simplify types in RX csum validation
    https://git.kernel.org/netdev/net-next/c/faacdbba0180
  - [net-next,v2,06/10] net: ravb: Disable IP header TX checksum offloading
    https://git.kernel.org/netdev/net-next/c/4574ba5b711d
  - [net-next,v2,07/10] net: ravb: Simplify UDP TX checksum offload
    https://git.kernel.org/netdev/net-next/c/e63b5fd02a00
  - [net-next,v2,08/10] net: ravb: Enable IPv6 RX checksum offloading for GbEth
    https://git.kernel.org/netdev/net-next/c/59cceae40c67
  - [net-next,v2,09/10] net: ravb: Enable IPv6 TX checksum offload for GbEth
    https://git.kernel.org/netdev/net-next/c/85c171509821
  - [net-next,v2,10/10] net: ravb: Add VLAN checksum support
    https://git.kernel.org/netdev/net-next/c/546875ccba93

You are awesome, thank you!