On 12/16/22 13:17, Miroslav Kubiczek via discuss wrote:
> Hello,
> 
> is it possible to have action in ovs flow to swap MAC addresses?
> Currently we have to preconfigure and manually set the addresses like this:
> 
> match=dl_vlan=400   
> actions=mod_vlan_vid:500,mod_dl_src:ee:10:10:10:10:10,mod_dl_dst:04:42:1a:55:80:09,IN_PORT`
> 
> Action to swap these two would be much better and would work for any mac.

You should be able to swap them using a register.  Something like this:

actions=move:OXM_OF_ETH_SRC[]->OXM_OF_PKT_REG0[0..47],move:OXM_OF_ETH_DST[]->OXM_OF_ETH_SRC[],move:OXM_OF_PKT_REG0[0..47]->OXM_OF_ETH_DST[]

Shorter form might also work:

actions=move:eth_src->xreg0[0..47],move:eth_dst->eth_src[],move:xreg0[0..47]->eth_dst[]

Best regards, Ilya Maximets.
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to