[dpdk-dev,5/8] net/qede: fix to release the acquired ptt

Message ID 1510043665-8160-6-git-send-email-rasesh.mody@cavium.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Mody, Rasesh Nov. 7, 2017, 8:34 a.m.
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 |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 4ef08ad..7a589a2 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -637,6 +637,8 @@  static void qede_set_ucast_cmn_params(struct ecore_filter_ucast *ucast)
 		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;
 		}
 	}