Hi,
We purchased ConnectX-4 Lx Mellanox cards. I wanted to configure the tc flow for vxlan type packets. I am following https://www.mellanox.com/related-docs/prod_software/ASAP2_Hardware_Offloading_for_vSwitches_User_Manual_v4.4.pdf https://www.mellanox.com/related-docs/prod_software/ASAP2_Hardware_Offloading_for_vSwitches_User_Manual_v4.4.pdf . The document tries to program tc flows between the PF and representer netdevs. I was able program the flow from representer netdev to PF(encapsulation flow) but when I try to program the tc flow from PF to representer netdev(decapsulation flow), it fails with the following error. RTNETLINK answers: Invalid argument We have an error talking to the kernel. I tried looking at the dmesg logs and journalctl -r but in vain. Below are the commands that I tried.
representer netdev to PF: tc filter add dev enp6s0_1 protocol 0x806 parent ffff: flower skip_sw src_mac 36:ca:3d:75:01:f6 dst_mac 56:9a:db:7c:4c:25 action tunnel_key set src_ip 192.168.6.61 dst_ip 192.168.6.9 id 98 action mirred egress redirect dev enp6s0
PF to representer netdev: tc filter add dev enp6s0 protocol 0x806 parent ffff: flower skip_sw dst_mac 36:ca:3d:75:01:f6 src_mac 56:9a:db:7c:4c:25 enc_src_ip 192.168.6.9 enc_dst_ip 192.168.6.61 enc_key_id 98 enc_dst_port 4789 action tunnel_key unset action mirred egress redirect dev enp6s0_1
I enabled the switchdev-mode, basic-enacp & transport-inlink.
I am assuming there is no need of explicit vxlan type interface to be created in the host. Can any one please point me what field I am missing to program the flow or why the flows is failing. It is extremely painful as the tc logs doesn’t give any information.
The command details as follows:
192.168.6.9 & 192.168.6.61 are my underlay network ips.
enp6s0 - PF
enp6s0_1 - representer netdev
src_mac & dst_mac : underlay networks macs if PF to rpresentor netdev else overlay VM macs.
Thanks.