X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenic%2Fbase%2Fvnic_rq.h;h=cfe65015d5fec601590d8145d420e2f50bed07f1;hb=829c3106812dee9e54d6dc060688e37f791a2421;hp=d774bb0db441717d579b53db14a997fc0729485b;hpb=2e99ea80f8bc0f10e9e7226e6cea3aa307891727;p=dpdk.git diff --git a/drivers/net/enic/base/vnic_rq.h b/drivers/net/enic/base/vnic_rq.h index d774bb0db4..cfe65015d5 100644 --- a/drivers/net/enic/base/vnic_rq.h +++ b/drivers/net/enic/base/vnic_rq.h @@ -6,43 +6,44 @@ #ifndef _VNIC_RQ_H_ #define _VNIC_RQ_H_ +#include #include "vnic_dev.h" #include "vnic_cq.h" /* Receive queue control */ struct vnic_rq_ctrl { - u64 ring_base; /* 0x00 */ - u32 ring_size; /* 0x08 */ - u32 pad0; - u32 posted_index; /* 0x10 */ - u32 pad1; - u32 cq_index; /* 0x18 */ - u32 pad2; - u32 enable; /* 0x20 */ - u32 pad3; - u32 running; /* 0x28 */ - u32 pad4; - u32 fetch_index; /* 0x30 */ - u32 pad5; - u32 error_interrupt_enable; /* 0x38 */ - u32 pad6; - u32 error_interrupt_offset; /* 0x40 */ - u32 pad7; - u32 error_status; /* 0x48 */ - u32 pad8; - u32 tcp_sn; /* 0x50 */ - u32 pad9; - u32 unused; /* 0x58 */ - u32 pad10; - u32 dca_select; /* 0x60 */ - u32 pad11; - u32 dca_value; /* 0x68 */ - u32 pad12; - u32 data_ring; /* 0x70 */ - u32 pad13; - u32 header_split; /* 0x78 */ - u32 pad14; + uint64_t ring_base; /* 0x00 */ + uint32_t ring_size; /* 0x08 */ + uint32_t pad0; + uint32_t posted_index; /* 0x10 */ + uint32_t pad1; + uint32_t cq_index; /* 0x18 */ + uint32_t pad2; + uint32_t enable; /* 0x20 */ + uint32_t pad3; + uint32_t running; /* 0x28 */ + uint32_t pad4; + uint32_t fetch_index; /* 0x30 */ + uint32_t pad5; + uint32_t error_interrupt_enable; /* 0x38 */ + uint32_t pad6; + uint32_t error_interrupt_offset; /* 0x40 */ + uint32_t pad7; + uint32_t error_status; /* 0x48 */ + uint32_t pad8; + uint32_t tcp_sn; /* 0x50 */ + uint32_t pad9; + uint32_t unused; /* 0x58 */ + uint32_t pad10; + uint32_t dca_select; /* 0x60 */ + uint32_t pad11; + uint32_t dca_value; /* 0x68 */ + uint32_t pad12; + uint32_t data_ring; /* 0x70 */ + uint32_t pad13; + uint32_t header_split; /* 0x78 */ + uint32_t pad14; }; struct vnic_rq { @@ -51,6 +52,8 @@ struct vnic_rq { struct vnic_dev *vdev; struct vnic_rq_ctrl __iomem *ctrl; /* memory-mapped */ struct vnic_dev_ring ring; + struct rte_mbuf **free_mbufs; /* reserve of free mbufs */ + int num_free_mbufs; struct rte_mbuf **mbuf_ring; /* array of allocated mbufs */ unsigned int mbuf_next_idx; /* next mb to consume */ void *os_buf_head; @@ -69,6 +72,7 @@ struct vnic_rq { struct rte_mbuf *pkt_last_seg; unsigned int max_mbufs_per_pkt; uint16_t tot_nb_desc; + bool need_initial_post; }; static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq)