Lines Matching refs:ib1
149 switch (mtk_get_ib1_pkt_type(eth, e->ib1)) { in mtk_ppe_hash_entry()
187 int type = mtk_get_ib1_pkt_type(eth, entry->ib1); in mtk_foe_entry_l2()
201 int type = mtk_get_ib1_pkt_type(eth, entry->ib1); in mtk_foe_entry_ib2()
226 entry->ib1 = val; in mtk_foe_entry_prepare()
237 entry->ib1 = val; in mtk_foe_entry_prepare()
302 int type = mtk_get_ib1_pkt_type(eth, entry->ib1); in mtk_foe_entry_set_ipv4_tuple()
342 int type = mtk_get_ib1_pkt_type(eth, entry->ib1); in mtk_foe_entry_set_ipv6_tuple()
377 if (!(entry->ib1 & mtk_get_ib1_vlan_layer_mask(eth))) in mtk_foe_entry_set_dsa()
378 entry->ib1 |= mtk_prep_ib1_vlan_layer(eth, 1); in mtk_foe_entry_set_dsa()
382 entry->ib1 &= ~mtk_get_ib1_vlan_tag_mask(eth); in mtk_foe_entry_set_dsa()
392 switch (mtk_get_ib1_vlan_layer(eth, entry->ib1)) { in mtk_foe_entry_set_vlan()
394 entry->ib1 |= mtk_get_ib1_vlan_tag_mask(eth) | in mtk_foe_entry_set_vlan()
399 if (!(entry->ib1 & mtk_get_ib1_vlan_tag_mask(eth))) { in mtk_foe_entry_set_vlan()
404 entry->ib1 += mtk_prep_ib1_vlan_layer(eth, 1); in mtk_foe_entry_set_vlan()
417 if (!(entry->ib1 & mtk_get_ib1_vlan_layer_mask(eth)) || in mtk_foe_entry_set_pppoe()
418 (entry->ib1 & mtk_get_ib1_vlan_tag_mask(eth))) in mtk_foe_entry_set_pppoe()
421 entry->ib1 |= mtk_get_ib1_ppoe_mask(eth); in mtk_foe_entry_set_pppoe()
488 if ((data->ib1 ^ entry->data.ib1) & MTK_FOE_IB1_UDP) in mtk_flow_entry_match()
491 type = mtk_get_ib1_pkt_type(eth, entry->data.ib1); in mtk_flow_entry_match()
520 hwe->ib1 &= ~MTK_FOE_IB1_STATE; in __mtk_foe_entry_clear()
521 hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID); in __mtk_foe_entry_clear()
542 static int __mtk_foe_entry_idle_time(struct mtk_ppe *ppe, u32 ib1) in __mtk_foe_entry_idle_time() argument
546 u16 timestamp = ib1 & ib1_ts_mask; in __mtk_foe_entry_idle_time()
563 idle = __mtk_foe_entry_idle_time(ppe, entry->data.ib1); in mtk_flow_entry_update_l2()
566 u32 ib1; in mtk_flow_entry_update_l2() local
569 ib1 = READ_ONCE(hwe->ib1); in mtk_flow_entry_update_l2()
571 if (FIELD_GET(MTK_FOE_IB1_STATE, ib1) != MTK_FOE_STATE_BIND) { in mtk_flow_entry_update_l2()
577 cur_idle = __mtk_foe_entry_idle_time(ppe, ib1); in mtk_flow_entry_update_l2()
582 entry->data.ib1 &= ~ib1_ts_mask; in mtk_flow_entry_update_l2()
583 entry->data.ib1 |= ib1 & ib1_ts_mask; in mtk_flow_entry_update_l2()
610 entry->data.ib1 = foe.ib1; in mtk_flow_entry_update()
626 entry->ib1 &= ~MTK_FOE_IB1_BIND_TIMESTAMP_V2; in __mtk_foe_entry_commit()
627 entry->ib1 |= FIELD_PREP(MTK_FOE_IB1_BIND_TIMESTAMP_V2, in __mtk_foe_entry_commit()
630 entry->ib1 &= ~MTK_FOE_IB1_BIND_TIMESTAMP; in __mtk_foe_entry_commit()
631 entry->ib1 |= FIELD_PREP(MTK_FOE_IB1_BIND_TIMESTAMP, in __mtk_foe_entry_commit()
636 memcpy(&hwe->data, &entry->data, eth->soc->foe_entry_size - sizeof(hwe->ib1)); in __mtk_foe_entry_commit()
638 hwe->ib1 = entry->ib1; in __mtk_foe_entry_commit()
682 int type = mtk_get_ib1_pkt_type(ppe->eth, entry->data.ib1); in mtk_foe_entry_commit()
721 foe.ib1 &= ib1_mask; in mtk_foe_entry_commit_subflow()
722 foe.ib1 |= entry->data.ib1 & ~ib1_mask; in mtk_foe_entry_commit_subflow()
727 type = mtk_get_ib1_pkt_type(ppe->eth, foe.ib1); in mtk_foe_entry_commit_subflow()
752 if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND) in __mtk_ppe_check_skb()
757 if (unlikely(FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == in __mtk_ppe_check_skb()
821 return __mtk_foe_entry_idle_time(ppe, entry->data.ib1); in mtk_foe_entry_idle_time()
971 hwe->ib1 |= MTK_FOE_IB1_STATIC; in mtk_ppe_init_foe_table()
1087 hwe->ib1 = FIELD_PREP(MTK_FOE_IB1_STATE, in mtk_ppe_stop()