diff options
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/vnic_wq.h')
-rw-r--r-- | drivers/net/ethernet/cisco/enic/vnic_wq.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cisco/enic/vnic_wq.h b/drivers/net/ethernet/cisco/enic/vnic_wq.h index 7dd937ac11c2..2c6c70804a39 100644 --- a/drivers/net/ethernet/cisco/enic/vnic_wq.h +++ b/drivers/net/ethernet/cisco/enic/vnic_wq.h | |||
@@ -58,6 +58,10 @@ struct vnic_wq_buf { | |||
58 | unsigned int index; | 58 | unsigned int index; |
59 | int sop; | 59 | int sop; |
60 | void *desc; | 60 | void *desc; |
61 | uint64_t wr_id; /* Cookie */ | ||
62 | uint8_t cq_entry; /* Gets completion event from hw */ | ||
63 | uint8_t desc_skip_cnt; /* Num descs to occupy */ | ||
64 | uint8_t compressed_send; /* Both hdr and payload in one desc */ | ||
61 | }; | 65 | }; |
62 | 66 | ||
63 | /* Break the vnic_wq_buf allocations into blocks of 32/64 entries */ | 67 | /* Break the vnic_wq_buf allocations into blocks of 32/64 entries */ |
@@ -102,14 +106,20 @@ static inline void *vnic_wq_next_desc(struct vnic_wq *wq) | |||
102 | 106 | ||
103 | static inline void vnic_wq_post(struct vnic_wq *wq, | 107 | static inline void vnic_wq_post(struct vnic_wq *wq, |
104 | void *os_buf, dma_addr_t dma_addr, | 108 | void *os_buf, dma_addr_t dma_addr, |
105 | unsigned int len, int sop, int eop) | 109 | unsigned int len, int sop, int eop, |
110 | uint8_t desc_skip_cnt, uint8_t cq_entry, | ||
111 | uint8_t compressed_send, uint64_t wrid) | ||
106 | { | 112 | { |
107 | struct vnic_wq_buf *buf = wq->to_use; | 113 | struct vnic_wq_buf *buf = wq->to_use; |
108 | 114 | ||
109 | buf->sop = sop; | 115 | buf->sop = sop; |
116 | buf->cq_entry = cq_entry; | ||
117 | buf->compressed_send = compressed_send; | ||
118 | buf->desc_skip_cnt = desc_skip_cnt; | ||
110 | buf->os_buf = eop ? os_buf : NULL; | 119 | buf->os_buf = eop ? os_buf : NULL; |
111 | buf->dma_addr = dma_addr; | 120 | buf->dma_addr = dma_addr; |
112 | buf->len = len; | 121 | buf->len = len; |
122 | buf->wr_id = wrid; | ||
113 | 123 | ||
114 | buf = buf->next; | 124 | buf = buf->next; |
115 | if (eop) { | 125 | if (eop) { |
@@ -123,7 +133,7 @@ static inline void vnic_wq_post(struct vnic_wq *wq, | |||
123 | } | 133 | } |
124 | wq->to_use = buf; | 134 | wq->to_use = buf; |
125 | 135 | ||
126 | wq->ring.desc_avail--; | 136 | wq->ring.desc_avail -= desc_skip_cnt; |
127 | } | 137 | } |
128 | 138 | ||
129 | static inline void vnic_wq_service(struct vnic_wq *wq, | 139 | static inline void vnic_wq_service(struct vnic_wq *wq, |