Lines Matching refs:unmatched

524 	struct mlxsw_sp1_ptp_unmatched *unmatched;  in mlxsw_sp1_ptp_unmatched_save()  local
527 unmatched = kzalloc(sizeof(*unmatched), GFP_ATOMIC); in mlxsw_sp1_ptp_unmatched_save()
528 if (!unmatched) in mlxsw_sp1_ptp_unmatched_save()
531 unmatched->key = key; in mlxsw_sp1_ptp_unmatched_save()
532 unmatched->skb = skb; in mlxsw_sp1_ptp_unmatched_save()
533 unmatched->timestamp = timestamp; in mlxsw_sp1_ptp_unmatched_save()
534 unmatched->gc_cycle = ptp_state->gc_cycle + cycles; in mlxsw_sp1_ptp_unmatched_save()
536 err = rhltable_insert(&ptp_state->unmatched_ht, &unmatched->ht_node, in mlxsw_sp1_ptp_unmatched_save()
539 kfree(unmatched); in mlxsw_sp1_ptp_unmatched_save()
549 struct mlxsw_sp1_ptp_unmatched *unmatched, *last = NULL; in mlxsw_sp1_ptp_unmatched_lookup() local
555 rhl_for_each_entry_rcu(unmatched, tmp, list, ht_node) { in mlxsw_sp1_ptp_unmatched_lookup()
556 last = unmatched; in mlxsw_sp1_ptp_unmatched_lookup()
566 struct mlxsw_sp1_ptp_unmatched *unmatched) in mlxsw_sp1_ptp_unmatched_remove() argument
571 &unmatched->ht_node, in mlxsw_sp1_ptp_unmatched_remove()
634 struct mlxsw_sp1_ptp_unmatched *unmatched) in mlxsw_sp1_ptp_unmatched_finish() argument
636 if (unmatched->skb && unmatched->timestamp) in mlxsw_sp1_ptp_unmatched_finish()
637 mlxsw_sp1_packet_timestamp(mlxsw_sp, unmatched->key, in mlxsw_sp1_ptp_unmatched_finish()
638 unmatched->skb, in mlxsw_sp1_ptp_unmatched_finish()
639 unmatched->timestamp); in mlxsw_sp1_ptp_unmatched_finish()
640 else if (unmatched->skb) in mlxsw_sp1_ptp_unmatched_finish()
641 mlxsw_sp1_ptp_packet_finish(mlxsw_sp, unmatched->skb, in mlxsw_sp1_ptp_unmatched_finish()
642 unmatched->key.local_port, in mlxsw_sp1_ptp_unmatched_finish()
643 unmatched->key.ingress, NULL); in mlxsw_sp1_ptp_unmatched_finish()
644 kfree_rcu(unmatched, rcu); in mlxsw_sp1_ptp_unmatched_finish()
649 struct mlxsw_sp1_ptp_unmatched *unmatched = ptr; in mlxsw_sp1_ptp_unmatched_free_fn() local
654 if (unmatched->skb) in mlxsw_sp1_ptp_unmatched_free_fn()
655 dev_kfree_skb_any(unmatched->skb); in mlxsw_sp1_ptp_unmatched_free_fn()
656 kfree_rcu(unmatched, rcu); in mlxsw_sp1_ptp_unmatched_free_fn()
664 struct mlxsw_sp1_ptp_unmatched *unmatched; in mlxsw_sp1_ptp_got_piece() local
672 unmatched = mlxsw_sp1_ptp_unmatched_lookup(mlxsw_sp, key, &length); in mlxsw_sp1_ptp_got_piece()
673 if (skb && unmatched && unmatched->timestamp) { in mlxsw_sp1_ptp_got_piece()
674 unmatched->skb = skb; in mlxsw_sp1_ptp_got_piece()
675 } else if (timestamp && unmatched && unmatched->skb) { in mlxsw_sp1_ptp_got_piece()
676 unmatched->timestamp = timestamp; in mlxsw_sp1_ptp_got_piece()
690 unmatched = NULL; in mlxsw_sp1_ptp_got_piece()
693 if (unmatched) { in mlxsw_sp1_ptp_got_piece()
694 err = mlxsw_sp1_ptp_unmatched_remove(mlxsw_sp, unmatched); in mlxsw_sp1_ptp_got_piece()
700 if (unmatched) in mlxsw_sp1_ptp_got_piece()
701 mlxsw_sp1_ptp_unmatched_finish(mlxsw_sp, unmatched); in mlxsw_sp1_ptp_got_piece()
795 struct mlxsw_sp1_ptp_unmatched *unmatched) in mlxsw_sp1_ptp_ht_gc_collect() argument
812 err = rhltable_remove(&ptp_state->unmatched_ht, &unmatched->ht_node, in mlxsw_sp1_ptp_ht_gc_collect()
820 mlxsw_sp_port = mlxsw_sp->ports[unmatched->key.local_port]; in mlxsw_sp1_ptp_ht_gc_collect()
822 stats = unmatched->key.ingress ? in mlxsw_sp1_ptp_ht_gc_collect()
825 if (unmatched->skb) in mlxsw_sp1_ptp_ht_gc_collect()
837 mlxsw_sp1_ptp_unmatched_finish(mlxsw_sp, unmatched); in mlxsw_sp1_ptp_ht_gc_collect()
846 struct mlxsw_sp1_ptp_unmatched *unmatched; in mlxsw_sp1_ptp_ht_gc() local
861 unmatched = obj; in mlxsw_sp1_ptp_ht_gc()
862 if (unmatched->gc_cycle <= gc_cycle) in mlxsw_sp1_ptp_ht_gc()
863 mlxsw_sp1_ptp_ht_gc_collect(ptp_state, unmatched); in mlxsw_sp1_ptp_ht_gc()