diff options
author | Zhang Shengju <zhangshengju@cmss.chinamobile.com> | 2016-02-29 08:21:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-01 17:46:54 -0500 |
commit | c145aeb3ff899f38bd28ccbc40dbb647dd1b1fd3 (patch) | |
tree | e40bc9203c1df143fe727cc6c16851a2dcb4e382 /net/core/pktgen.c | |
parent | 241deec94425b5e962e2bf8a929d563afda045f7 (diff) | |
download | linux-c145aeb3ff899f38bd28ccbc40dbb647dd1b1fd3.tar.bz2 |
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 <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)); |