X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Ftx_pkt.h;h=f7443cf4e8ed93068e092bdf6828f1d8bc06051e;hb=08fee9c5d2e1d1f3fe14d00683c2a4b7a17e7876;hp=798797ab695887eab1d0807e64c15b23b6ed0c2f;hpb=d923180e4af2612361dd7d4bf1627092a4d552d8;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/tx_pkt.h b/VNFs/DPPD-PROX/tx_pkt.h index 798797ab..f7443cf4 100644 --- a/VNFs/DPPD-PROX/tx_pkt.h +++ b/VNFs/DPPD-PROX/tx_pkt.h @@ -22,6 +22,13 @@ struct task_base; struct rte_mbuf; +struct prox_headroom { + uint64_t command; + uint32_t ip; + uint32_t prefix; + uint32_t gateway_ip; +} __attribute__((packed)); + void flush_queues_hw(struct task_base *tbase); void flush_queues_sw(struct task_base *tbase); @@ -64,6 +71,8 @@ int tx_pkt_no_drop_hw(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t int tx_pkt_no_drop_sw(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); int tx_pkt_hw(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); int tx_pkt_sw(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); +int tx_ctrlplane_hw(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); +int tx_ctrlplane_sw(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); int tx_pkt_trace(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); int tx_pkt_dump(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); @@ -78,5 +87,20 @@ uint16_t tx_try_self(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t tx function. This tx function can be used to make each task a sink. */ int tx_pkt_drop_all(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); +int tx_pkt_l3(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts, uint8_t *out); + +int tx_ring_cti(struct task_base *tbase, struct rte_ring *ring, uint16_t command, struct rte_mbuf *mbuf, uint8_t core_id, uint8_t task_id, uint32_t ip); +void tx_ring_ip(struct task_base *tbase, struct rte_ring *ring, uint16_t command, struct rte_mbuf *mbuf, uint32_t ip); +void tx_ring(struct task_base *tbase, struct rte_ring *ring, uint16_t command, struct rte_mbuf *mbuf); + +void ctrl_ring_set_command(struct rte_mbuf *mbuf, uint64_t udata64); +uint64_t ctrl_ring_get_command(struct rte_mbuf *mbuf); +void ctrl_ring_set_ip(struct rte_mbuf *mbuf, uint32_t udata32); +uint32_t ctrl_ring_get_ip(struct rte_mbuf *mbuf); +void ctrl_ring_set_gateway_ip(struct rte_mbuf *mbuf, uint32_t udata32); +uint32_t ctrl_ring_get_gateway_ip(struct rte_mbuf *mbuf); +void ctrl_ring_set_prefix(struct rte_mbuf *mbuf, uint32_t udata32); +uint32_t ctrl_ring_get_prefix(struct rte_mbuf *mbuf); +void tx_ring_route(struct task_base *tbase, struct rte_ring *ring, int add, struct rte_mbuf *mbuf, uint32_t ip, uint32_t gateway_ip, uint32_t prefix); #endif /* _TX_PKT_H_ */