]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: hns3: unify maybe_stop_tx for TSO and non-TSO case
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 6 May 2019 02:48:41 +0000 (10:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 May 2019 17:37:13 +0000 (10:37 -0700)
commit3d5f3741895291d3317e33718d96eb78294c8941
tree55453d33440ad4897b1b9a43ad76bd3d99363c5f
parent09934b0363d19097e02292901bb93521a80ee792
net: hns3: unify maybe_stop_tx for TSO and non-TSO case

Currently, maybe_stop_tx ops for TSO and non-TSO case share some BD
calculation code, so this patch unifies the maybe_stop_tx by removing
the maybe_stop_tx ops. skb_is_gso() can be used to differentiate the
case between TSO and non-TSO case if there is need to handle special
case for TSO case.

This patch also add tx_copy field in "ethtool --statistics" to help
better debug the performance issue caused by calling skb_copy.

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
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c