From: Paul Greenwalt <[email protected]> Date: Tue, 17 Sep 2024 17:45:47 -0400
> E830 supports raw receive and generic transmit checksum offloads. > > Raw receive checksum support is provided by hardware calculating the > checksum over the whole packet, regardless of type. The calculated > checksum is provided to driver in the Rx flex descriptor. Then the driver > assigns the checksum to skb->csum and sets skb->ip_summed to > CHECKSUM_COMPLETE. > > Generic transmit checksum support is provided by hardware calculating the > checksum given two offsets: the start offset to begin checksum calculation, > and the offset to insert the calculated checksum in the packet. Support is > advertised to the stack using NETIF_F_HW_CSUM feature. > > E830 has the following limitations when both generic transmit checksum > offload and TCP Segmentation Offload (TSO) are enabled: > > 1. Inner packet header modification is not supported. This restriction > includes the inability to alter TCP flags, such as the push flag. As a > result, this limitation can impact the receiver's ability to coalesce > packets, potentially degrading network throughput. > 2. The Maximum Segment Size (MSS) is limited to 1023 bytes, which prevents > support of Maximum Transmission Unit (MTU) greater than 1063 bytes. > > Therefore NETIF_F_HW_CSUM and NETIF_F_ALL_TSO features are mutually > exclusive. NETIF_F_HW_CSUM hardware feature support is indicated but is not > enabled by default. Instead, IP checksums and NETIF_F_ALL_TSO are the > defaults. Enforcement of mutual exclusivity of NETIF_F_HW_CSUM and > NETIF_F_ALL_TSO is done in ice_fix_features_tso_gcs(). Mutual exclusivity > of IP checksums and NETIF_F_HW_CSUM is handled by netdev_fix_features(). > > When NETIF_F_HW_CSUM is requested the provided skb->csum_start and > skb->csum_offset are passed to hardware in the Tx context descriptor > generic checksum (GCS) parameters. Hardware calculates the 1's complement > from skb->csum_start to the end of the packet, and inserts the result in > the packet at skb->csum_offset. > > Co-developed-by: Alice Michael <[email protected]> > Signed-off-by: Alice Michael <[email protected]> > Co-developed-by: Eric Joyner <[email protected]> > Signed-off-by: Eric Joyner <[email protected]> > Signed-off-by: Paul Greenwalt <[email protected]> Reviewed-by: Alexander Lobakin <[email protected]> The only tiny nitpick below. The window opened today, so Tony may ask you to resubmit the patch so that he could take it. [...] > @@ -6283,6 +6321,8 @@ ice_fdb_del(struct ndmsg *ndm, __always_unused struct > nlattr *tb[], > * These are mutually exclusive as there is currently no way to > * enable/disable VLAN filtering based on VLAN ethertype when using VLAN > * prune rules. > + * > + * Return: updated features list This change is not related to the series. But I don't have any objections against it (not sure about the maintainers), so I think you could leave it here. Just add a period to the end of the sentence. > */ > static netdev_features_t > ice_fix_features(struct net_device *netdev, netdev_features_t features) > @@ -6338,6 +6378,9 @@ ice_fix_features(struct net_device *netdev, > netdev_features_t features) > features &= ~NETIF_VLAN_STRIPPING_FEATURES; > } > > + if (ice_is_feature_supported(np->vsi->back, ICE_F_GCS)) > + features = ice_fix_features_gcs(netdev, features); > + > return features; > } Thanks, Olek
