Lines Matching refs:type

80 static int vsw_maccl_open(vsw_t *vswp, vsw_port_t *port, int type);
81 static void vsw_maccl_close(vsw_t *vswp, vsw_port_t *port, int type);
82 static void vsw_mac_multicast_add_all(vsw_t *vswp, vsw_port_t *portp, int type);
84 vsw_port_t *portp, int type);
90 static void vsw_maccl_set_bandwidth(vsw_t *vswp, vsw_port_t *port, int type,
94 static void vsw_notify_cb(void *arg, mac_notify_type_t type);
104 int type);
106 mcst_addr_t *mcst_p, int type);
107 int vsw_mac_client_init(vsw_t *vswp, vsw_port_t *port, int type);
108 void vsw_mac_client_cleanup(vsw_t *vswp, vsw_port_t *port, int type);
120 void vsw_update_bandwidth(vsw_t *vswp, vsw_port_t *port, int type,
130 extern uint32_t vsw_vlan_frame_untag(void *arg, int type, mblk_t **np,
140 #define WRITE_MACCL_ENTER(vswp, port, type) \
141 (type == VSW_LOCALDEV) ? rw_enter(&vswp->maccl_rwlock, RW_WRITER) :\
144 #define READ_MACCL_ENTER(vswp, port, type) \
145 (type == VSW_LOCALDEV) ? rw_enter(&vswp->maccl_rwlock, RW_READER) :\
148 #define RW_MACCL_EXIT(vswp, port, type) \
149 (type == VSW_LOCALDEV) ? rw_exit(&vswp->maccl_rwlock) : \
334 int type)
339 WRITE_MACCL_ENTER(vswp, port, type);
341 mch = (type == VSW_LOCALDEV) ? vswp->mch : port->p_mch;
350 RW_MACCL_EXIT(vswp, port, type);
356 RW_MACCL_EXIT(vswp, port, type);
365 int type)
369 WRITE_MACCL_ENTER(vswp, port, type);
370 mch = (type == VSW_LOCALDEV) ? vswp->mch : port->p_mch;
376 RW_MACCL_EXIT(vswp, port, type);
384 vsw_mac_multicast_add_all(vsw_t *vswp, vsw_port_t *portp, int type)
391 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
392 if (type == VSW_LOCALDEV) {
427 vsw_mac_multicast_remove_all(vsw_t *vswp, vsw_port_t *portp, int type)
433 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
434 if (type == VSW_LOCALDEV) {
460 vsw_update_bandwidth(vsw_t *vswp, vsw_port_t *port, int type, uint64_t maxbw)
462 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
464 WRITE_MACCL_ENTER(vswp, port, type);
465 vsw_maccl_set_bandwidth(vswp, port, type, maxbw);
466 RW_MACCL_EXIT(vswp, port, type);
477 vsw_mac_client_init(vsw_t *vswp, vsw_port_t *port, int type)
482 WRITE_MACCL_ENTER(vswp, port, type);
483 rv = vsw_maccl_open(vswp, port, type);
489 (void) vsw_set_hw(vswp, port, type);
490 vsw_mac_multicast_add_all(vswp, port, type);
492 RW_MACCL_EXIT(vswp, port, type);
516 vsw_maccl_open(vsw_t *vswp, vsw_port_t *port, int type)
535 mchp = (type == VSW_LOCALDEV) ? &vswp->mch : &port->p_mch;
542 if (type == VSW_VNETPORT) {
558 if (type != VSW_VNETPORT || !port->p_hio_enabled)
569 vsw_mac_client_cleanup(vsw_t *vswp, vsw_port_t *port, int type)
571 WRITE_MACCL_ENTER(vswp, port, type);
572 vsw_mac_multicast_remove_all(vswp, port, type);
573 vsw_unset_hw(vswp, port, type);
574 vsw_maccl_close(vswp, port, type);
575 RW_MACCL_EXIT(vswp, port, type);
582 vsw_maccl_close(vsw_t *vswp, vsw_port_t *port, int type)
586 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
588 mchp = (type == VSW_LOCALDEV) ? &vswp->mch : &port->p_mch;
624 vsw_set_hw(vsw_t *vswp, vsw_port_t *port, int type)
630 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
635 if (type == VSW_VNETPORT) {
657 vsw_unset_hw(vsw_t *vswp, vsw_port_t *port, int type)
661 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
666 if (type == VSW_VNETPORT) {
668 vsw_unset_hw_addr(vswp, port, type);
670 vsw_unset_hw_addr(vswp, NULL, type);
824 vsw_unset_hw_addr(vsw_t *vswp, vsw_port_t *port, int type)
832 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
834 if (type == VSW_VNETPORT) {
846 if (type == VSW_LOCALDEV) {
848 } else if (type == VSW_VNETPORT) {
862 if ((type == VSW_LOCALDEV) && (vswp->addr_set == B_TRUE)) {
869 } else if ((type == VSW_VNETPORT) && (port->addr_set == B_TRUE)) {
1223 arh->ar_hrd = htons(ARPHRD_ETHER); /* Hardware type: ethernet */
1224 arh->ar_pro = htons(ETHERTYPE_IP); /* Protocol type: IP */
1341 vsw_notify_cb(void *arg, mac_notify_type_t type)
1345 switch (type) {
1385 vsw_maccl_set_bandwidth(vsw_t *vswp, vsw_port_t *port, int type, uint64_t maxbw)
1392 ASSERT((type == VSW_LOCALDEV) || (type == VSW_VNETPORT));
1394 if (type == VSW_VNETPORT) {
1419 if (type == VSW_VNETPORT) {