Skip to content

Commit 51145da

Browse files
321lipengdavem330
authored andcommitted
net: hns3: remove redundant memset when alloc buffer
HW will use packet length to write packets to buffer or read packets from buffer. There is a redundant memset when alloc buffer, the memset have no sense and will increase time-consuming. This patch removes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 66b4473 commit 51145da

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,8 +1444,6 @@ static int hns3_alloc_buffer(struct hns3_enet_ring *ring,
14441444
cb->length = hnae_page_size(ring);
14451445
cb->type = DESC_TYPE_PAGE;
14461446

1447-
memset(cb->buf, 0, cb->length);
1448-
14491447
return 0;
14501448
}
14511449

0 commit comments

Comments
 (0)