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 <harish.patil@cavium.com>
This commit is contained in:
Harish Patil 2018-01-27 13:15:26 -08:00 committed by Ferruh Yigit
parent 92bed231a0
commit c8b34b7e9a

View File

@ -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],