]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: check FE bit before calling hns3_add_frag()
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 19 Dec 2019 06:57:40 +0000 (14:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:20:39 +0000 (21:20 -0800)
commit78c0c4ac749393daaec8d8047d0b56dfd5cb3e48
tree9b2b1f45650722223a58527335d79afd4f208e74
parentdbe9cb9adad764271b7df1d17bed4e0a18d5b4c6
net: hns3: check FE bit before calling hns3_add_frag()

A BD with FE bit means that it is the last BD of a packet,
currently the FE bit is checked before calling hns3_add_frag(),
which is unnecessary because the FE bit may have been checked
in some case.

This patch checks the FE bit before calling hns3_add_frag()
after processing the first BD of a SKB and adjust the location
of memcpy() to reduce duplication.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c