Lines Matching refs:act

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()
70 const void *src = &act->mangle.val; in mtk_flow_offload_mangle_eth()
72 if (act->mangle.offset > 8) in mtk_flow_offload_mangle_eth()
75 if (act->mangle.mask == 0xffff) { in mtk_flow_offload_mangle_eth()
80 memcpy(dest, src, act->mangle.mask ? 2 : 4); in mtk_flow_offload_mangle_eth()
85 mtk_flow_mangle_ports(const struct flow_action_entry *act, in mtk_flow_mangle_ports() argument
88 u32 val = ntohl(act->mangle.val); in mtk_flow_mangle_ports()
90 switch (act->mangle.offset) { in mtk_flow_mangle_ports()
92 if (act->mangle.mask == ~htonl(0xffff)) in mtk_flow_mangle_ports()
108 mtk_flow_mangle_ipv4(const struct flow_action_entry *act, in mtk_flow_mangle_ipv4() argument
113 switch (act->mangle.offset) { in mtk_flow_mangle_ipv4()
124 memcpy(dest, &act->mangle.val, sizeof(u32)); in mtk_flow_mangle_ipv4()
176 struct flow_action_entry *act; in mtk_flow_offload_replace() local
218 flow_action_for_each(i, act, &rule->action) { in mtk_flow_offload_replace()
219 switch (act->id) { in mtk_flow_offload_replace()
221 if (act->mangle.htype == FLOW_ACT_MANGLE_HDR_TYPE_ETH) in mtk_flow_offload_replace()
222 mtk_flow_offload_mangle_eth(act, &data.eth); in mtk_flow_offload_replace()
225 odev = act->dev; in mtk_flow_offload_replace()
231 act->vlan.proto != htons(ETH_P_8021Q)) in mtk_flow_offload_replace()
234 data.vlan.id = act->vlan.vid; in mtk_flow_offload_replace()
235 data.vlan.proto = act->vlan.proto; in mtk_flow_offload_replace()
244 data.pppoe.sid = act->pppoe.sid; in mtk_flow_offload_replace()
291 flow_action_for_each(i, act, &rule->action) { in mtk_flow_offload_replace()
292 if (act->id != FLOW_ACTION_MANGLE) in mtk_flow_offload_replace()
295 switch (act->mangle.htype) { in mtk_flow_offload_replace()
298 err = mtk_flow_mangle_ports(act, &data); in mtk_flow_offload_replace()
301 err = mtk_flow_mangle_ipv4(act, &data); in mtk_flow_offload_replace()