Lines Matching defs:vnic

76  * vnic identity descriptor to be sent with different flag settings.
87 eib_fip_login(eib_t *ss, eib_vnic_t *vnic, int *err)
97 "vnic login request");
102 ret = eib_fip_make_login(ss, vnic, swqe, err);
108 ret = eib_fip_send_login(ss, vnic, swqe, err);
114 ret = eib_vnic_wait_for_login_ack(ss, vnic, err);
124 eib_fip_vhub_table(eib_t *ss, eib_vnic_t *vnic, int *err)
139 ret = eib_fip_make_table(ss, vnic, swqe, err);
145 ret = eib_fip_send_table(ss, vnic, swqe, err);
151 ret = eib_vnic_wait_for_table(ss, vnic, err);
158 * the vnic login state would be set to EIB_LOGIN_TBL_FAILED.
160 * table and vhub update structures and reset the vnic state
163 eib_vnic_fini_tables(ss, vnic, B_FALSE);
164 mutex_enter(&vnic->vn_lock);
165 vnic->vn_state = EIB_LOGIN_ACK_RCVD;
166 mutex_exit(&vnic->vn_lock);
174 eib_fip_heartbeat(eib_t *ss, eib_vnic_t *vnic, int *err)
192 ret = eib_fip_make_ka(ss, vnic, swqe, err);
196 ret = eib_fip_send_ka(ss, vnic, swqe, err);
208 eib_fip_logout(eib_t *ss, eib_vnic_t *vnic, int *err)
214 * This routine is only called after the vnic has successfully
229 ret = eib_fip_make_logout(ss, vnic, swqe, err);
235 ret = eib_fip_send_logout(ss, vnic, swqe, err);
348 * Note that we'll return the vnic id as-is. The msb is not actually
349 * part of the vnic id in our internal records, so we'll mask it out
397 eib_fip_parse_ctl_pkt(uint8_t *pkt, eib_vnic_t *vnic)
399 eib_t *ss = vnic->vn_ss;
424 mutex_enter(&vnic->vn_lock);
425 vnic_state = vnic->vn_state;
426 mutex_exit(&vnic->vn_lock);
439 "eib_fip_parse_ctl_pkt: unexpected vnic state "
445 ret = eib_fip_parse_vhub_update(pkt, vnic);
452 "eib_fip_parse_ctl_pkt: unexpected vnic state "
458 ret = eib_fip_parse_vhub_table(pkt, vnic);
469 * be updated if the vnic's vhub table has been fully
477 vnic->vn_vhub_table->tb_eport_state;
486 eib_fip_make_login(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
547 iba->ia_qpn = htonl(vnic->vn_data_chan->ch_qpn);
570 * the mac address and a VLAN (tagless, actually). For this vnic
573 * need to clear the vnic id's most significant bit for those that
577 if (vnic->vn_instance == 0) {
578 vlg->vl_vnic_id = htons(vnic->vn_id);
579 flags_vlan = vnic->vn_vlan & FIP_VL_VLAN_MASK;
581 vlg->vl_vnic_id = htons(vnic->vn_id | FIP_VL_VNIC_ID_MSBIT);
582 flags_vlan = (vnic->vn_vlan & FIP_VL_VLAN_MASK) |
585 if (vnic->vn_vlan & FIP_VL_VLAN_MASK)
590 bcopy(vnic->vn_macaddr, vlg->vl_mac, ETHERADDRL);
603 htonl(vnic->vn_ctl_chan->ch_qpn & FIP_VL_CTL_QPN_MASK);
606 * Try to set as unique a name as possible for this vnic
609 "eoib_%02x_%02x", ss->ei_instance, vnic->vn_instance);
621 eib_fip_make_update(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int req,
682 flags_vhub_id = vnic->vn_login_data.ld_vhub_id;
683 if (vnic->vn_login_data.ld_vlan_in_packets) {
694 htonl(vnic->vn_vhub_table->tb_tusn) : 0;
696 vid->vi_vnic_id = htons(vnic->vn_login_data.ld_vnic_id);
697 bcopy(vnic->vn_login_data.ld_assigned_mac, vid->vi_mac, ETHERADDRL);
702 bcopy(vnic->vn_login_data.ld_vnic_name, vid->vi_vnic_name,
715 eib_fip_make_table(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
717 return (eib_fip_make_update(ss, vnic, swqe, EIB_UPD_REQ_TABLE, err));
721 eib_fip_make_ka(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
723 return (eib_fip_make_update(ss, vnic, swqe, EIB_UPD_REQ_KA, err));
727 eib_fip_make_logout(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
729 return (eib_fip_make_update(ss, vnic, swqe, EIB_UPD_REQ_LOGOUT, err));
733 eib_fip_send_login(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
773 mutex_enter(&vnic->vn_lock);
776 mutex_exit(&vnic->vn_lock);
779 "ibt_post_send() failed for vnic id 0x%x, ret=%d",
780 vnic->vn_id, ret);
783 vnic->vn_state = EIB_LOGIN_ACK_WAIT;
789 mutex_exit(&vnic->vn_lock);
795 eib_fip_send_update(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe,
798 eib_login_data_t *ld = &vnic->vn_login_data;
799 eib_chan_t *chan = vnic->vn_ctl_chan;
835 mutex_enter(&vnic->vn_lock);
838 mutex_exit(&vnic->vn_lock);
841 "ibt_post_send() failed for vnic id 0x%x, ret=%d",
842 vnic->vn_id, ret);
845 vnic->vn_state = nxt_state;
851 mutex_exit(&vnic->vn_lock);
857 eib_fip_send_table(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
859 return (eib_fip_send_update(ss, vnic, swqe, EIB_LOGIN_TBL_WAIT, err));
863 eib_fip_send_ka(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
865 return (eib_fip_send_update(ss, vnic, swqe, EIB_LOGIN_DONE, err));
869 eib_fip_send_logout(eib_t *ss, eib_vnic_t *vnic, eib_wqe_t *swqe, int *err)
871 return (eib_fip_send_update(ss, vnic, swqe, EIB_LOGOUT_DONE, err));
875 eib_fip_parse_vhub_table(uint8_t *pkt, eib_vnic_t *vnic)
881 eib_t *ss = vnic->vn_ss;
882 eib_login_data_t *ld = &vnic->vn_login_data;
883 eib_vhub_table_t *etbl = vnic->vn_vhub_table;
884 eib_vhub_update_t *eupd = vnic->vn_vhub_update;
901 "vhub table missing for vnic id 0x%x", vnic->vn_id);
934 * Verify that the vhub id is ok for this vnic
969 mutex_enter(&vnic->vn_lock);
970 vnic->vn_state = EIB_LOGIN_TBL_INPROG;
971 mutex_exit(&vnic->vn_lock);
1075 eib_fip_queue_gw_entry(vnic, etbl, tusn, FIP_EPORT_UP);
1087 eib_vnic_vhub_table_done(vnic, EIB_LOGIN_TBL_DONE);
1093 eib_vnic_vhub_table_done(vnic, EIB_LOGIN_TBL_FAILED);
1098 eib_fip_parse_vhub_update(uint8_t *pkt, eib_vnic_t *vnic)
1104 eib_t *ss = vnic->vn_ss;
1105 eib_login_data_t *ld = &vnic->vn_login_data;
1106 eib_vhub_table_t *etbl = vnic->vn_vhub_table;
1107 eib_vhub_update_t *eupd = vnic->vn_vhub_update;
1122 "vhub table missing for vnic id 0x%x", vnic->vn_id);
1126 mutex_enter(&vnic->vn_lock);
1127 vhub_tbl_done = ((vnic->vn_state == EIB_LOGIN_TBL_DONE) ||
1128 (vnic->vn_state == EIB_LOGIN_DONE)) ? B_TRUE : B_FALSE;
1129 mutex_exit(&vnic->vn_lock);
1162 * Verify that the vhub id is ok for this vnic and save the eport state
1199 * EoIB expects only type 0 (vnic address) entries to maintain the
1207 * now received a notice to remove a vnic entry from it, do it.
1325 * processed, treat them like regular vnic addresses.
1379 eib_fip_queue_gw_entry(eib_vnic_t *vnic, eib_vhub_table_t *tbl, uint32_t tusn,
1382 eib_t *ss = vnic->vn_ss;
1384 eib_login_data_t *ld = &vnic->vn_login_data;
1480 * vnic entry updates