net/qede: fix default config option
[dpdk.git] / drivers / net / qede / qede_ethdev.c
index 4ef08ad..6f5ba2a 100644 (file)
@@ -457,6 +457,7 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
        if (IS_VF(edev)) {
                params.update_tx_switching_flg = 1;
                params.tx_switching_flg = !flg;
+               DP_INFO(edev, "VF tx-switching is disabled\n");
        }
 #endif
        for_each_hwfn(edev, i) {
@@ -469,8 +470,8 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
                        break;
                }
        }
-       DP_INFO(edev, "vport %s VF tx-switch %s\n", flg ? "activated" : "deactivated",
-                       params.tx_switching_flg ? "enabled" : "disabled");
+       DP_INFO(edev, "vport is %s\n", flg ? "activated" : "deactivated");
+
        return rc;
 }
 
@@ -631,12 +632,20 @@ qede_vxlan_enable(struct rte_eth_dev *eth_dev, uint8_t clss,
 
        for_each_hwfn(edev, i) {
                p_hwfn = &edev->hwfns[i];
-               p_ptt = IS_PF(edev) ? ecore_ptt_acquire(p_hwfn) : NULL;
+               if (IS_PF(edev)) {
+                       p_ptt = ecore_ptt_acquire(p_hwfn);
+                       if (!p_ptt)
+                               return -EAGAIN;
+               } else {
+                       p_ptt = NULL;
+               }
                rc = ecore_sp_pf_update_tunn_cfg(p_hwfn, p_ptt,
                                &tunn, ECORE_SPQ_MODE_CB, NULL);
                if (rc != ECORE_SUCCESS) {
                        DP_ERR(edev, "Failed to update tunn_clss %u\n",
                                        tunn.vxlan.tun_cls);
+                       if (IS_PF(edev))
+                               ecore_ptt_release(p_hwfn, p_ptt);
                        break;
                }
        }
@@ -2256,7 +2265,13 @@ qede_conf_udp_dst_port(struct rte_eth_dev *eth_dev,
                tunn.vxlan_port.port = udp_port;
                for_each_hwfn(edev, i) {
                        p_hwfn = &edev->hwfns[i];
-                       p_ptt = IS_PF(edev) ? ecore_ptt_acquire(p_hwfn) : NULL;
+                       if (IS_PF(edev)) {
+                               p_ptt = ecore_ptt_acquire(p_hwfn);
+                               if (!p_ptt)
+                                       return -EAGAIN;
+                       } else {
+                               p_ptt = NULL;
+                       }
                        rc = ecore_sp_pf_update_tunn_cfg(p_hwfn, p_ptt, &tunn,
                                                ECORE_SPQ_MODE_CB, NULL);
                        if (rc != ECORE_SUCCESS) {