hinic: add vxlan segmentation and cs offload support
Subsystems (3)
PATCH 1/1 hinic: add vxlan segmentation and cs offload support
Add NETIF_F_GSO_UDP_TUNNEL and NETIF_F_GSO_UDP_TUNNEL_CSUM features to support vxlan segmentation and checksum offload. Ipip and ipv6 tunnel packets are regarded as non-tunnel pkt for hw and as for other type of tunnel pkts, checksum offload is disabled.
Signed-off-by Luo bin <[email protected]>
--- .../net/ethernet/huawei/hinic/hinic_main.c | 7 ++- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 51 +++++++++++++++---- 2 files changed, 46 insertions(+), 12 deletions(-)
drivers/net/ethernet/huawei/hinic/hinic_main.c +6 -1
@@ -929,11 +929,16 @@ static void netdev_features_init(struct net_device *netdev) netdev->hw_features =NETIF_F_SG |NETIF_F_HIGHDMA |NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM |NETIF_F_TSO |NETIF_F_TSO6 |NETIF_F_RXCSUM |NETIF_F_LRO | -NETIF_F_HW_VLAN_CTAG_TX |NETIF_F_HW_VLAN_CTAG_RX ; +NETIF_F_HW_VLAN_CTAG_TX |NETIF_F_HW_VLAN_CTAG_RX | +NETIF_F_GSO_UDP_TUNNEL |NETIF_F_GSO_UDP_TUNNEL_CSUM ; netdev->vlan_features = netdev->hw_features; netdev->features = netdev->hw_features |NETIF_F_HW_VLAN_CTAG_FILTER ; + + netdev->hw_enc_features =NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM |NETIF_F_SCTP_CRC | +NETIF_F_SG |NETIF_F_TSO |NETIF_F_TSO6 |NETIF_F_TSO_ECN | +NETIF_F_GSO_UDP_TUNNEL_CSUM |NETIF_F_GSO_UDP_TUNNEL ; }static void hinic_refresh_nic_cfg (struct hinic_dev *nic_dev)
drivers/net/ethernet/huawei/hinic/hinic_tx.c +40 -11
73 lines not on this page · raw message
Signature · 1 line
2.17.1
From: Luo bin <[email protected]>
Date: Mon, 14 Sep 2020 21:48:23 +0800
Quoted 6 lines
Add
NETIF_F_GSO_UDP_TUNNELandNETIF_F_GSO_UDP_TUNNEL_CSUMfeatures to support vxlan segmentation and checksum offload. Ipip and ipv6 tunnel packets are regarded as non-tunnel pkt for hw and as for other type of tunnel pkts, checksum offload is disabled.Signed-off-by Luo bin <[email protected]>
Applied, thank you.