Lines Matching defs:portp
94 static void vsw_port_read_bandwidth(vsw_port_t *portp, md_t *mdp,
96 static int vsw_port_read_props(vsw_port_t *portp, vsw_t *vswp,
156 extern void vsw_vlan_unaware_port_reset(vsw_port_t *portp);
162 extern void vsw_hio_port_update(vsw_port_t *portp, boolean_t hio_enabled);
165 extern void vsw_mac_port_reconfig_vlans(vsw_port_t *portp, uint16_t new_pvid,
172 extern void vsw_port_reset(vsw_port_t *portp);
1819 vsw_port_t *portp;
1840 portp = (vsw_port_t *)arg;
1841 vswp = portp->p_vswp;
1844 inst = portp->p_instance;
1901 vsw_port_read_bandwidth(vsw_port_t *portp, md_t *mdp, mde_cookie_t node,
1908 vswp = portp->p_vswp;
2450 vsw_port_read_props(vsw_port_t *portp, vsw_t *vswp,
2532 portp->p_vswp = vswp;
2533 portp->p_instance = inst;
2534 portp->addr_set = B_FALSE;
2535 ether_copy(&ea, &portp->p_macaddr);
2541 portp->num_ldcs = nchan;
2542 portp->ldc_ids =
2544 bcopy(&ldc_id, (portp->ldc_ids), sizeof (uint64_t) * nchan);
2547 vsw_vlan_read_ids(portp, VSW_VNETPORT, mdp, *node, &portp->pvid,
2548 &portp->vids, &portp->nvids, NULL);
2553 portp->p_hio_enabled = B_TRUE;
2555 portp->p_hio_enabled = B_FALSE;
2561 portp->p_hio_capable = B_FALSE;
2564 vsw_port_read_bandwidth(portp, mdp, *node, &portp->p_bandwidth);
2577 vsw_port_t *portp;
2580 portp = kmem_zalloc(sizeof (vsw_port_t), KM_SLEEP);
2582 rv = vsw_port_read_props(portp, vswp, mdp, node);
2584 kmem_free(portp, sizeof (*portp));
2588 rv = vsw_port_attach(portp);
2604 vsw_port_t *portp;
2636 portp = vsw_lookup_port(vswp, cport_num);
2637 if (portp == NULL) {
2643 vsw_vlan_read_ids(portp, VSW_VNETPORT, curr_mdp, curr_mdex, &pvid,
2647 if ((pvid != portp->pvid) || /* pvid changed? */
2648 (nvids != portp->nvids) || /* # of vids changed? */
2649 ((nvids != 0) && (portp->nvids != 0) && /* vids changed? */
2650 !vsw_cmp_vids(vids, portp->vids, nvids))) {
2660 if (portp->p_hio_enabled != hio_enabled) {
2665 vsw_port_read_bandwidth(portp, curr_mdp, curr_mdex, &maxbw);
2666 if (maxbw != portp->p_bandwidth) {
2673 vswp->instance, portp->p_instance, maxbw);
2679 vsw_vlan_remove_ids(portp, VSW_VNETPORT);
2682 vsw_mac_port_reconfig_vlans(portp, pvid, vids, nvids);
2685 vsw_vlan_add_ids(portp, VSW_VNETPORT);
2688 vsw_vlan_unaware_port_reset(portp);
2692 vsw_hio_port_update(portp, hio_enabled);
2696 vsw_update_bandwidth(NULL, portp, VSW_VNETPORT, maxbw);