From c8b34b7e9af93017747d758c64777450368384f7 Mon Sep 17 00:00:00 2001 From: Harish Patil Date: Sat, 27 Jan 2018 13:15:26 -0800 Subject: [PATCH] net/qede: initialize VF tunnel as enabled on start By default, the PF driver enables tunnel offload for its child VF. So mark tunnel offloads as enabled in the VF driver to reflect the actual state. Fixes: 52d94b57e1c7 ("net/qede: add slowpath support for VXLAN tunneling") Fixes: d378cefab84e ("net/qede: add support for GENEVE tunneling offload") Cc: stable@dpdk.org Signed-off-by: Harish Patil --- drivers/net/qede/qede_ethdev.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 8d826611cb..8a69d20177 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -3040,9 +3040,22 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) SLIST_INIT(&adapter->uc_list_head); adapter->mtu = ETHER_MTU; adapter->new_mtu = ETHER_MTU; - if (!is_vf) + if (!is_vf) { if (qede_start_vport(adapter, adapter->mtu)) return -1; + } else { + /* VF tunnel offloads is enabled by default in PF driver */ + adapter->vxlan.enable = true; + adapter->vxlan.num_filters = 0; + adapter->vxlan.filter_type = ETH_TUNNEL_FILTER_IMAC | + ETH_TUNNEL_FILTER_IVLAN; + adapter->vxlan.udp_port = QEDE_VXLAN_DEF_PORT; + adapter->geneve.enable = true; + adapter->vxlan.num_filters = 0; + adapter->vxlan.filter_type = ETH_TUNNEL_FILTER_IMAC | + ETH_TUNNEL_FILTER_IVLAN; + adapter->vxlan.udp_port = QEDE_GENEVE_DEF_PORT; + } DP_INFO(edev, "MAC address : %02x:%02x:%02x:%02x:%02x:%02x\n", adapter->primary_mac.addr_bytes[0], -- 2.20.1