Lines Matching refs:dp

150 static int vsw_map_data(vsw_ldc_t *ldcp, dring_info_t *dp, void *pkt);
204 extern int vsw_reclaim_dring(dring_info_t *dp, int start);
208 extern int vsw_setup_tx_dring(vsw_ldc_t *ldcp, dring_info_t *dp);
2950 dring_info_t *dp = NULL;
2976 dp = vsw_map_dring(ldcp, (void *)tagp);
2977 if (dp == NULL) {
2985 rv = vsw_map_data(ldcp, dp, (void *)tagp);
2999 dring_info_t *dp;
3007 dp = ldcp->lane_out.dringp;
3010 dp->ident = ((vio_dring_reg_msg_t *)tagp)->dring_ident;
3032 dring_info_t *dp;
3054 dp = lane_in->dringp;
3056 VNET_DRING_REG_EXT_MSG_SIZE(dp->data_ncookies);
3515 dring_info_t *dp = NULL;
3624 if ((dp = ldcp->lane_out.dringp) == NULL) {
3629 len = dp->num_descriptors;
3638 if (idx != dp->last_ack_recv) {
3640 __func__, dp->last_ack_recv, idx);
3641 num = idx >= dp->last_ack_recv ?
3642 idx - dp->last_ack_recv + 1:
3643 (len - dp->last_ack_recv + 1) + idx;
3655 for (i = dp->last_ack_recv; j < num; i = (i + 1) % len, j++) {
3656 priv_addr = (vsw_private_desc_t *)dp->priv_addr + i;
3675 dp->last_ack_recv = (idx + 1) % dp->num_descriptors;
3699 if ((dp = ldcp->lane_out.dringp) == NULL) {
3704 priv_addr = (vsw_private_desc_t *)dp->priv_addr;
4038 dring_info_t *dp = NULL;
4070 if (((dp = ldcp->lane_out.dringp) != NULL) &&
4078 rc = vsw_reclaim_dring(dp, dp->end_idx);
4110 dring_info_t *dp = NULL;
4136 if ((dp = ldcp->lane_out.dringp) == NULL) {
4156 if (vsw_dring_find_free_desc(dp, &priv_desc, &idx) != 0) {
4159 "at 0x%llx", __func__, ldcp->ldc_id, dp);
4423 dring_info_t *dp;
4428 dp = kmem_zalloc(sizeof (dring_info_t), KM_SLEEP);
4429 mutex_init(&dp->dlock, NULL, MUTEX_DRIVER, NULL);
4430 mutex_init(&dp->restart_lock, NULL, MUTEX_DRIVER, NULL);
4431 ldcp->lane_out.dringp = dp;
4434 dp->pub_addr = NULL;
4435 dp->priv_addr = kmem_zalloc(
4437 dp->num_descriptors = vsw_num_descriptors;
4439 if (vsw_setup_tx_dring(ldcp, dp)) {
4446 dp->end_idx = 0;
4447 dp->restart_reqd = B_TRUE;
4479 dring_info_t *dp = NULL;
4487 dp = vsw_map_tx_dring(ldcp, pkt);
4493 dp = vsw_map_rx_dring(ldcp, pkt);
4495 return (dp);
4505 dring_info_t *dp;
4520 dp = kmem_zalloc(sizeof (dring_info_t), KM_SLEEP);
4522 dp->num_descriptors = dring_pkt->num_descriptors;
4523 dp->descriptor_size = dring_pkt->descriptor_size;
4524 dp->options = dring_pkt->options;
4525 dp->dring_ncookies = dring_pkt->ncookies;
4531 bcopy(&dring_pkt->cookie[0], &dp->dring_cookie[0],
4534 rv = ldc_mem_dring_map(ldcp->ldc_handle, &dp->dring_cookie[0],
4535 dp->dring_ncookies, dp->num_descriptors, dp->descriptor_size,
4536 LDC_DIRECT_MAP, &(dp->dring_handle));
4541 rv = ldc_mem_dring_info(dp->dring_handle, &minfo);
4546 dp->pub_addr = minfo.vaddr;
4549 dp->dring_mtype = minfo.mtype;
4552 dp->priv_addr = NULL;
4557 dp->ident = ldcp->next_ident;
4565 dring_pkt->dring_ident = dp->ident;
4567 return (dp);
4569 if (dp->dring_handle != NULL) {
4570 (void) ldc_mem_dring_unmap(dp->dring_handle);
4572 kmem_free(dp, sizeof (*dp));
4596 vsw_map_data(vsw_ldc_t *ldcp, dring_info_t *dp, void *pkt)
4615 dp->data_ncookies = emsg->data_ncookies;
4618 dp->data_sz = emsg->data_area_size;
4621 rv = ldc_mem_alloc_handle(ldcp->ldc_handle, &dp->data_handle);
4630 rv = ldc_mem_map(dp->data_handle, emsg->data_cookie,
4632 (caddr_t *)&dp->data_addr, NULL);
4641 rv = ldc_mem_info(dp->data_handle, &minfo);
4656 dp->data_cookie = kmem_zalloc(emsg->data_ncookies *
4660 bcopy(emsg->data_cookie, dp->data_cookie,