Patch "net: use skb_postpush_rcsum instead of own implementations" has been added to the 4.5-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
net: use skb_postpush_rcsum instead of own implementations
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-use-skb_postpush_rcsum-instead-of-own-implementations.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon May 16 11:20:33 PDT 2016
From: Daniel Borkmann <[email protected]>
Date: Sat, 20 Feb 2016 00:29:30 +0100
Subject: net: use skb_postpush_rcsum instead of own implementations
From: Daniel Borkmann <[email protected]>
[ Upstream commit 6b83d28a55a891a9d70fc61ccb1c138e47dcbe74 ]
Replace individual implementations with the recently introduced skb_postpush_rcsum() helper.
--- net/core/skbuff.c | 4 +--- net/ipv6/reassembly.c | 6 ++---- net/openvswitch/actions.c | 8 +++----- net/openvswitch/vport-netdev.c | 2 +- net/openvswitch/vport.h | 7 ------- 5 files changed, 7 insertions(+), 20 deletions(-)
net/core/skbuff.c +1 -3
@@ -4433,9 +4433,7 @@ int skb_vlan_push(struct sk_buff *skb, _ skb->mac_len +=VLAN_HLEN ;__skb_pull (skb, offset); -if (skb->ip_summed ==CHECKSUM_COMPLETE ) - skb->csum =csum_add (skb->csum,csum_partial (skb->data - + (2 *ETH_ALEN ),VLAN_HLEN ,0 )); +skb_postpush_rcsum (skb, skb->data + (2 *ETH_ALEN ),VLAN_HLEN ); }__vlan_hwaccel_put_tag (skb, vlan_proto, vlan_tci);return 0 ;
net/ipv6/reassembly.c +2 -4
@@ -496,10 +496,8 @@ static int ip6_frag_reasm(struct frag_quIP6CB (head)->flags |=IP6SKB_FRAGMENTED ;/* Yes, and fold redundant checksum back. 8) */ -if (head->ip_summed ==CHECKSUM_COMPLETE ) - head->csum =csum_partial (skb_network_header (head), -skb_network_header_len (head), - head->csum); +skb_postpush_rcsum (head,skb_network_header (head), +skb_network_header_len (head));rcu_read_lock ();IP6_INC_STATS_BH (net,__in6_dev_get (dev),IPSTATS_MIB_REASMOKS );
net/openvswitch/actions.c +3 -5
@@ -158,9 +158,7 @@ static int push_mpls(struct sk_buff *skb new_mpls_lse = (__be32 *)skb_mpls_header (skb); *new_mpls_lse = mpls->mpls_lse; -if (skb->ip_summed ==CHECKSUM_COMPLETE ) - skb->csum =csum_add (skb->csum,csum_partial (new_mpls_lse, -MPLS_HLEN ,0 )); +skb_postpush_rcsum (skb, new_mpls_lse,MPLS_HLEN ); hdr =eth_hdr (skb); hdr->h_proto = mpls->mpls_ethertype;
@@ -280,7 +278,7 @@ static int set_eth_addr(struct sk_buff *ether_addr_copy_masked (eth_hdr (skb)->h_dest, key->eth_dst, mask->eth_dst); -ovs_skb_postpush_rcsum (skb,eth_hdr (skb),ETH_ALEN *2 ); +skb_postpush_rcsum (skb,eth_hdr (skb),ETH_ALEN *2 );ether_addr_copy (flow_key->eth.src,eth_hdr (skb)->h_source);ether_addr_copy (flow_key->eth.dst,eth_hdr (skb)->h_dest);
@@ -639,7 +637,7 @@ static int ovs_vport_output(struct net */* Reconstruct the MAC header. */ skb_push (skb, data->l2_len);memcpy (skb->data, &data->l2_data, data->l2_len); -ovs_skb_postpush_rcsum (skb, skb->data, data->l2_len); +skb_postpush_rcsum (skb, skb->data, data->l2_len);skb_reset_mac_header (skb);ovs_vport_send (vport, skb);
net/openvswitch/vport-netdev.c +1 -1
@@ -58,7 +58,7 @@ static void netdev_port_receive(struct sreturn ;skb_push (skb,ETH_HLEN ); -ovs_skb_postpush_rcsum (skb, skb->data,ETH_HLEN ); +skb_postpush_rcsum (skb, skb->data,ETH_HLEN );ovs_vport_receive (vport, skb,skb_tunnel_info (skb));return ; error:
net/openvswitch/vport.h +0 -7
@@ -185,13 +185,6 @@ static inline struct vport *vport_from_pint ovs_vport_receive (struct vport *,struct sk_buff *,const struct ip_tunnel_info *); -static inline void ovs_skb_postpush_rcsum (struct sk_buff *skb, -const void *start,unsigned int len) -{ -if (skb->ip_summed ==CHECKSUM_COMPLETE ) - skb->csum =csum_add (skb->csum,csum_partial (start, len,0 )); -} -static inline const char *ovs_vport_name (struct vport *vport) {return vport->dev->name;
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/bpf-fix-double-fdput-in-replace_map_fd_with_map_ptr.patch queue-4.5/vlan-pull-on-__vlan_insert_tag-error-path-and-fix-csum-correction.patch queue-4.5/bpf-fix-refcnt-overflow.patch queue-4.5/bpf-verifier-reject-invalid-ld_abs-bpf_dw-instruction.patch queue-4.5/net-use-skb_postpush_rcsum-instead-of-own-implementations.patch queue-4.5/bpf-fix-check_map_func_compatibility-logic.patch