diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2019-05-06 10:48:41 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-07 10:37:13 -0700 |
commit | 3d5f3741895291d3317e33718d96eb78294c8941 (patch) | |
tree | 55453d33440ad4897b1b9a43ad76bd3d99363c5f /drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | |
parent | 09934b0363d19097e02292901bb93521a80ee792 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h index 2b4f5ea3fddf..f669412764f2 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h @@ -376,6 +376,7 @@ struct ring_stats { u64 tx_err_cnt; u64 restart_queue; u64 tx_busy; + u64 tx_copy; }; struct { u64 rx_pkts; @@ -444,11 +445,6 @@ struct hns3_nic_ring_data { void (*fini_process)(struct hns3_nic_ring_data *); }; -struct hns3_nic_ops { - int (*maybe_stop_tx)(struct sk_buff **out_skb, - int *bnum, struct hns3_enet_ring *ring); -}; - enum hns3_flow_level_range { HNS3_FLOW_LOW = 0, HNS3_FLOW_MID = 1, @@ -538,7 +534,6 @@ struct hns3_nic_priv { u32 port_id; struct net_device *netdev; struct device *dev; - struct hns3_nic_ops ops; /** * the cb for nic to manage the ring buffer, the first half of the |