net: hns3: fix for fraglist SKB headlen not handling correctly
authorHuazhong Tan <tanhuazhong@huawei.com>
Sat, 28 Mar 2020 07:09:56 +0000 (15:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Mar 2020 17:57:53 +0000 (10:57 -0700)
commit74ef402e134b5ebe4bcfbcdd55d2e7278a724620
tree113b21eb121cf6c1df509b1247cdb65a751708bb
parent16deaef205b6da832f88a98770c55c8b85aaadfa
net: hns3: fix for fraglist SKB headlen not handling correctly

When the fraglist SKB headlen is larger than zero, current code
still handle the fraglist SKB linear data as frag data, which may
cause TX error.

This patch adds a new DESC_TYPE_FRAGLIST_SKB type to handle the
mapping and unmapping of the fraglist SKB linear data buffer.

Fixes: 8ae10cfb5089 ("net: hns3: support tx-scatter-gather-fraglist feature")
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/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c