summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns/hnae.h
diff options
context:
space:
mode:
authorlipeng <lipeng321@huawei.com>2017-04-01 12:03:38 +0100
committerDavid S. Miller <davem@davemloft.net>2017-04-03 14:48:43 -0700
commitf2aaed557ecff57f7523f889acf1981fb23c4047 (patch)
tree6ff4b970f8d2a19e6971cb8cc2bd9252f090bc73 /drivers/net/ethernet/hisilicon/hns/hnae.h
parentb29bd41259f38fc1a22735cd69b374a75d6a213c (diff)
net: hns: Replace netif_tx_lock to ring spin lock
netif_tx_lock is a global spin lock, it will take affect in all rings in the netdevice. In tx_poll_one process, it can only lock the current ring, in this case, we define a spin lock in hnae_ring struct for it. Signed-off-by: lipeng <lipeng321@huawei.com> reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hnae.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hnae.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h
index c66581db72ac..859c53619ba2 100644
--- a/drivers/net/ethernet/hisilicon/hns/hnae.h
+++ b/drivers/net/ethernet/hisilicon/hns/hnae.h
@@ -275,6 +275,9 @@ struct hnae_ring {
/* statistic */
struct ring_stats stats;
+ /* ring lock for poll one */
+ spinlock_t lock;
+
dma_addr_t desc_dma_addr;
u32 buf_size; /* size for hnae_desc->addr, preset by AE */
u16 desc_num; /* total number of desc */