From: Zhang Shengju Date: Mon, 29 Feb 2016 08:21:30 +0000 (+0000) Subject: net: pktgen: use reset to set mac header X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c145aeb3ff899f38bd28ccbc40dbb647dd1b1fd3;p=openwrt%2Fstaging%2Fblogic.git net: pktgen: use reset to set mac header Since offset is zero, it's not necessary to use set function. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 1474cfd2dc1c..20999aa596dd 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2856,7 +2856,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, *vlan_encapsulated_proto = htons(ETH_P_IP); } - skb_set_mac_header(skb, 0); + skb_reset_mac_header(skb); skb_set_network_header(skb, skb->len); iph = (struct iphdr *) skb_put(skb, sizeof(struct iphdr)); @@ -2983,7 +2983,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, *vlan_encapsulated_proto = htons(ETH_P_IPV6); } - skb_set_mac_header(skb, 0); + skb_reset_mac_header(skb); skb_set_network_header(skb, skb->len); iph = (struct ipv6hdr *) skb_put(skb, sizeof(struct ipv6hdr));