summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp_offload.c
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-02-05 15:27:31 -0800
committerDavid S. Miller <davem@davemloft.net>2016-02-11 08:55:33 -0500
commitbef3c6c9374da40ec63698cd504474366a9de2ff (patch)
tree375eb33610e57eb3228baf0790b97858a7674e98 /net/ipv4/udp_offload.c
parenta060679c6b3da17dc9e95d0500f811de118ec901 (diff)
downloadblackbird-op-linux-bef3c6c9374da40ec63698cd504474366a9de2ff.tar.gz
blackbird-op-linux-bef3c6c9374da40ec63698cd504474366a9de2ff.zip
net: Drop unecessary enc_features variable from tunnel segmentation functions
The enc_features variable isn't necessary since features isn't used anywhere after we create enc_features so instead just use a destructive AND on features itself and save ourselves the variable declaration. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp_offload.c')
-rw-r--r--net/ipv4/udp_offload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 4c519c1dc161..ce64c2b7ba55 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -37,7 +37,6 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
int mac_len = skb->mac_len;
int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb);
__be16 protocol = skb->protocol;
- netdev_features_t enc_features;
int udp_offset, outer_hlen;
unsigned int oldlen;
bool need_csum = !!(skb_shinfo(skb)->gso_type &
@@ -65,9 +64,10 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
(skb->dev->features & (is_ipv6 ?
NETIF_F_IPV6_CSUM : NETIF_F_IP_CSUM))));
+ features &= skb->dev->hw_enc_features;
+
/* segment inner packet. */
- enc_features = skb->dev->hw_enc_features & features;
- segs = gso_inner_segment(skb, enc_features);
+ segs = gso_inner_segment(skb, features);
if (IS_ERR_OR_NULL(segs)) {
skb_gso_error_unwind(skb, protocol, tnl_hlen, mac_offset,
mac_len);
OpenPOWER on IntegriCloud