Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fa79666 authored by Edward Cree's avatar Edward Cree Committed by David S. Miller
Browse files

net: ip_tunnel: remove 'csum_help' argument to iptunnel_handle_offloads



All users now pass false, so we can remove it, and remove the code that
 was conditional upon it.

Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53936107
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1721,7 +1721,7 @@ static int vxlan_build_skb(struct sk_buff *skb, struct dst_entry *dst,
	if (WARN_ON(!skb))
		return -ENOMEM;

	skb = iptunnel_handle_offloads(skb, false, type);
	skb = iptunnel_handle_offloads(skb, type);
	if (IS_ERR(skb))
		return PTR_ERR(skb);

+1 −2
Original line number Diff line number Diff line
@@ -279,8 +279,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
struct metadata_dst *iptunnel_metadata_reply(struct metadata_dst *md,
					     gfp_t flags);

struct sk_buff *iptunnel_handle_offloads(struct sk_buff *skb, bool gre_csum,
					 int gso_type_mask);
struct sk_buff *iptunnel_handle_offloads(struct sk_buff *skb, int gso_type_mask);

static inline void iptunnel_xmit_stats(struct net_device *dev, int pkt_len)
{
+1 −2
Original line number Diff line number Diff line
@@ -103,8 +103,7 @@ static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb,
{
	int type = udp_csum ? SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL;

	/* As we're a UDP tunnel, we support LCO, so don't need csum_help */
	return iptunnel_handle_offloads(skb, false, type);
	return iptunnel_handle_offloads(skb, type);
}

static inline void udp_tunnel_gro_complete(struct sk_buff *skb, int nhoff)
+2 −2
Original line number Diff line number Diff line
@@ -787,7 +787,7 @@ int fou_build_header(struct sk_buff *skb, struct ip_tunnel_encap *e,
						       SKB_GSO_UDP_TUNNEL;
	__be16 sport;

	skb = iptunnel_handle_offloads(skb, false, type);
	skb = iptunnel_handle_offloads(skb, type);

	if (IS_ERR(skb))
		return PTR_ERR(skb);
@@ -820,7 +820,7 @@ int gue_build_header(struct sk_buff *skb, struct ip_tunnel_encap *e,

	optlen += need_priv ? GUE_LEN_PRIV : 0;

	skb = iptunnel_handle_offloads(skb, false, type);
	skb = iptunnel_handle_offloads(skb, type);

	if (IS_ERR(skb))
		return PTR_ERR(skb);
+1 −2
Original line number Diff line number Diff line
@@ -503,8 +503,7 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev,
static struct sk_buff *gre_handle_offloads(struct sk_buff *skb,
					   bool csum)
{
	return iptunnel_handle_offloads(skb, false,
					csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE);
	return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE);
}

static struct rtable *gre_get_rt(struct sk_buff *skb,
Loading