Hi Simon On Tue, 2014-06-03 at 11:38 +0900, Simon Horman wrote: > +/* If MPLS offload request, verify we are testing hardware MPLS features > + * instead of standard features for the netdev. > + */ > +#ifdef CONFIG_NET_MPLS_GSO > +static netdev_features_t net_mpls_features(struct sk_buff *skb, > + netdev_features_t features) > +{ > + int tmp; > + __be16 type; > + > + type = skb_network_protocol(skb, &tmp); > + if (unlikely(type == cpu_to_be16(ETH_P_MPLS_UC) || > + type == cpu_to_be16(ETH_P_MPLS_MC)))
I believe net/core/dev.c prefers to use htons(ETH_P_MPLS_UC) (check netif_skb_features()) > + features &= skb->dev->mpls_features; > + > + return features; > +} > +#else > +static netdev_features_t net_mpls_features(struct sk_buff *skb, > + netdev_features_t features) > +{ > + return features; > +} > +#endif > + > static netdev_features_t harmonize_features(struct sk_buff *skb, > netdev_features_t features) > { > int tmp; _be16 type; type = skb_network_protocol(skb, &tmp); > > + features = net_mpls_features(skb, features); features = net_mpls_features(skb, features, type); > + > if (skb->ip_summed != CHECKSUM_NONE && > !can_checksum_protocol(features, skb_network_protocol(skb, &tmp))) { !can_checksum_protocol(features, type)) { > features &= ~NETIF_F_ALL_CSUM; I guess CONFIG_NET_MPLS_GSO will be set by all distros, right ? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev