net/qede: fix PF translation table release
authorRasesh Mody <rasesh.mody@cavium.com>
Tue, 7 Nov 2017 08:34:22 +0000 (00:34 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 7 Nov 2017 23:49:59 +0000 (00:49 +0100)
Appropriately release the ptt[PF translation table] handler that is
acquired in error case

Fixes: e0947ed912f7 ("net/qede: add support for VXLAN UDP port config over VF")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/qede_ethdev.c

index 4ef08ad..7a589a2 100644 (file)
@@ -637,6 +637,8 @@ qede_vxlan_enable(struct rte_eth_dev *eth_dev, uint8_t clss,
                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;
                }
        }