Not able to program the tc flows into the ConnectX-4 card.


We purchased ConnectX-4 Lx Mellanox cards. I wanted to configure the tc flow for vxlan type packets. I am following . 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 dst_ip 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 enc_dst_ip 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: & 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.


Hello Suresh,

Thank you for posting your question on the Mellanox Community.

Based on the information provided, we cannot determine the root cause of the issue you are experiencing.

As we only support ASAP2 on a limited collection of Operation Systems, please refer to the ASAP2 Release Notes ( ) to check, in section 1.1 and 1.2 the Software Requirements and Supported Operating Systems.

Also please note:

“In case of offloading VXLAN, the PF should not be added as a port in the OVS data-path but rather be assigned with the IP address to be used for encapsulation.”

If you want us to debug this issue further, we recommend to open a Mellanox Support case, by sending an email to

Thanks and regards,

~Mellanox Technical Support