# DPU / SmartNIC Integration & Hardware Offloading

<code class="expression">space.vars.product\_name</code> supports DPU / SmartNIC integration, to provide hardware acceleration by offloading network tasks to an attached NIC hardware, freeing up main server CPU. &#x20;

Hardware offload support makes use of SR-IOV as an underlying mechanism to accelerate the data path between a virtual machine and the NIC hardware. The NIC can also supports hardware offloading of tunnel encapsulation and de-encapsulation.

<code class="expression">space.vars.product\_name</code> leverages Open Virtual Network (OVN) behind the scenes, and in OVN, Layer 3 routing features are implemented as flow rules in Open vSwitch. This allows Layer 3 routing to also be offloaded to NICs with appropriate driver and firmware support.

This feature is not enabled by default. Contact your <code class="expression">space.vars.product\_name</code> support liaison to enable this feature for your deployment.

Once enabled, you can create a virtual machine and attach it to a hardware offloaded port.

```bash
##Create a hardware offloaded port
pcdctl port create --network my-network --vnic-type direct \
    --binding-profile '{"capabilities": ["switchdev"]}' direct_port1
    
##Create a VM using this port 
pcdctl server create --flavor my-flavor --key-name my-key \
    --nic port-id=direct_port1 my-vm     
```

#### Validate that traffic is offloaded

Once hardware offloading is enabled for a VM, you can use the [traffic control monitor](https://manpages.ubuntu.com/manpages/focal/man8/tc.8.html) command to observe updates to filters which is one of the mechanisms used to program the NIC switch hardware. Look for the ‘in\_hw’ and ‘not\_in\_hw’ labels.

```bash
sudo tc monitor
```
