net: add rte prefix to ether functions
[dpdk.git] / drivers / net / ipn3ke / ipn3ke_representor.c
index 3831982..b18d183 100644 (file)
@@ -21,6 +21,7 @@
 #include <ifpga_logs.h>
 
 #include "ipn3ke_rawdev_api.h"
+#include "ipn3ke_flow.h"
 #include "ipn3ke_logs.h"
 #include "ipn3ke_ethdev.h"
 
@@ -123,9 +124,10 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev)
        snprintf(attr_name, IPN3KE_RAWDEV_ATTR_LEN_MAX, "%s",
                        "LineSideBaseMAC");
        rawdev->dev_ops->attr_get(rawdev, attr_name, &base_mac);
-       ether_addr_copy((struct ether_addr *)&base_mac, &rpst->mac_addr);
+       rte_ether_addr_copy((struct rte_ether_addr *)&base_mac,
+                       &rpst->mac_addr);
 
-       ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
+       rte_ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
        dev->data->mac_addrs->addr_bytes[ETHER_ADDR_LEN - 1] =
                (uint8_t)rpst->port_id + 1;
 
@@ -649,19 +651,19 @@ ipn3ke_rpst_allmulticast_disable(struct rte_eth_dev *ethdev)
 
 int
 ipn3ke_rpst_mac_addr_set(struct rte_eth_dev *ethdev,
-                               struct ether_addr *mac_addr)
+                               struct rte_ether_addr *mac_addr)
 {
        struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev);
        struct ipn3ke_rpst *rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
        uint32_t val;
 
-       if (!is_valid_assigned_ether_addr(mac_addr)) {
+       if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
                IPN3KE_AFU_PMD_ERR("Tried to set invalid MAC address.");
                return -EINVAL;
        }
 
        if (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {
-               ether_addr_copy(&mac_addr[0], &rpst->mac_addr);
+               rte_ether_addr_copy(&mac_addr[0], &rpst->mac_addr);
 
                /* Set mac address */
                rte_memcpy(((char *)(&val)), &mac_addr[0], sizeof(uint32_t));
@@ -746,7 +748,7 @@ ipn3ke_afu_filter_ctrl(struct rte_eth_dev *ethdev,
                case RTE_ETH_FILTER_GENERIC:
                        if (filter_op != RTE_ETH_FILTER_GET)
                                return -EINVAL;
-                       *(const void **)arg = NULL;
+                       *(const void **)arg = &ipn3ke_flow_ops;
                        break;
                default:
                        IPN3KE_AFU_PMD_WARN("Filter type (%d) not supported",
@@ -801,6 +803,8 @@ static const struct eth_dev_ops ipn3ke_rpst_dev_ops = {
        .allmulticast_disable = ipn3ke_rpst_allmulticast_disable,
        .mac_addr_set         = ipn3ke_rpst_mac_addr_set,
        .mtu_set              = ipn3ke_rpst_mtu_set,
+
+       .tm_ops_get           = ipn3ke_tm_ops_get,
 };
 
 static uint16_t ipn3ke_rpst_recv_pkts(__rte_unused void *rx_q,
@@ -840,6 +844,9 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params)
                return -ENODEV;
        }
 
+       if (rpst->hw->tm_hw_enable)
+               ipn3ke_tm_init(rpst);
+
        /* Set representor device ops */
        ethdev->dev_ops = &ipn3ke_rpst_dev_ops;