Skip to content

Commit 6902910

Browse files
Zhang Shengjudavem330
authored andcommitted
mlx4: use reset to set mac header
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0e24c0a commit 6902910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/en_selftest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int mlx4_en_test_loopback_xmit(struct mlx4_en_priv *priv)
6868
memcpy(ethh->h_dest, priv->dev->dev_addr, ETH_ALEN);
6969
eth_zero_addr(ethh->h_source);
7070
ethh->h_proto = htons(ETH_P_ARP);
71-
skb_set_mac_header(skb, 0);
71+
skb_reset_mac_header(skb);
7272
for (i = 0; i < packet_size; ++i) /* fill our packet */
7373
packet[i] = (unsigned char)(i & 0xff);
7474

0 commit comments

Comments
 (0)