summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>2016-03-03 02:16:54 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-05 04:45:13 +0100
commit6297b91c7fb530d3f2543a8e25d68ccf75bfb139 (patch)
tree2ea0b434beb4732f1775b0a4c28e851f8a2fccbd /drivers
parentMerge tag 'rxrpc-rewrite-20160304' of git://git.kernel.org/pub/scm/linux/kern... (diff)
downloadlinux-6297b91c7fb530d3f2543a8e25d68ccf75bfb139.tar.xz
linux-6297b91c7fb530d3f2543a8e25d68ccf75bfb139.zip
vxlan: use reset to set header pointers
Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vxlan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 775ddb48388d..8ca243d93b78 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1460,7 +1460,7 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
reply->dev = dev;
skb_reserve(reply, LL_RESERVED_SPACE(request->dev));
skb_push(reply, sizeof(struct ethhdr));
- skb_set_mac_header(reply, 0);
+ skb_reset_mac_header(reply);
ns = (struct nd_msg *)skb_transport_header(request);
@@ -1480,7 +1480,7 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
reply->protocol = htons(ETH_P_IPV6);
skb_pull(reply, sizeof(struct ethhdr));
- skb_set_network_header(reply, 0);
+ skb_reset_network_header(reply);
skb_put(reply, sizeof(struct ipv6hdr));
/* IPv6 header */
@@ -1495,7 +1495,7 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
pip6->saddr = *(struct in6_addr *)n->primary_key;
skb_pull(reply, sizeof(struct ipv6hdr));
- skb_set_transport_header(reply, 0);
+ skb_reset_transport_header(reply);
na = (struct nd_msg *)skb_put(reply, sizeof(*na) + na_olen);