Lines Matching refs:tc_port_matchall

179 	struct cxgb4_tc_port_matchall *tc_port_matchall;  in cxgb4_matchall_alloc_tc()  local
187 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_alloc_tc()
214 tc_port_matchall->egress.hwtc = e->idx; in cxgb4_matchall_alloc_tc()
215 tc_port_matchall->egress.cookie = cls->cookie; in cxgb4_matchall_alloc_tc()
216 tc_port_matchall->egress.state = CXGB4_MATCHALL_STATE_ENABLED; in cxgb4_matchall_alloc_tc()
226 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_free_tc() local
230 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_free_tc()
232 cxgb4_sched_class_free(dev, tc_port_matchall->egress.hwtc); in cxgb4_matchall_free_tc()
234 tc_port_matchall->egress.hwtc = SCHED_CLS_NONE; in cxgb4_matchall_free_tc()
235 tc_port_matchall->egress.cookie = 0; in cxgb4_matchall_free_tc()
236 tc_port_matchall->egress.state = CXGB4_MATCHALL_STATE_DISABLED; in cxgb4_matchall_free_tc()
243 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_mirror_alloc() local
250 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_mirror_alloc()
260 tc_port_matchall->ingress.viid_mirror = pi->viid_mirror; in cxgb4_matchall_mirror_alloc()
270 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_mirror_free() local
274 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_mirror_free()
275 if (!tc_port_matchall->ingress.viid_mirror) in cxgb4_matchall_mirror_free()
279 tc_port_matchall->ingress.viid_mirror = 0; in cxgb4_matchall_mirror_free()
284 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_del_filter() local
289 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_del_filter()
290 ret = cxgb4_del_filter(dev, tc_port_matchall->ingress.tid[filter_type], in cxgb4_matchall_del_filter()
291 &tc_port_matchall->ingress.fs[filter_type]); in cxgb4_matchall_del_filter()
295 tc_port_matchall->ingress.tid[filter_type] = 0; in cxgb4_matchall_del_filter()
304 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_add_filter() local
322 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_add_filter()
323 fs = &tc_port_matchall->ingress.fs[filter_type]; in cxgb4_matchall_add_filter()
343 tc_port_matchall->ingress.tid[filter_type] = fidx; in cxgb4_matchall_add_filter()
350 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_alloc_filter() local
355 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_alloc_filter()
367 tc_port_matchall->ingress.state = CXGB4_MATCHALL_STATE_ENABLED; in cxgb4_matchall_alloc_filter()
380 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_free_filter() local
386 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_free_filter()
396 tc_port_matchall->ingress.packets = 0; in cxgb4_matchall_free_filter()
397 tc_port_matchall->ingress.bytes = 0; in cxgb4_matchall_free_filter()
398 tc_port_matchall->ingress.last_used = 0; in cxgb4_matchall_free_filter()
399 tc_port_matchall->ingress.state = CXGB4_MATCHALL_STATE_DISABLED; in cxgb4_matchall_free_filter()
408 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_tc_matchall_replace() local
413 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_tc_matchall_replace()
415 if (tc_port_matchall->ingress.state == in cxgb4_tc_matchall_replace()
431 if (tc_port_matchall->egress.state == CXGB4_MATCHALL_STATE_ENABLED) { in cxgb4_tc_matchall_replace()
448 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_tc_matchall_destroy() local
452 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_tc_matchall_destroy()
459 tc_port_matchall->ingress.fs[0].tc_cookie) in cxgb4_tc_matchall_destroy()
465 if (cls_matchall->cookie != tc_port_matchall->egress.cookie) in cxgb4_tc_matchall_destroy()
476 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_tc_matchall_stats() local
483 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_tc_matchall_stats()
484 if (tc_port_matchall->ingress.state == CXGB4_MATCHALL_STATE_DISABLED) in cxgb4_tc_matchall_stats()
487 ingress = &tc_port_matchall->ingress; in cxgb4_tc_matchall_stats()
499 if (tc_port_matchall->ingress.packets != packets) { in cxgb4_tc_matchall_stats()
501 bytes - tc_port_matchall->ingress.bytes, in cxgb4_tc_matchall_stats()
502 packets - tc_port_matchall->ingress.packets, in cxgb4_tc_matchall_stats()
503 0, tc_port_matchall->ingress.last_used, in cxgb4_tc_matchall_stats()
506 tc_port_matchall->ingress.packets = packets; in cxgb4_tc_matchall_stats()
507 tc_port_matchall->ingress.bytes = bytes; in cxgb4_tc_matchall_stats()
508 tc_port_matchall->ingress.last_used = jiffies; in cxgb4_tc_matchall_stats()
516 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_matchall_disable_offload() local
520 tc_port_matchall = &adap->tc_matchall->port_matchall[pi->port_id]; in cxgb4_matchall_disable_offload()
521 if (tc_port_matchall->egress.state == CXGB4_MATCHALL_STATE_ENABLED) in cxgb4_matchall_disable_offload()
524 if (tc_port_matchall->ingress.state == CXGB4_MATCHALL_STATE_ENABLED) in cxgb4_matchall_disable_offload()
530 struct cxgb4_tc_port_matchall *tc_port_matchall; in cxgb4_init_tc_matchall() local
538 tc_port_matchall = kcalloc(adap->params.nports, in cxgb4_init_tc_matchall()
539 sizeof(*tc_port_matchall), in cxgb4_init_tc_matchall()
541 if (!tc_port_matchall) { in cxgb4_init_tc_matchall()
546 tc_matchall->port_matchall = tc_port_matchall; in cxgb4_init_tc_matchall()