]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/bnxt/bnxt_hwrm.c
net/ice: fix SCTP RSS configuration
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index eef282b699ade173880fc501ce18f66ebebe410b..361f99536c6d864c04e352d06867a1eae613384a 100644 (file)
@@ -2742,11 +2742,10 @@ bnxt_free_tunnel_ports(struct bnxt *bp)
        if (bp->vxlan_port_cnt)
                bnxt_hwrm_tunnel_dst_port_free(bp, bp->vxlan_fw_dst_port_id,
                        HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN);
-       bp->vxlan_port = 0;
+
        if (bp->geneve_port_cnt)
                bnxt_hwrm_tunnel_dst_port_free(bp, bp->geneve_fw_dst_port_id,
                        HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE);
-       bp->geneve_port = 0;
 }
 
 void bnxt_free_all_hwrm_resources(struct bnxt *bp)
@@ -3809,6 +3808,18 @@ int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, uint16_t port,
        HWRM_CHECK_RESULT();
        HWRM_UNLOCK();
 
+       if (tunnel_type ==
+           HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN) {
+               bp->vxlan_port = 0;
+               bp->vxlan_port_cnt = 0;
+       }
+
+       if (tunnel_type ==
+           HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE) {
+               bp->geneve_port = 0;
+               bp->geneve_port_cnt = 0;
+       }
+
        return rc;
 }