Lines Matching refs:eth
15 struct ethhdr eth; member
52 mtk_eth_timestamp(struct mtk_eth *eth) in mtk_eth_timestamp() argument
54 return mtk_r32(eth, 0x0010) & MTK_FOE_IB1_BIND_TIMESTAMP; in mtk_eth_timestamp()
67 mtk_flow_offload_mangle_eth(const struct flow_action_entry *act, void *eth) in mtk_flow_offload_mangle_eth() argument
69 void *dest = eth + act->mangle.offset; in mtk_flow_offload_mangle_eth()
151 mtk_flow_set_output_device(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_output_device() argument
160 if (dev == eth->netdev[0]) in mtk_flow_set_output_device()
162 else if (dev == eth->netdev[1]) in mtk_flow_set_output_device()
173 mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f) in mtk_flow_offload_replace() argument
189 if (rhashtable_lookup(ð->flow_table, &f->cookie, mtk_flow_ht_params)) in mtk_flow_offload_replace()
222 mtk_flow_offload_mangle_eth(act, &data.eth); in mtk_flow_offload_replace()
260 if (!is_valid_ether_addr(data.eth.h_source) || in mtk_flow_offload_replace()
261 !is_valid_ether_addr(data.eth.h_dest)) in mtk_flow_offload_replace()
265 data.eth.h_source, in mtk_flow_offload_replace()
266 data.eth.h_dest); in mtk_flow_offload_replace()
329 err = mtk_flow_set_output_device(eth, &foe, odev); in mtk_flow_offload_replace()
338 timestamp = mtk_eth_timestamp(eth); in mtk_flow_offload_replace()
339 hash = mtk_foe_entry_commit(ð->ppe, &foe, timestamp); in mtk_flow_offload_replace()
346 err = rhashtable_insert_fast(ð->flow_table, &entry->node, in mtk_flow_offload_replace()
353 mtk_foe_entry_clear(ð->ppe, hash); in mtk_flow_offload_replace()
360 mtk_flow_offload_destroy(struct mtk_eth *eth, struct flow_cls_offload *f) in mtk_flow_offload_destroy() argument
364 entry = rhashtable_lookup(ð->flow_table, &f->cookie, in mtk_flow_offload_destroy()
369 mtk_foe_entry_clear(ð->ppe, entry->hash); in mtk_flow_offload_destroy()
370 rhashtable_remove_fast(ð->flow_table, &entry->node, in mtk_flow_offload_destroy()
378 mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f) in mtk_flow_offload_stats() argument
384 entry = rhashtable_lookup(ð->flow_table, &f->cookie, in mtk_flow_offload_stats()
389 timestamp = mtk_foe_entry_timestamp(ð->ppe, entry->hash); in mtk_flow_offload_stats()
393 idle = mtk_eth_timestamp(eth) - timestamp; in mtk_flow_offload_stats()
407 struct mtk_eth *eth = mac->hw; in mtk_eth_setup_tc_block_cb() local
419 err = mtk_flow_offload_replace(eth, cls); in mtk_eth_setup_tc_block_cb()
422 err = mtk_flow_offload_destroy(eth, cls); in mtk_eth_setup_tc_block_cb()
425 err = mtk_flow_offload_stats(eth, cls); in mtk_eth_setup_tc_block_cb()
440 struct mtk_eth *eth = mac->hw; in mtk_eth_setup_tc_block() local
445 if (!eth->ppe.foe_table) in mtk_eth_setup_tc_block()
492 int mtk_eth_offload_init(struct mtk_eth *eth) in mtk_eth_offload_init() argument
494 if (!eth->ppe.foe_table) in mtk_eth_offload_init()
497 return rhashtable_init(ð->flow_table, &mtk_flow_ht_params); in mtk_eth_offload_init()