ethdev: fix Rx/Tx spelling
[dpdk.git] / lib / ethdev / rte_ethdev.c
index 2426946..f344da8 100644 (file)
@@ -50,10 +50,10 @@ struct rte_eth_fp_ops rte_eth_fp_ops[RTE_MAX_ETHPORTS];
 /* spinlock for eth device callbacks */
 static rte_spinlock_t eth_dev_cb_lock = RTE_SPINLOCK_INITIALIZER;
 
-/* spinlock for add/remove rx callbacks */
+/* spinlock for add/remove Rx callbacks */
 static rte_spinlock_t eth_dev_rx_cb_lock = RTE_SPINLOCK_INITIALIZER;
 
-/* spinlock for add/remove tx callbacks */
+/* spinlock for add/remove Tx callbacks */
 static rte_spinlock_t eth_dev_tx_cb_lock = RTE_SPINLOCK_INITIALIZER;
 
 /* spinlock for shared data allocation */
@@ -121,7 +121,6 @@ static const struct {
        RTE_RX_OFFLOAD_BIT2STR(HEADER_SPLIT),
        RTE_RX_OFFLOAD_BIT2STR(VLAN_FILTER),
        RTE_RX_OFFLOAD_BIT2STR(VLAN_EXTEND),
-       RTE_RX_OFFLOAD_BIT2STR(JUMBO_FRAME),
        RTE_RX_OFFLOAD_BIT2STR(SCATTER),
        RTE_RX_OFFLOAD_BIT2STR(TIMESTAMP),
        RTE_RX_OFFLOAD_BIT2STR(SECURITY),
@@ -1294,7 +1293,7 @@ eth_dev_validate_offloads(uint16_t port_id, uint64_t req_offloads,
 
        while (offloads_diff != 0) {
                /* Check if any offload is requested but not enabled. */
-               offload = 1ULL << __builtin_ctzll(offloads_diff);
+               offload = RTE_BIT64(__builtin_ctzll(offloads_diff));
                if (offload & req_offloads) {
                        RTE_ETHDEV_LOG(ERR,
                                "Port %u failed to enable %s offload %s\n",
@@ -1315,6 +1314,60 @@ eth_dev_validate_offloads(uint16_t port_id, uint64_t req_offloads,
        return ret;
 }
 
+static uint32_t
+eth_dev_get_overhead_len(uint32_t max_rx_pktlen, uint16_t max_mtu)
+{
+       uint32_t overhead_len;
+
+       if (max_mtu != UINT16_MAX && max_rx_pktlen > max_mtu)
+               overhead_len = max_rx_pktlen - max_mtu;
+       else
+               overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+       return overhead_len;
+}
+
+/* rte_eth_dev_info_get() should be called prior to this function */
+static int
+eth_dev_validate_mtu(uint16_t port_id, struct rte_eth_dev_info *dev_info,
+               uint16_t mtu)
+{
+       uint32_t overhead_len;
+       uint32_t frame_size;
+
+       if (mtu < dev_info->min_mtu) {
+               RTE_ETHDEV_LOG(ERR,
+                       "MTU (%u) < device min MTU (%u) for port_id %u\n",
+                       mtu, dev_info->min_mtu, port_id);
+               return -EINVAL;
+       }
+       if (mtu > dev_info->max_mtu) {
+               RTE_ETHDEV_LOG(ERR,
+                       "MTU (%u) > device max MTU (%u) for port_id %u\n",
+                       mtu, dev_info->max_mtu, port_id);
+               return -EINVAL;
+       }
+
+       overhead_len = eth_dev_get_overhead_len(dev_info->max_rx_pktlen,
+                       dev_info->max_mtu);
+       frame_size = mtu + overhead_len;
+       if (frame_size < RTE_ETHER_MIN_LEN) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Frame size (%u) < min frame size (%u) for port_id %u\n",
+                       frame_size, RTE_ETHER_MIN_LEN, port_id);
+               return -EINVAL;
+       }
+
+       if (frame_size > dev_info->max_rx_pktlen) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Frame size (%u) > device max frame size (%u) for port_id %u\n",
+                       frame_size, dev_info->max_rx_pktlen, port_id);
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
 int
 rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
                      const struct rte_eth_conf *dev_conf)
@@ -1322,7 +1375,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
        struct rte_eth_dev *dev;
        struct rte_eth_dev_info dev_info;
        struct rte_eth_conf orig_conf;
-       uint16_t overhead_len;
        int diag;
        int ret;
        uint16_t old_mtu;
@@ -1371,13 +1423,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
        if (ret != 0)
                goto rollback;
 
-       /* Get the real Ethernet overhead length */
-       if (dev_info.max_mtu != UINT16_MAX &&
-           dev_info.max_rx_pktlen > dev_info.max_mtu)
-               overhead_len = dev_info.max_rx_pktlen - dev_info.max_mtu;
-       else
-               overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
-
        /* If number of queues specified by application for both Rx and Tx is
         * zero, use driver preferred values. This cannot be done individually
         * as it is valid for either Tx or Rx (but not both) to be zero.
@@ -1395,7 +1440,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 
        if (nb_rx_q > RTE_MAX_QUEUES_PER_PORT) {
                RTE_ETHDEV_LOG(ERR,
-                       "Number of RX queues requested (%u) is greater than max supported(%d)\n",
+                       "Number of Rx queues requested (%u) is greater than max supported(%d)\n",
                        nb_rx_q, RTE_MAX_QUEUES_PER_PORT);
                ret = -EINVAL;
                goto rollback;
@@ -1403,15 +1448,15 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 
        if (nb_tx_q > RTE_MAX_QUEUES_PER_PORT) {
                RTE_ETHDEV_LOG(ERR,
-                       "Number of TX queues requested (%u) is greater than max supported(%d)\n",
+                       "Number of Tx queues requested (%u) is greater than max supported(%d)\n",
                        nb_tx_q, RTE_MAX_QUEUES_PER_PORT);
                ret = -EINVAL;
                goto rollback;
        }
 
        /*
-        * Check that the numbers of RX and TX queues are not greater
-        * than the maximum number of RX and TX queues supported by the
+        * Check that the numbers of Rx and Tx queues are not greater
+        * than the maximum number of Rx and Tx queues supported by the
         * configured device.
         */
        if (nb_rx_q > dev_info.max_rx_queues) {
@@ -1444,50 +1489,32 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
                goto rollback;
        }
 
-       /*
-        * If jumbo frames are enabled, check that the maximum RX packet
-        * length is supported by the configured device.
-        */
-       if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-               if (dev_conf->rxmode.max_rx_pkt_len > dev_info.max_rx_pktlen) {
-                       RTE_ETHDEV_LOG(ERR,
-                               "Ethdev port_id=%u max_rx_pkt_len %u > max valid value %u\n",
-                               port_id, dev_conf->rxmode.max_rx_pkt_len,
-                               dev_info.max_rx_pktlen);
-                       ret = -EINVAL;
-                       goto rollback;
-               } else if (dev_conf->rxmode.max_rx_pkt_len < RTE_ETHER_MIN_LEN) {
-                       RTE_ETHDEV_LOG(ERR,
-                               "Ethdev port_id=%u max_rx_pkt_len %u < min valid value %u\n",
-                               port_id, dev_conf->rxmode.max_rx_pkt_len,
-                               (unsigned int)RTE_ETHER_MIN_LEN);
-                       ret = -EINVAL;
-                       goto rollback;
-               }
+       if (dev_conf->rxmode.mtu == 0)
+               dev->data->dev_conf.rxmode.mtu = RTE_ETHER_MTU;
 
-               /* Scale the MTU size to adapt max_rx_pkt_len */
-               dev->data->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len -
-                               overhead_len;
-       } else {
-               uint16_t pktlen = dev_conf->rxmode.max_rx_pkt_len;
-               if (pktlen < RTE_ETHER_MIN_MTU + overhead_len ||
-                   pktlen > RTE_ETHER_MTU + overhead_len)
-                       /* Use default value */
-                       dev->data->dev_conf.rxmode.max_rx_pkt_len =
-                                               RTE_ETHER_MTU + overhead_len;
-       }
+       ret = eth_dev_validate_mtu(port_id, &dev_info,
+                       dev->data->dev_conf.rxmode.mtu);
+       if (ret != 0)
+               goto rollback;
+
+       dev->data->mtu = dev->data->dev_conf.rxmode.mtu;
 
        /*
         * If LRO is enabled, check that the maximum aggregated packet
         * size is supported by the configured device.
         */
        if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_TCP_LRO) {
+               uint32_t max_rx_pktlen;
+               uint32_t overhead_len;
+
+               overhead_len = eth_dev_get_overhead_len(dev_info.max_rx_pktlen,
+                               dev_info.max_mtu);
+               max_rx_pktlen = dev->data->dev_conf.rxmode.mtu + overhead_len;
                if (dev_conf->rxmode.max_lro_pkt_size == 0)
-                       dev->data->dev_conf.rxmode.max_lro_pkt_size =
-                               dev->data->dev_conf.rxmode.max_rx_pkt_len;
+                       dev->data->dev_conf.rxmode.max_lro_pkt_size = max_rx_pktlen;
                ret = eth_dev_check_lro_pkt_size(port_id,
                                dev->data->dev_conf.rxmode.max_lro_pkt_size,
-                               dev->data->dev_conf.rxmode.max_rx_pkt_len,
+                               max_rx_pktlen,
                                dev_info.max_lro_pkt_size);
                if (ret != 0)
                        goto rollback;
@@ -1544,7 +1571,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
        }
 
        /*
-        * Setup new number of RX/TX queues and reconfigure device.
+        * Setup new number of Rx/Tx queues and reconfigure device.
         */
        diag = eth_dev_rx_queue_config(dev, nb_rx_q);
        if (diag != 0) {
@@ -1660,7 +1687,7 @@ eth_dev_mac_restore(struct rte_eth_dev *dev,
                        pool_mask = dev->data->mac_pool_sel[i];
 
                        do {
-                               if (pool_mask & 1ULL)
+                               if (pool_mask & UINT64_C(1))
                                        (*dev->dev_ops->mac_addr_add)(dev,
                                                addr, i, pool);
                                pool_mask >>= 1;
@@ -1866,6 +1893,12 @@ rte_eth_dev_close(uint16_t port_id)
        RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
        dev = &rte_eth_devices[port_id];
 
+       if (dev->data->dev_started) {
+               RTE_ETHDEV_LOG(ERR, "Cannot close started device (port %u)\n",
+                              port_id);
+               return -EINVAL;
+       }
+
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP);
        *lasterr = (*dev->dev_ops->dev_close)(dev);
        if (*lasterr != 0)
@@ -1942,7 +1975,7 @@ rte_eth_rx_queue_check_split(const struct rte_eth_rxseg_split *rx_seg,
         * for each segment specified in extended configuration.
         */
        mp_first = rx_seg[0].mp;
-       offset_mask = (1u << seg_capa->offset_align_log2) - 1;
+       offset_mask = RTE_BIT32(seg_capa->offset_align_log2) - 1;
        for (seg_idx = 0; seg_idx < n_seg; seg_idx++) {
                struct rte_mempool *mpl = rx_seg[seg_idx].mp;
                uint32_t length = rx_seg[seg_idx].length;
@@ -2008,7 +2041,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (rx_queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", rx_queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", rx_queue_id);
                return -EINVAL;
        }
 
@@ -2146,13 +2179,20 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
         * If LRO is enabled, check that the maximum aggregated packet
         * size is supported by the configured device.
         */
+       /* Get the real Ethernet overhead length */
        if (local_conf.offloads & DEV_RX_OFFLOAD_TCP_LRO) {
+               uint32_t overhead_len;
+               uint32_t max_rx_pktlen;
+               int ret;
+
+               overhead_len = eth_dev_get_overhead_len(dev_info.max_rx_pktlen,
+                               dev_info.max_mtu);
+               max_rx_pktlen = dev->data->mtu + overhead_len;
                if (dev->data->dev_conf.rxmode.max_lro_pkt_size == 0)
-                       dev->data->dev_conf.rxmode.max_lro_pkt_size =
-                               dev->data->dev_conf.rxmode.max_rx_pkt_len;
-               int ret = eth_dev_check_lro_pkt_size(port_id,
+                       dev->data->dev_conf.rxmode.max_lro_pkt_size = max_rx_pktlen;
+               ret = eth_dev_check_lro_pkt_size(port_id,
                                dev->data->dev_conf.rxmode.max_lro_pkt_size,
-                               dev->data->dev_conf.rxmode.max_rx_pkt_len,
+                               max_rx_pktlen,
                                dev_info.max_lro_pkt_size);
                if (ret != 0)
                        return ret;
@@ -2186,7 +2226,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (rx_queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", rx_queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", rx_queue_id);
                return -EINVAL;
        }
 
@@ -2258,7 +2298,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (tx_queue_id >= dev->data->nb_tx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", tx_queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u\n", tx_queue_id);
                return -EINVAL;
        }
 
@@ -2352,7 +2392,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (tx_queue_id >= dev->data->nb_tx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", tx_queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u\n", tx_queue_id);
                return -EINVAL;
        }
 
@@ -3394,7 +3434,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
        dev_info->rx_desc_lim = lim;
        dev_info->tx_desc_lim = lim;
        dev_info->device = dev->device;
-       dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+       dev_info->min_mtu = RTE_ETHER_MIN_LEN - RTE_ETHER_HDR_LEN -
+               RTE_ETHER_CRC_LEN;
        dev_info->max_mtu = UINT16_MAX;
 
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);
@@ -3420,6 +3461,26 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
        return 0;
 }
 
+int
+rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf)
+{
+       struct rte_eth_dev *dev;
+
+       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+       dev = &rte_eth_devices[port_id];
+
+       if (dev_conf == NULL) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Cannot get ethdev port %u configuration to NULL\n",
+                       port_id);
+               return -EINVAL;
+       }
+
+       memcpy(dev_conf, &dev->data->dev_conf, sizeof(struct rte_eth_conf));
+
+       return 0;
+}
+
 int
 rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
                                 uint32_t *ptypes, int num)
@@ -3629,12 +3690,13 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
                if (ret != 0)
                        return ret;
 
-               if (mtu < dev_info.min_mtu || mtu > dev_info.max_mtu)
-                       return -EINVAL;
+               ret = eth_dev_validate_mtu(port_id, &dev_info, mtu);
+               if (ret != 0)
+                       return ret;
        }
 
        ret = (*dev->dev_ops->mtu_set)(dev, mtu);
-       if (!ret)
+       if (ret == 0)
                dev->data->mtu = mtu;
 
        return eth_err(port_id, ret);
@@ -3674,9 +3736,9 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
                vbit = vlan_id % 64;
 
                if (on)
-                       vfc->ids[vidx] |= UINT64_C(1) << vbit;
+                       vfc->ids[vidx] |= RTE_BIT64(vbit);
                else
-                       vfc->ids[vidx] &= ~(UINT64_C(1) << vbit);
+                       vfc->ids[vidx] &= ~RTE_BIT64(vbit);
        }
 
        return eth_err(port_id, ret);
@@ -3948,7 +4010,7 @@ eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,
        for (i = 0; i < reta_size; i++) {
                idx = i / RTE_RETA_GROUP_SIZE;
                shift = i % RTE_RETA_GROUP_SIZE;
-               if ((reta_conf[idx].mask & (1ULL << shift)) &&
+               if ((reta_conf[idx].mask & RTE_BIT64(shift)) &&
                        (reta_conf[idx].reta[shift] >= max_rxq)) {
                        RTE_ETHDEV_LOG(ERR,
                                "reta_conf[%u]->reta[%u]: %u exceeds the maximum rxq index: %u\n",
@@ -4287,7 +4349,7 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *addr,
                pool_mask = dev->data->mac_pool_sel[index];
 
                /* Check if both MAC address and pool is already there, and do nothing */
-               if (pool_mask & (1ULL << pool))
+               if (pool_mask & RTE_BIT64(pool))
                        return 0;
        }
 
@@ -4299,7 +4361,7 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *addr,
                rte_ether_addr_copy(addr, &dev->data->mac_addrs[index]);
 
                /* Update pool bitmap in NIC data structure */
-               dev->data->mac_pool_sel[index] |= (1ULL << pool);
+               dev->data->mac_pool_sel[index] |= RTE_BIT64(pool);
        }
 
        return eth_err(port_id, ret);
@@ -4715,13 +4777,13 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
        dev = &rte_eth_devices[port_id];
 
        if (!dev->intr_handle) {
-               RTE_ETHDEV_LOG(ERR, "RX Intr handle unset\n");
+               RTE_ETHDEV_LOG(ERR, "Rx Intr handle unset\n");
                return -ENOTSUP;
        }
 
        intr_handle = dev->intr_handle;
        if (!intr_handle->intr_vec) {
-               RTE_ETHDEV_LOG(ERR, "RX Intr vector unset\n");
+               RTE_ETHDEV_LOG(ERR, "Rx Intr vector unset\n");
                return -EPERM;
        }
 
@@ -4730,7 +4792,7 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
                rc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);
                if (rc && rc != -EEXIST) {
                        RTE_ETHDEV_LOG(ERR,
-                               "p %u q %u rx ctl error op %d epfd %d vec %u\n",
+                               "p %u q %u Rx ctl error op %d epfd %d vec %u\n",
                                port_id, qid, op, epfd, vec);
                }
        }
@@ -4751,18 +4813,18 @@ rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id)
        dev = &rte_eth_devices[port_id];
 
        if (queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", queue_id);
                return -1;
        }
 
        if (!dev->intr_handle) {
-               RTE_ETHDEV_LOG(ERR, "RX Intr handle unset\n");
+               RTE_ETHDEV_LOG(ERR, "Rx Intr handle unset\n");
                return -1;
        }
 
        intr_handle = dev->intr_handle;
        if (!intr_handle->intr_vec) {
-               RTE_ETHDEV_LOG(ERR, "RX Intr vector unset\n");
+               RTE_ETHDEV_LOG(ERR, "Rx Intr vector unset\n");
                return -1;
        }
 
@@ -4937,18 +4999,18 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", queue_id);
                return -EINVAL;
        }
 
        if (!dev->intr_handle) {
-               RTE_ETHDEV_LOG(ERR, "RX Intr handle unset\n");
+               RTE_ETHDEV_LOG(ERR, "Rx Intr handle unset\n");
                return -ENOTSUP;
        }
 
        intr_handle = dev->intr_handle;
        if (!intr_handle->intr_vec) {
-               RTE_ETHDEV_LOG(ERR, "RX Intr vector unset\n");
+               RTE_ETHDEV_LOG(ERR, "Rx Intr vector unset\n");
                return -EPERM;
        }
 
@@ -4956,7 +5018,7 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
        rc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);
        if (rc && rc != -EEXIST) {
                RTE_ETHDEV_LOG(ERR,
-                       "p %u q %u rx ctl error op %d epfd %d vec %u\n",
+                       "p %u q %u Rx ctl error op %d epfd %d vec %u\n",
                        port_id, queue_id, op, epfd, vec);
                return rc;
        }
@@ -5234,7 +5296,7 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", queue_id);
                return -EINVAL;
        }
 
@@ -5279,7 +5341,7 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (queue_id >= dev->data->nb_tx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u\n", queue_id);
                return -EINVAL;
        }
 
@@ -5324,7 +5386,7 @@ rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", queue_id);
                return -EINVAL;
        }
 
@@ -5351,7 +5413,7 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
        dev = &rte_eth_devices[port_id];
 
        if (queue_id >= dev->data->nb_tx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u\n", queue_id);
                return -EINVAL;
        }