net/ice: unify bool type value
authorHaiyue Wang <haiyue.wang@intel.com>
Wed, 15 Jan 2020 00:50:26 +0000 (08:50 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:59:18 +0000 (19:59 +0100)
Replaces the redefined TRUE and FALSE values with standard ones to
match the 'bool' type definition.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/ice_ethdev.c
drivers/net/ice/ice_rxtx.c

index f99eb4e..8e9369e 100644 (file)
@@ -1720,7 +1720,7 @@ ice_pf_setup(struct ice_pf *pf)
        uint16_t unused;
 
        /* Clear all stats counters */
-       pf->offset_loaded = FALSE;
+       pf->offset_loaded = false;
        memset(&pf->stats, 0, sizeof(struct ice_hw_port_stats));
        memset(&pf->stats_offset, 0, sizeof(struct ice_hw_port_stats));
        memset(&pf->internal_stats, 0, sizeof(struct ice_eth_stats));
@@ -2234,16 +2234,16 @@ ice_dev_init(struct rte_eth_dev *dev)
        vsi = pf->main_vsi;
 
        /* Disable double vlan by default */
-       ice_vsi_config_double_vlan(vsi, FALSE);
+       ice_vsi_config_double_vlan(vsi, false);
 
-       ret = ice_aq_stop_lldp(hw, TRUE, FALSE, NULL);
+       ret = ice_aq_stop_lldp(hw, true, false, NULL);
        if (ret != ICE_SUCCESS)
                PMD_INIT_LOG(DEBUG, "lldp has already stopped\n");
-       ret = ice_init_dcb(hw, TRUE);
+       ret = ice_init_dcb(hw, true);
        if (ret != ICE_SUCCESS)
                PMD_INIT_LOG(DEBUG, "Failed to init DCB\n");
        /* Forward LLDP packets to default VSI */
-       ret = ice_vsi_config_sw_lldp(vsi, TRUE);
+       ret = ice_vsi_config_sw_lldp(vsi, true);
        if (ret != ICE_SUCCESS)
                PMD_INIT_LOG(DEBUG, "Failed to cfg lldp\n");
        /* register callback func to eal lib */
@@ -3449,23 +3449,23 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)
        rxmode = &dev->data->dev_conf.rxmode;
        if (mask & ETH_VLAN_FILTER_MASK) {
                if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
-                       ice_vsi_config_vlan_filter(vsi, TRUE);
+                       ice_vsi_config_vlan_filter(vsi, true);
                else
-                       ice_vsi_config_vlan_filter(vsi, FALSE);
+                       ice_vsi_config_vlan_filter(vsi, false);
        }
 
        if (mask & ETH_VLAN_STRIP_MASK) {
                if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
-                       ice_vsi_config_vlan_stripping(vsi, TRUE);
+                       ice_vsi_config_vlan_stripping(vsi, true);
                else
-                       ice_vsi_config_vlan_stripping(vsi, FALSE);
+                       ice_vsi_config_vlan_stripping(vsi, false);
        }
 
        if (mask & ETH_VLAN_EXTEND_MASK) {
                if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)
-                       ice_vsi_config_double_vlan(vsi, TRUE);
+                       ice_vsi_config_double_vlan(vsi, true);
                else
-                       ice_vsi_config_double_vlan(vsi, FALSE);
+                       ice_vsi_config_double_vlan(vsi, false);
        }
 
        return 0;
index 2fa737a..ce5b8e6 100644 (file)
@@ -424,7 +424,7 @@ ice_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
        /* Init the RX tail register. */
        ICE_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 
-       err = ice_switch_rx_queue(hw, rxq->reg_idx, TRUE);
+       err = ice_switch_rx_queue(hw, rxq->reg_idx, true);
        if (err) {
                PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
                            rx_queue_id);
@@ -450,7 +450,7 @@ ice_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
        if (rx_queue_id < dev->data->nb_rx_queues) {
                rxq = dev->data->rx_queues[rx_queue_id];
 
-               err = ice_switch_rx_queue(hw, rxq->reg_idx, FALSE);
+               err = ice_switch_rx_queue(hw, rxq->reg_idx, false);
                if (err) {
                        PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off",
                                    rx_queue_id);
@@ -630,7 +630,7 @@ ice_fdir_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
        /* Init the RX tail register. */
        ICE_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 
-       err = ice_switch_rx_queue(hw, rxq->reg_idx, TRUE);
+       err = ice_switch_rx_queue(hw, rxq->reg_idx, true);
        if (err) {
                PMD_DRV_LOG(ERR, "Failed to switch FDIR RX queue %u on",
                            rx_queue_id);
@@ -816,7 +816,7 @@ ice_fdir_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 
        rxq = pf->fdir.rxq;
 
-       err = ice_switch_rx_queue(hw, rxq->reg_idx, FALSE);
+       err = ice_switch_rx_queue(hw, rxq->reg_idx, false);
        if (err) {
                PMD_DRV_LOG(ERR, "Failed to switch FDIR RX queue %u off",
                            rx_queue_id);
@@ -970,7 +970,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
        }
 
        ice_reset_rx_queue(rxq);
-       rxq->q_set = TRUE;
+       rxq->q_set = true;
        dev->data->rx_queues[queue_idx] = rxq;
        rxq->rx_rel_mbufs = _ice_rx_queue_release_mbufs;
 
@@ -1183,7 +1183,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
        }
 
        ice_reset_tx_queue(txq);
-       txq->q_set = TRUE;
+       txq->q_set = true;
        dev->data->tx_queues[queue_idx] = txq;
        txq->tx_rel_mbufs = _ice_tx_queue_release_mbufs;
        ice_set_tx_function_flag(dev, txq);
@@ -2040,7 +2040,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
         * don't need to allocate software ring and reset for the fdir
         * program queue just set the queue has been configured.
         */
-       txq->q_set = TRUE;
+       txq->q_set = true;
        pf->fdir.txq = txq;
 
        txq->tx_rel_mbufs = _ice_tx_queue_release_mbufs;
@@ -2101,7 +2101,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
         * Don't need to allocate software ring and reset for the fdir
         * rx queue, just set the queue has been configured.
         */
-       rxq->q_set = TRUE;
+       rxq->q_set = true;
        pf->fdir.rxq = rxq;
 
        rxq->rx_rel_mbufs = _ice_rx_queue_release_mbufs;