git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ionic: cut down queue structure
[dpdk.git]
/
drivers
/
net
/
ionic
/
ionic_lif.h
diff --git
a/drivers/net/ionic/ionic_lif.h
b/drivers/net/ionic/ionic_lif.h
index
c1d15dc
..
c850a9c
100644
(file)
--- a/
drivers/net/ionic/ionic_lif.h
+++ b/
drivers/net/ionic/ionic_lif.h
@@
-48,13
+48,13
@@
struct ionic_rx_stats {
#define IONIC_QCQ_F_INITED BIT(0)
#define IONIC_QCQ_F_SG BIT(1)
#define IONIC_QCQ_F_INITED BIT(0)
#define IONIC_QCQ_F_SG BIT(1)
-#define IONIC_QCQ_F_INTR BIT(2)
-#define IONIC_QCQ_F_NOTIFYQ BIT(3)
#define IONIC_QCQ_F_DEFERRED BIT(4)
#define IONIC_QCQ_F_DEFERRED BIT(4)
+#define IONIC_QCQ_F_CSUM_L3 BIT(7)
+#define IONIC_QCQ_F_CSUM_UDP BIT(8)
+#define IONIC_QCQ_F_CSUM_TCP BIT(9)
/* Queue / Completion Queue */
struct ionic_qcq {
/* Queue / Completion Queue */
struct ionic_qcq {
- uint64_t offloads;
struct ionic_queue q; /**< Queue */
struct ionic_cq cq; /**< Completion Queue */
struct ionic_lif *lif; /**< LIF */
struct ionic_queue q; /**< Queue */
struct ionic_cq cq; /**< Completion Queue */
struct ionic_lif *lif; /**< LIF */
@@
-71,12
+71,26
@@
struct ionic_qcq {
struct ionic_intr_info intr;
};
struct ionic_intr_info intr;
};
-#define IONIC_Q_TO_QCQ(q) container_of(q, struct ionic_qcq, q)
+#define IONIC_Q_TO_QCQ(_q) container_of(_q, struct ionic_qcq, q)
+#define IONIC_CQ_TO_QCQ(_cq) container_of(_cq, struct ionic_qcq, cq)
#define IONIC_Q_TO_TX_STATS(q) (&IONIC_Q_TO_QCQ(q)->stats.tx)
#define IONIC_Q_TO_RX_STATS(q) (&IONIC_Q_TO_QCQ(q)->stats.rx)
#define IONIC_Q_TO_TX_STATS(q) (&IONIC_Q_TO_QCQ(q)->stats.tx)
#define IONIC_Q_TO_RX_STATS(q) (&IONIC_Q_TO_QCQ(q)->stats.rx)
+struct ionic_qtype_info {
+ uint8_t version;
+ uint8_t supported;
+ uint64_t features;
+ uint16_t desc_sz;
+ uint16_t comp_sz;
+ uint16_t sg_desc_sz;
+ uint16_t max_sg_elems;
+ uint16_t sg_desc_stride;
+};
+
#define IONIC_LIF_F_INITED BIT(0)
#define IONIC_LIF_F_LINK_CHECK_NEEDED BIT(1)
#define IONIC_LIF_F_INITED BIT(0)
#define IONIC_LIF_F_LINK_CHECK_NEEDED BIT(1)
+#define IONIC_LIF_F_UP BIT(2)
+#define IONIC_LIF_F_FW_RESET BIT(3)
#define IONIC_LIF_NAME_MAX_SZ (32)
#define IONIC_LIF_NAME_MAX_SZ (32)
@@
-112,6
+126,10
@@
struct ionic_lif {
struct ionic_lif_info *info;
rte_iova_t info_pa;
const struct rte_memzone *info_z;
struct ionic_lif_info *info;
rte_iova_t info_pa;
const struct rte_memzone *info_z;
+
+ struct ionic_qtype_info qtype_info[IONIC_QTYPE_MAX];
+ uint8_t qtype_ver[IONIC_QTYPE_MAX];
+
struct rte_eth_stats stats_base;
struct ionic_lif_stats lif_stats_base;
};
struct rte_eth_stats stats_base;
struct ionic_lif_stats lif_stats_base;
};
@@
-121,21
+139,20
@@
int ionic_lifs_size(struct ionic_adapter *ionic);
int ionic_lif_alloc(struct ionic_lif *lif);
void ionic_lif_free(struct ionic_lif *lif);
int ionic_lif_alloc(struct ionic_lif *lif);
void ionic_lif_free(struct ionic_lif *lif);
+void ionic_lif_free_queues(struct ionic_lif *lif);
int ionic_lif_init(struct ionic_lif *lif);
void ionic_lif_deinit(struct ionic_lif *lif);
int ionic_lif_start(struct ionic_lif *lif);
int ionic_lif_init(struct ionic_lif *lif);
void ionic_lif_deinit(struct ionic_lif *lif);
int ionic_lif_start(struct ionic_lif *lif);
-
int
ionic_lif_stop(struct ionic_lif *lif);
+
void
ionic_lif_stop(struct ionic_lif *lif);
-int ionic_lif_configure(struct ionic_lif *lif);
+void ionic_lif_configure(struct ionic_lif *lif);
+void ionic_lif_configure_vlan_offload(struct ionic_lif *lif, int mask);
void ionic_lif_reset(struct ionic_lif *lif);
int ionic_intr_alloc(struct ionic_lif *lif, struct ionic_intr_info *intr);
void ionic_lif_reset(struct ionic_lif *lif);
int ionic_intr_alloc(struct ionic_lif *lif, struct ionic_intr_info *intr);
-void ionic_intr_free(struct ionic_lif *lif, struct ionic_intr_info *intr);
-bool ionic_adminq_service(struct ionic_cq *cq, uint32_t cq_desc_index,
- void *cb_arg);
int ionic_qcq_service(struct ionic_qcq *qcq, int budget, ionic_cq_cb cb,
void *cb_arg);
int ionic_qcq_service(struct ionic_qcq *qcq, int budget, ionic_cq_cb cb,
void *cb_arg);