18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2014 Cisco Systems, Inc.  All rights reserved.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * This program is free software; you may redistribute it and/or modify
58c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by
68c2ecf20Sopenharmony_ci * the Free Software Foundation; version 2 of the License.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
98c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
108c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
118c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
128c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
148c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
158c2ecf20Sopenharmony_ci * SOFTWARE.
168c2ecf20Sopenharmony_ci */
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#ifndef _CQ_ENET_DESC_H_
198c2ecf20Sopenharmony_ci#define _CQ_ENET_DESC_H_
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#include "cq_desc.h"
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci/* Ethernet completion queue descriptor: 16B */
248c2ecf20Sopenharmony_cistruct cq_enet_wq_desc {
258c2ecf20Sopenharmony_ci	__le16 completed_index;
268c2ecf20Sopenharmony_ci	__le16 q_number;
278c2ecf20Sopenharmony_ci	u8 reserved[11];
288c2ecf20Sopenharmony_ci	u8 type_color;
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_cistatic inline void cq_enet_wq_desc_dec(struct cq_enet_wq_desc *desc,
328c2ecf20Sopenharmony_ci	u8 *type, u8 *color, u16 *q_number, u16 *completed_index)
338c2ecf20Sopenharmony_ci{
348c2ecf20Sopenharmony_ci	cq_desc_dec((struct cq_desc *)desc, type,
358c2ecf20Sopenharmony_ci		color, q_number, completed_index);
368c2ecf20Sopenharmony_ci}
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* _CQ_ENET_DESC_H_ */
39