diff options
author | Aviad Krawczyk <aviad.krawczyk@huawei.com> | 2017-08-21 18:56:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-22 20:48:54 +0300 |
commit | e2585ea775380ec2b2b1bf9619a5a3a6d26aa72b (patch) | |
tree | 707bd194df75742fe5b9a135cce102fbcb749f3e /drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | |
parent | 7ef37fe4c1a156a394174bd1b5d849cef2b8b4fa (diff) | |
download | linux-e2585ea775380ec2b2b1bf9619a5a3a6d26aa72b.tar.xz |
net-next/hinic: Add Rx handler
Set the io resources in the nic and handle rx events by qp operations.
Signed-off-by: Aviad Krawczyk <aviad.krawczyk@huawei.com>
Signed-off-by: Zhao Chen <zhaochen6@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c index 6ceae958db28..3e3181c089bd 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c @@ -827,6 +827,18 @@ struct hinic_hw_wqe *hinic_read_wqe(struct hinic_wq *wq, unsigned int wqe_size, } /** + * hinic_read_wqe_direct - read wqe directly from ci position + * @wq: wq + * @cons_idx: ci position + * + * Return wqe + **/ +struct hinic_hw_wqe *hinic_read_wqe_direct(struct hinic_wq *wq, u16 cons_idx) +{ + return WQ_PAGE_ADDR(wq, cons_idx) + WQE_PAGE_OFF(wq, cons_idx); +} + +/** * wqe_shadow - check if a wqe is shadow * @wq: wq of the wqe * @wqe: the wqe for shadow checking |