Skip to content
  • Jesse Gross's avatar
    net: Generalize ndo_gso_check to ndo_features_check · 5f35227e
    Jesse Gross authored
    
    
    GSO isn't the only offload feature with restrictions that
    potentially can't be expressed with the current features mechanism.
    Checksum is another although it's a general issue that could in
    theory apply to anything. Even if it may be possible to
    implement these restrictions in other ways, it can result in
    duplicate code or inefficient per-packet behavior.
    
    This generalizes ndo_gso_check so that drivers can remove any
    features that don't make sense for a given packet, similar to
    netif_skb_features(). It also converts existing driver
    restrictions to the new format, completing the work that was
    done to support tunnel protocols since the issues apply to
    checksums as well.
    
    By actually removing features from the set that are used to do
    offloading, it solves another problem with the existing
    interface. In these cases, GSO would run with the original set
    of features and not do anything because it appears that
    segmentation is not required.
    
    CC: Tom Herbert <therbert@google.com>
    CC: Joe Stringer <joestringer@nicira.com>
    CC: Eric Dumazet <edumazet@google.com>
    CC: Hayes Wang <hayeswang@realtek.com>
    Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
    Acked-by: default avatarTom Herbert <therbert@google.com>
    Fixes: 04ffcb25
    
     ("net: Add ndo_gso_check")
    Tested-by: default avatarHayes Wang <hayeswang@realtek.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5f35227e