@@ -160,9 +160,7 @@ static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key,
160160 new_mpls_lse = (__be32 * )skb_mpls_header (skb );
161161 * new_mpls_lse = mpls -> mpls_lse ;
162162
163- if (skb -> ip_summed == CHECKSUM_COMPLETE )
164- skb -> csum = csum_add (skb -> csum , csum_partial (new_mpls_lse ,
165- MPLS_HLEN , 0 ));
163+ skb_postpush_rcsum (skb , new_mpls_lse , MPLS_HLEN );
166164
167165 hdr = eth_hdr (skb );
168166 hdr -> h_proto = mpls -> mpls_ethertype ;
@@ -281,7 +279,7 @@ static int set_eth_addr(struct sk_buff *skb, struct sw_flow_key *flow_key,
281279 ether_addr_copy_masked (eth_hdr (skb )-> h_dest , key -> eth_dst ,
282280 mask -> eth_dst );
283281
284- ovs_skb_postpush_rcsum (skb , eth_hdr (skb ), ETH_ALEN * 2 );
282+ skb_postpush_rcsum (skb , eth_hdr (skb ), ETH_ALEN * 2 );
285283
286284 ether_addr_copy (flow_key -> eth .src , eth_hdr (skb )-> h_source );
287285 ether_addr_copy (flow_key -> eth .dst , eth_hdr (skb )-> h_dest );
@@ -641,7 +639,7 @@ static int ovs_vport_output(OVS_VPORT_OUTPUT_PARAMS)
641639 /* Reconstruct the MAC header. */
642640 skb_push (skb , data -> l2_len );
643641 memcpy (skb -> data , & data -> l2_data , data -> l2_len );
644- ovs_skb_postpush_rcsum (skb , skb -> data , data -> l2_len );
642+ skb_postpush_rcsum (skb , skb -> data , data -> l2_len );
645643 skb_reset_mac_header (skb );
646644
647645 ovs_vport_send (vport , skb );
0 commit comments