Lines Matching refs:port_num
86 u16 usnic_transport_rsrv_port(enum usnic_transport_type type, u16 port_num) in usnic_transport_rsrv_port() argument
90 if (!port_num) { in usnic_transport_rsrv_port()
91 port_num = bitmap_find_next_zero_area(roce_bitmap, in usnic_transport_rsrv_port()
96 roce_next_port = (port_num & 4095) + 1; in usnic_transport_rsrv_port()
97 } else if (test_bit(port_num, roce_bitmap)) { in usnic_transport_rsrv_port()
103 bitmap_set(roce_bitmap, port_num, 1); in usnic_transport_rsrv_port()
111 usnic_dbg("Allocating port %hu for %s\n", port_num, in usnic_transport_rsrv_port()
113 return port_num; in usnic_transport_rsrv_port()
119 void usnic_transport_unrsrv_port(enum usnic_transport_type type, u16 port_num) in usnic_transport_unrsrv_port() argument
123 if (!port_num) { in usnic_transport_unrsrv_port()
129 if (!test_bit(port_num, roce_bitmap)) { in usnic_transport_unrsrv_port()
131 port_num, in usnic_transport_unrsrv_port()
135 bitmap_clear(roce_bitmap, port_num, 1); in usnic_transport_unrsrv_port()
136 usnic_dbg("Freeing port %hu for %s\n", port_num, in usnic_transport_unrsrv_port()
141 usnic_err("Freeing invalid port %hu for %d\n", port_num, type); in usnic_transport_unrsrv_port()