IOC mediator: implement CBC protocol stack

Carrier Board Communication(CBC) protocol is a duplex protocol for IOC data
transfer, including physical layer, link layer, address layer and service layer.

Signed-off-by: Liu Yuan <yuan1.liu@intel.com>
Reviewed-by: Wang Yu <yu1.wang@intel.com>
Reviewed-by: Liu Shuo <shuo.a.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Liu Yuan
2018-04-13 14:55:21 +08:00
committed by Jack Ren
parent c9d7643462
commit 4eff8d10a1
4 changed files with 469 additions and 22 deletions

View File

@@ -718,4 +718,14 @@ void ioc_build_request(struct ioc_dev *ioc, int32_t link_len, int32_t srv_len);
/* Send data to native CBC cdevs and virtual PTY(UART DM) device */
int ioc_ch_xmit(enum ioc_ch_id id, const uint8_t *buf, size_t size);
/* Main handlers of CBC protocol stack */
void cbc_rx_handler(struct cbc_pkt *pkt);
void cbc_tx_handler(struct cbc_pkt *pkt);
/* Copy to buf to the ring buffer */
int cbc_copy_to_ring(const uint8_t *buf, size_t size, struct cbc_ring *ring);
/* Build a cbc_request based on CBC link layer protocol */
void cbc_unpack_link(struct ioc_dev *ioc);
#endif