# Not able to offload tc flows to hardware with Linux tc

**URL:** <https://forums.developer.nvidia.com/t/not-able-to-offload-tc-flows-to-hardware-with-linux-tc/207043>\
**Category:** Uncategorized\
**Created:** [September 30, 2018, 1:33pm UTC](https://forums.developer.nvidia.com/t/not-able-to-offload-tc-flows-to-hardware-with-linux-tc/207043 "2018-09-30T13:33:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sureshdh514](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sureshdh514](https://forums.developer.nvidia.com/u/sureshdh514)\
**Post date:** [September 30, 2018, 1:33pm UTC](https://forums.developer.nvidia.com/t/not-able-to-offload-tc-flows-to-hardware-with-linux-tc/207043/1 "2018-09-30T13:33:40Z")

</div>

I have a setup where I launched two SRIOV VMs by with Openstack(openstack + open contrail) and installed the OVS manually in the setup(Ubuntu 18.04). Following instructions provided in the [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) _[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)_ document to have tc flows installed on the ConnectX-4 Ln card. I enabled switchdev to get the representer(switchdev) netdevs for the corresponding VFs. I created a ovs bridge and attached the PF and representer(switchdev) netdevs in that bridge. When I ping one VM to the other VM the traffic always comes on to the representer(switchdev) netdevs, which it should not. I mean only the **arp** and **the first packet** should come on to the the representer(switchdev) netdevs and rest should flow through the network card and should not be visible on the representer(switchdev) netdevs. After debugging sometime, I saw status of ovsd and I could see that the following error is showing up in the status of ovsd. **ovs|00002|dpif\_netlink(handler20)|ERR|failed to offload flow: Invalid argument** and when I run **dmesg** I get the following error **[2117.205547] netlink: ‘ovs-vswitchd’: attribute type 5 has an invalid length**. Despite that error from the ovsd, the traffic still works but in software which I don’t wanted. Please suggest me a proper approach whether I am on the right path or anything needs to be done other than this.

Setup details:

* * *

OS: Ubuntu 18.04

Kernerl version: 4.15.0-20-generic

OVS version: 2.9.0

MLNX OFED version: 4.4-2.0.7

firmware-version: 14.23.1020 (MT\_2410110034)

Mellanox card: ConnectX-4 LN.

Please also note that in the ASAP2 document it mentions that the **firmware-version** should be **16.21.0338** for the same ConnectX-4 card. Should I need to update my firmware or any extra configuration needs to be done. If I have to update the update the firmware, what extra measures I need to take to make it successful. Thanks.

Message was edited by: Suresh Dharavath

---

<div class="post-metadata">

**Author:** ![riccardo.villa](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@riccardo.villa](https://forums.developer.nvidia.com/u/riccardo.villa)\
**Post date:** [October 9, 2018, 11:57am UTC](https://forums.developer.nvidia.com/t/not-able-to-offload-tc-flows-to-hardware-with-linux-tc/207043/2 "2018-10-09T11:57:00Z")

</div>

I am in the same situation…
