Skip to content

Commit

Permalink
datapath: compat: handle_offloads: remove csum_help param.
Browse files Browse the repository at this point in the history
Related to following upstream commit:
    commit 6fa79666e24d32be1b709f5269af41ed9e829e7e
    Author: Edward Cree <[email protected]>
    Date:   Thu Feb 11 21:02:31 2016 +0000

    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: Edward Cree <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
pshelar committed Aug 18, 2016
1 parent 73daf51 commit 2a94b57
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion datapath/linux/compat/include/net/ip_tunnels.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static inline int rpl_iptunnel_pull_header(struct sk_buff *skb, int hdr_len,
}

int ovs_iptunnel_handle_offloads(struct sk_buff *skb,
bool csum_help, int gso_type_mask,
int gso_type_mask,
void (*fix_segment)(struct sk_buff *));

/* This is is required to compile upstream gre.h. gre_handle_offloads()
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/include/net/udp_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static inline int rpl_udp_tunnel_handle_offloads(struct sk_buff *skb,
fix_segment = NULL;
#endif

return ovs_iptunnel_handle_offloads(skb, udp_csum, type, fix_segment);
return ovs_iptunnel_handle_offloads(skb, type, fix_segment);
}

#define udp_tunnel_handle_offloads rpl_udp_tunnel_handle_offloads
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static int rpl_gre_handle_offloads(struct sk_buff *skb, bool gre_csum)
else
fix_segment = gre_nop_fix;

return ovs_iptunnel_handle_offloads(skb, gre_csum, type, fix_segment);
return ovs_iptunnel_handle_offloads(skb, type, fix_segment);
}
#else

Expand Down
10 changes: 1 addition & 9 deletions datapath/linux/compat/ip_tunnels_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void rpl_iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
EXPORT_SYMBOL_GPL(rpl_iptunnel_xmit);

int ovs_iptunnel_handle_offloads(struct sk_buff *skb,
bool csum_help, int gso_type_mask,
int gso_type_mask,
void (*fix_segment)(struct sk_buff *))
{
int err;
Expand Down Expand Up @@ -118,14 +118,6 @@ int ovs_iptunnel_handle_offloads(struct sk_buff *skb,
return 0;
}

/* If packet is not gso and we are resolving any partial checksum,
* clear encapsulation flag. This allows setting CHECKSUM_PARTIAL
* on the outer header without confusing devices that implement
* NETIF_F_IP_CSUM with encapsulation.
*/
if (csum_help)
skb->encapsulation = 0;

if (skb->ip_summed != CHECKSUM_PARTIAL) {
skb->ip_summed = CHECKSUM_NONE;
skb->encapsulation = 0;
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ static int vxlan_build_skb(struct sk_buff *skb, struct dst_entry *dst,
#else
fix_segment = NULL;
#endif
err = ovs_iptunnel_handle_offloads(skb, udp_sum, type, fix_segment);
err = ovs_iptunnel_handle_offloads(skb, type, fix_segment);
if (err)
goto out_free;

Expand Down

0 comments on commit 2a94b57

Please sign in to comment.