Lines Matching refs:unmatched
352 struct mlxsw_sp1_ptp_unmatched *unmatched; in mlxsw_sp1_ptp_unmatched_save() local
355 unmatched = kzalloc(sizeof(*unmatched), GFP_ATOMIC); in mlxsw_sp1_ptp_unmatched_save()
356 if (!unmatched) in mlxsw_sp1_ptp_unmatched_save()
359 unmatched->key = key; in mlxsw_sp1_ptp_unmatched_save()
360 unmatched->skb = skb; in mlxsw_sp1_ptp_unmatched_save()
361 unmatched->timestamp = timestamp; in mlxsw_sp1_ptp_unmatched_save()
362 unmatched->gc_cycle = mlxsw_sp->ptp_state->gc_cycle + cycles; in mlxsw_sp1_ptp_unmatched_save()
364 err = rhltable_insert(&ptp_state->unmatched_ht, &unmatched->ht_node, in mlxsw_sp1_ptp_unmatched_save()
367 kfree(unmatched); in mlxsw_sp1_ptp_unmatched_save()
376 struct mlxsw_sp1_ptp_unmatched *unmatched, *last = NULL; in mlxsw_sp1_ptp_unmatched_lookup() local
382 rhl_for_each_entry_rcu(unmatched, tmp, list, ht_node) { in mlxsw_sp1_ptp_unmatched_lookup()
383 last = unmatched; in mlxsw_sp1_ptp_unmatched_lookup()
393 struct mlxsw_sp1_ptp_unmatched *unmatched) in mlxsw_sp1_ptp_unmatched_remove() argument
396 &unmatched->ht_node, in mlxsw_sp1_ptp_unmatched_remove()
455 struct mlxsw_sp1_ptp_unmatched *unmatched) in mlxsw_sp1_ptp_unmatched_finish() argument
457 if (unmatched->skb && unmatched->timestamp) in mlxsw_sp1_ptp_unmatched_finish()
458 mlxsw_sp1_packet_timestamp(mlxsw_sp, unmatched->key, in mlxsw_sp1_ptp_unmatched_finish()
459 unmatched->skb, in mlxsw_sp1_ptp_unmatched_finish()
460 unmatched->timestamp); in mlxsw_sp1_ptp_unmatched_finish()
461 else if (unmatched->skb) in mlxsw_sp1_ptp_unmatched_finish()
462 mlxsw_sp1_ptp_packet_finish(mlxsw_sp, unmatched->skb, in mlxsw_sp1_ptp_unmatched_finish()
463 unmatched->key.local_port, in mlxsw_sp1_ptp_unmatched_finish()
464 unmatched->key.ingress, NULL); in mlxsw_sp1_ptp_unmatched_finish()
465 kfree_rcu(unmatched, rcu); in mlxsw_sp1_ptp_unmatched_finish()
470 struct mlxsw_sp1_ptp_unmatched *unmatched = ptr; in mlxsw_sp1_ptp_unmatched_free_fn() local
475 if (unmatched->skb) in mlxsw_sp1_ptp_unmatched_free_fn()
476 dev_kfree_skb_any(unmatched->skb); in mlxsw_sp1_ptp_unmatched_free_fn()
477 kfree_rcu(unmatched, rcu); in mlxsw_sp1_ptp_unmatched_free_fn()
484 struct mlxsw_sp1_ptp_unmatched *unmatched; in mlxsw_sp1_ptp_got_piece() local
492 unmatched = mlxsw_sp1_ptp_unmatched_lookup(mlxsw_sp, key, &length); in mlxsw_sp1_ptp_got_piece()
493 if (skb && unmatched && unmatched->timestamp) { in mlxsw_sp1_ptp_got_piece()
494 unmatched->skb = skb; in mlxsw_sp1_ptp_got_piece()
495 } else if (timestamp && unmatched && unmatched->skb) { in mlxsw_sp1_ptp_got_piece()
496 unmatched->timestamp = timestamp; in mlxsw_sp1_ptp_got_piece()
510 unmatched = NULL; in mlxsw_sp1_ptp_got_piece()
513 if (unmatched) { in mlxsw_sp1_ptp_got_piece()
514 err = mlxsw_sp1_ptp_unmatched_remove(mlxsw_sp, unmatched); in mlxsw_sp1_ptp_got_piece()
520 if (unmatched) in mlxsw_sp1_ptp_got_piece()
521 mlxsw_sp1_ptp_unmatched_finish(mlxsw_sp, unmatched); in mlxsw_sp1_ptp_got_piece()
616 struct mlxsw_sp1_ptp_unmatched *unmatched) in mlxsw_sp1_ptp_ht_gc_collect() argument
632 err = rhltable_remove(&ptp_state->unmatched_ht, &unmatched->ht_node, in mlxsw_sp1_ptp_ht_gc_collect()
640 mlxsw_sp_port = ptp_state->mlxsw_sp->ports[unmatched->key.local_port]; in mlxsw_sp1_ptp_ht_gc_collect()
642 stats = unmatched->key.ingress ? in mlxsw_sp1_ptp_ht_gc_collect()
645 if (unmatched->skb) in mlxsw_sp1_ptp_ht_gc_collect()
657 mlxsw_sp1_ptp_unmatched_finish(ptp_state->mlxsw_sp, unmatched); in mlxsw_sp1_ptp_ht_gc_collect()
666 struct mlxsw_sp1_ptp_unmatched *unmatched; in mlxsw_sp1_ptp_ht_gc() local
681 unmatched = obj; in mlxsw_sp1_ptp_ht_gc()
682 if (unmatched->gc_cycle <= gc_cycle) in mlxsw_sp1_ptp_ht_gc()
683 mlxsw_sp1_ptp_ht_gc_collect(ptp_state, unmatched); in mlxsw_sp1_ptp_ht_gc()