net/qede: initialize VF tunnel as enabled on start
authorHarish Patil <harish.patil@cavium.com>
Sat, 27 Jan 2018 21:15:26 +0000 (13:15 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jan 2018 09:46:47 +0000 (10:46 +0100)
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>
drivers/net/qede/qede_ethdev.c

index 8d82661..8a69d20 100644 (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],