mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
gso: Remove arbitrary checks for unsupported GSO
In several gso_segment functions there are checks of gso_type against a seemingly arbitrary list of SKB_GSO_* flags. This seems like an attempt to identify unsupported GSO types, but since the stack is the one that set these GSO types in the first place this seems unnecessary to do. If a combination isn't valid in the first place that stack should not allow setting it. This is a code simplication especially for add new GSO types. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
948350140e
commit
5c7cdf339a
7 changed files with 1 additions and 102 deletions
|
|
@ -26,15 +26,6 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
|
|||
netdev_features_t mpls_features;
|
||||
__be16 mpls_protocol;
|
||||
|
||||
if (unlikely(skb_shinfo(skb)->gso_type &
|
||||
~(SKB_GSO_TCPV4 |
|
||||
SKB_GSO_TCPV6 |
|
||||
SKB_GSO_UDP |
|
||||
SKB_GSO_DODGY |
|
||||
SKB_GSO_TCP_FIXEDID |
|
||||
SKB_GSO_TCP_ECN)))
|
||||
goto out;
|
||||
|
||||
/* Setup inner SKB. */
|
||||
mpls_protocol = skb->protocol;
|
||||
skb->protocol = skb->inner_protocol;
|
||||
|
|
@ -57,7 +48,7 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
|
|||
* skb_mac_gso_segment(), an indirect caller of this function.
|
||||
*/
|
||||
__skb_pull(skb, skb->data - skb_mac_header(skb));
|
||||
out:
|
||||
|
||||
return segs;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue