summaryrefslogtreecommitdiffstats
path: root/src/vnet/dev/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/dev/port.c')
-rw-r--r--src/vnet/dev/port.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/dev/port.c b/src/vnet/dev/port.c
index 0363ea41b48..8a6df54cbc8 100644
--- a/src/vnet/dev/port.c
+++ b/src/vnet/dev/port.c
@@ -573,6 +573,7 @@ vnet_dev_port_if_create (vlib_main_t *vm, vnet_dev_port_t *port)
vnet_dev_driver_t *driver;
vnet_sw_interface_t *sw;
vnet_hw_interface_t *hw;
+ vnet_hw_if_caps_t caps = 0;
u32 rx_node_index;
driver = pool_elt_at_index (dm->drivers, dev->driver_index);
@@ -607,6 +608,14 @@ vnet_dev_port_if_create (vlib_main_t *vm, vnet_dev_port_t *port)
port->intf.tx_node_index = hw->tx_node_index;
+ caps |= port->attr.caps.interrupt_mode ? VNET_HW_IF_CAP_INT_MODE : 0;
+ caps |= port->attr.caps.mac_filter ? VNET_HW_IF_CAP_MAC_FILTER : 0;
+ caps |= port->attr.tx_offloads.tcp_gso ? VNET_HW_IF_CAP_TCP_GSO : 0;
+ caps |= port->attr.tx_offloads.ip4_cksum ? VNET_HW_IF_CAP_TX_CKSUM : 0;
+
+ if (caps)
+ vnet_hw_if_set_caps (vnm, port->intf.hw_if_index, caps);
+
/* create / reuse rx node */
if (vec_len (dm->free_rx_node_indices))
{