Lines Matching refs:lc
247 struct ldc_conn *lc;
274 lc = &sc->sc_lc;
275 lc->lc_id = ca->ca_id;
276 lc->lc_sc = sc;
277 lc->lc_reset = vnet_ldc_reset;
278 lc->lc_start = vnet_ldc_start;
279 lc->lc_rx_data = vio_rx_data;
285 lc->lc_txq = ldc_queue_alloc(VNET_TX_ENTRIES);
286 if (lc->lc_txq == NULL) {
291 lc->lc_rxq = ldc_queue_alloc(VNET_RX_ENTRIES);
292 if (lc->lc_rxq == NULL) {
333 ldc_queue_free(lc->lc_txq);
340 struct ldc_conn *lc = &sc->sc_lc;
343 hv_ldc_tx_get_state(lc->lc_id, &tx_head, &tx_tail, &tx_state);
344 if (tx_state != lc->lc_tx_state) {
356 lc->lc_tx_state = tx_state;
366 struct ldc_conn *lc = &sc->sc_lc;
371 err = hv_ldc_rx_get_state(lc->lc_id, &rx_head, &rx_tail, &rx_state);
381 if (rx_state != lc->lc_rx_state) {
384 lc->lc_tx_seqid = 0;
385 lc->lc_state = 0;
386 lc->lc_reset(lc);
391 err = hv_ldc_rx_set_qhead(lc->lc_id, rx_tail);
401 lc->lc_tx_seqid = 0;
402 lc->lc_state = 0;
403 lc->lc_reset(lc);
410 err = hv_ldc_rx_set_qhead(lc->lc_id, rx_tail);
419 lc->lc_rx_state = rx_state;
429 lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_rxq->lq_va + rx_head);
433 ldc_rx_ctrl(lc, lp);
438 ldc_rx_data(lc, lp);
445 ldc_reset(lc);
449 if (lc->lc_state == 0)
453 rx_head &= ((lc->lc_rxq->lq_nentries * sizeof(*lp)) - 1);
454 err = hv_ldc_rx_set_qhead(lc->lc_id, rx_head);
469 vio_rx_data(struct ldc_conn *lc, struct ldc_pkt *lp)
480 vnet_rx_vio_ctrl(lc->lc_sc, vm);
488 vnet_rx_vio_data(lc->lc_sc, vm);
493 ldc_reset(lc);
759 struct ldc_conn *lc = &sc->sc_lc;
784 err = hv_ldc_copy(lc->lc_id, LDC_COPY_IN,
841 struct ldc_conn *lc = &sc->sc_lc;
863 err = hv_ldc_copy(lc->lc_id, LDC_COPY_IN, cookie,
891 err = hv_ldc_copy(lc->lc_id, LDC_COPY_IN,
905 err = hv_ldc_copy(lc->lc_id, LDC_COPY_OUT, cookie,
973 vnet_ldc_reset(struct ldc_conn *lc)
976 struct vnet_softc *sc = lc->lc_sc;
1000 vnet_ldc_start(struct ldc_conn *lc)
1002 struct vnet_softc *sc = lc->lc_sc;
1010 struct ldc_conn *lc = &sc->sc_lc;
1013 err = ldc_send_unreliable(lc, msg, len);
1125 struct ldc_conn *lc = &sc->sc_lc;
1162 err = hv_ldc_tx_get_state(lc->lc_id, &tx_head, &tx_tail, &tx_state);
1168 tx_tail &= ((lc->lc_txq->lq_nentries * sizeof(struct ldc_pkt)) - 1);
1463 struct ldc_conn *lc = &sc->sc_lc;
1475 err = hv_ldc_set_map_table(lc->lc_id, pa, 2048);
1499 va = lc->lc_txq->lq_va;
1503 err = hv_ldc_tx_qconf(lc->lc_id, pa, lc->lc_txq->lq_nentries);
1507 va = (vaddr_t)lc->lc_rxq->lq_va;
1512 err = hv_ldc_rx_qconf(lc->lc_id, pa, lc->lc_rxq->lq_nentries);
1519 ldc_send_vers(lc);
1531 struct ldc_conn *lc = &sc->sc_lc;
1547 hv_ldc_tx_qconf(lc->lc_id, 0, 0);
1548 hv_ldc_rx_qconf(lc->lc_id, 0, 0);
1549 lc->lc_tx_seqid = 0;
1550 lc->lc_state = 0;
1551 lc->lc_tx_state = lc->lc_rx_state = LDC_CHANNEL_DOWN;
1552 vnet_ldc_reset(lc);
1558 hv_ldc_set_map_table(lc->lc_id, 0, 0);