diff options
author | Yunsheng Lin | 2018-03-09 03:37:01 +0100 |
---|---|---|
committer | David S. Miller | 2018-03-09 17:33:14 +0100 |
commit | 0d3e6631de9a56a56e06435f3a2c6196014a059d (patch) | |
tree | 3acc5548000f5d3859c994096cb31fa133e68cdd /drivers/net/ethernet/hisilicon/hns3/hnae3.h | |
parent | net: hns3: fix for use-after-free when setting ring parameter (diff) | |
download | kernel-qcow2-linux-0d3e6631de9a56a56e06435f3a2c6196014a059d.tar.gz kernel-qcow2-linux-0d3e6631de9a56a56e06435f3a2c6196014a059d.tar.xz kernel-qcow2-linux-0d3e6631de9a56a56e06435f3a2c6196014a059d.zip |
net: hns3: refactor the get/put_vector function
There is a get_vector function, which allocate the vectors
for a client, but there is not a put_vector to free the
vector.
This patch introduces the put_vector function in order to
fix the coalesce configuration lost problem during reset
process.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hnae3.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index fd06bc78c58e..a07204837a9b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -265,6 +265,8 @@ struct hnae3_ae_dev { * Get tc size of handle * get_vector() * Get vector number and vector information + * put_vector() + * Put the vector in hdev * map_ring_to_vector() * Map rings to vector * unmap_ring_from_vector() @@ -375,6 +377,7 @@ struct hnae3_ae_ops { int (*get_vector)(struct hnae3_handle *handle, u16 vector_num, struct hnae3_vector_info *vector_info); + int (*put_vector)(struct hnae3_handle *handle, int vector_num); int (*map_ring_to_vector)(struct hnae3_handle *handle, int vector_num, struct hnae3_ring_chain_node *vr_chain); |