Lines Matching refs:desc_blk

168 	struct ether_desc_blk_str *desc_blk = ifnet_ether_blk_str(ifp);  in ether_del_proto()  local
172 if (desc_blk == NULL) { in ether_del_proto()
176 for (current = desc_blk->n_max_used; current > 0; current--) { in ether_del_proto()
177 if (desc_blk->block_ptr[current - 1].protocol_family == in ether_del_proto()
180 desc_blk->block_ptr[current - 1].type = 0; in ether_del_proto()
181 desc_blk->n_used--; in ether_del_proto()
185 if (desc_blk->n_used == 0) { in ether_del_proto()
186 u_int32_t size = desc_blk->n_count * sizeof(struct en_desc) + in ether_del_proto()
188 kfree_data(desc_blk, size); in ether_del_proto()
192 for (; desc_blk->n_max_used > 0 && in ether_del_proto()
193 desc_blk->block_ptr[desc_blk->n_max_used - 1].type == 0; in ether_del_proto()
194 desc_blk->n_max_used--) { in ether_del_proto()
207 struct ether_desc_blk_str *desc_blk = ifnet_ether_blk_str(ifp); in ether_add_proto_internal() local
236 if (desc_blk != NULL) { in ether_add_proto_internal()
239 for (i = 0; i < desc_blk->n_max_used; i++) { in ether_add_proto_internal()
240 if (desc_blk->block_ptr[i].type == in ether_add_proto_internal()
242 desc_blk->block_ptr[i].data[0] == in ether_add_proto_internal()
250 for (i = 0; i < desc_blk->n_max_used; i++) { in ether_add_proto_internal()
251 if (desc_blk->block_ptr[i].type == demux->type && in ether_add_proto_internal()
252 bcmp(desc_blk->block_ptr[i].data, in ether_add_proto_internal()
262 if (desc_blk == NULL || desc_blk->n_used == desc_blk->n_count) { in ether_add_proto_internal()
270 if (desc_blk) { in ether_add_proto_internal()
271 new_count += desc_blk->n_count; in ether_add_proto_internal()
272 old_size = desc_blk->n_count * sizeof(struct en_desc) + in ether_add_proto_internal()
274 i = desc_blk->n_used; in ether_add_proto_internal()
289 if (desc_blk) { in ether_add_proto_internal()
290 bcopy(desc_blk, tmp, old_size); in ether_add_proto_internal()
291 kfree_data(desc_blk, old_size); in ether_add_proto_internal()
293 desc_blk = tmp; in ether_add_proto_internal()
294 ifp->if_family_cookie = (uintptr_t)desc_blk; in ether_add_proto_internal()
295 desc_blk->n_count = new_count; in ether_add_proto_internal()
298 for (i = 0; i < desc_blk->n_count; i++) { in ether_add_proto_internal()
299 if (desc_blk->block_ptr[i].type == 0) { in ether_add_proto_internal()
306 if (i + 1 > desc_blk->n_max_used) { in ether_add_proto_internal()
307 desc_blk->n_max_used = i + 1; in ether_add_proto_internal()
310 ed = &desc_blk->block_ptr[i]; in ether_add_proto_internal()
336 desc_blk->n_used++; in ether_add_proto_internal()
456 struct ether_desc_blk_str *desc_blk = ifnet_ether_blk_str(ifp); in ether_demux() local
457 u_int32_t maxd = desc_blk ? desc_blk->n_max_used : 0; in ether_demux()
458 struct en_desc *ed = desc_blk ? desc_blk->block_ptr : NULL; in ether_demux()