X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmlx4.h;h=a2e0ae7befa4cdf7c04669101ce8678e30a72508;hb=b3bbd9e5f2;hp=42254405fb1c280ab55cbb8a855a592074a25d77;hpb=001a520e419fdbab8d83f572c2a4414c7bc8ed07;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index 42254405fb..a2e0ae7bef 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -219,6 +219,7 @@ struct rxq_elt { /* RX queue descriptor. */ struct rxq { + LIST_ENTRY(rxq) next; /* Used by parent queue only */ struct priv *priv; /* Back pointer to private data. */ struct rte_mempool *mp; /* Memory Pool for allocations. */ struct ibv_mr *mr; /* Memory Region (for mp). */ @@ -226,6 +227,7 @@ struct rxq { struct ibv_qp *qp; /* Queue Pair. */ struct ibv_exp_qp_burst_family *if_qp; /* QP burst interface. */ struct ibv_exp_cq_family *if_cq; /* CQ interface. */ + struct ibv_comp_channel *channel; /* * Each VLAN ID requires a separate flow steering rule. */ @@ -246,6 +248,10 @@ struct rxq { struct mlx4_rxq_stats stats; /* RX queue counters. */ unsigned int socket; /* CPU socket ID for allocations. */ struct ibv_exp_res_domain *rd; /* Resource Domain. */ + struct { + uint16_t queues_n; + uint16_t queues[RTE_MAX_QUEUES_PER_PORT]; + } rss; }; /* TX element. */ @@ -334,22 +340,41 @@ struct priv { unsigned int rss:1; /* RSS is enabled. */ unsigned int vf:1; /* This is a VF device. */ unsigned int pending_alarm:1; /* An alarm is pending. */ + unsigned int isolated:1; /* Toggle isolated mode. */ #ifdef INLINE_RECV unsigned int inl_recv_size; /* Inline recv size */ #endif unsigned int max_rss_tbl_sz; /* Maximum number of RSS queues. */ /* RX/TX queues. */ - struct rxq rxq_parent; /* Parent queue when RSS is enabled. */ unsigned int rxqs_n; /* RX queues array size. */ unsigned int txqs_n; /* TX queues array size. */ struct rxq *(*rxqs)[]; /* RX queues. */ struct txq *(*txqs)[]; /* TX queues. */ + struct rte_intr_handle intr_handle_dev; /* Device interrupt handler. */ struct rte_intr_handle intr_handle; /* Interrupt handler. */ + struct rte_flow_drop *flow_drop_queue; /* Flow drop queue. */ LIST_HEAD(mlx4_flows, rte_flow) flows; + struct rte_intr_conf intr_conf; /* Active interrupt configuration. */ + LIST_HEAD(mlx4_parents, rxq) parents; rte_spinlock_t lock; /* Lock for control functions. */ }; void priv_lock(struct priv *priv); void priv_unlock(struct priv *priv); +int +rxq_create_qp(struct rxq *rxq, + uint16_t desc, + int inactive, + int children_n, + struct rxq *rxq_parent); + +void +rxq_parent_cleanup(struct rxq *parent); + +struct rxq * +priv_parent_create(struct priv *priv, + uint16_t queues[], + uint16_t children_n); + #endif /* RTE_PMD_MLX4_H_ */