static void sn_set_offloads(struct net_device *netdev) { netif_set_gso_max_size(netdev, SNBUF_DATA); #if 0 netdev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_LRO | NETIF_F_GSO_UDP_TUNNEL; #else /* Disable all offloading features for now */ netdev->hw_features = 0; #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) netdev->hw_enc_features = netdev->hw_features; #endif /* We prevent this interface from moving around namespaces. * This is to work around race between device unregister and namespace * cleanup. Revise this after adopting rtnl link based design */ netdev->features = netdev->hw_features | NETIF_F_NETNS_LOCAL; }
static void sn_set_offloads(struct net_device *netdev) { netif_set_gso_max_size(netdev, MAX_LFRAME - sizeof(struct sn_tx_metadata)); #if 0 netdev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_LRO | NETIF_F_GSO_UDP_TUNNEL; #else /* Disable all offloading features for now */ netdev->hw_features = 0; #endif netdev->hw_enc_features = netdev->hw_features; netdev->features = netdev->hw_features; }