net/bnxt: use shorter SIMD initializers
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index 8133afc..361f995 100644 (file)
@@ -938,7 +938,7 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
                req.async_event_fwd[1] |=
                        rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_DBG_NOTIFICATION);
 
-       if (BNXT_VF_IS_TRUSTED(bp))
+       if (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))
                req.async_event_fwd[1] |=
                rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE);
 
@@ -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;
 }