net: add rte prefix to ether defines
[dpdk.git] / drivers / net / mlx5 / mlx5_nl.c
index 0ff9667..5773fa7 100644 (file)
@@ -80,7 +80,7 @@
 
 /* Add/remove MAC address through Netlink */
 struct mlx5_nl_mac_addr {
-       struct ether_addr (*mac)[];
+       struct rte_ether_addr (*mac)[];
        /**< MAC address handled by the device. */
        int mac_n; /**< Number of addresses in the array. */
 };
@@ -340,11 +340,11 @@ mlx5_nl_mac_addr_cb(struct nlmsghdr *nh, void *arg)
 #ifndef NDEBUG
                        char m[18];
 
-                       ether_format_addr(m, 18, RTA_DATA(attribute));
+                       rte_ether_format_addr(m, 18, RTA_DATA(attribute));
                        DRV_LOG(DEBUG, "bridge MAC address %s", m);
 #endif
                        memcpy(&(*data->mac)[data->mac_n++],
-                              RTA_DATA(attribute), ETHER_ADDR_LEN);
+                              RTA_DATA(attribute), RTE_ETHER_ADDR_LEN);
                }
        }
        return 0;
@@ -365,7 +365,7 @@ mlx5_nl_mac_addr_cb(struct nlmsghdr *nh, void *arg)
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-mlx5_nl_mac_addr_list(struct rte_eth_dev *dev, struct ether_addr (*mac)[],
+mlx5_nl_mac_addr_list(struct rte_eth_dev *dev, struct rte_ether_addr (*mac)[],
                      int *mac_n)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
@@ -424,7 +424,7 @@ error:
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
                        int add)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
@@ -433,7 +433,7 @@ mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct ether_addr *mac,
                struct nlmsghdr hdr;
                struct ndmsg ndm;
                struct rtattr rta;
-               uint8_t buffer[ETHER_ADDR_LEN];
+               uint8_t buffer[RTE_ETHER_ADDR_LEN];
        } req = {
                .hdr = {
                        .nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)),
@@ -449,7 +449,7 @@ mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct ether_addr *mac,
                },
                .rta = {
                        .rta_type = NDA_LLADDR,
-                       .rta_len = RTA_LENGTH(ETHER_ADDR_LEN),
+                       .rta_len = RTA_LENGTH(RTE_ETHER_ADDR_LEN),
                },
        };
        int fd;
@@ -459,7 +459,7 @@ mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct ether_addr *mac,
        if (priv->nl_socket_route == -1)
                return 0;
        fd = priv->nl_socket_route;
-       memcpy(RTA_DATA(&req.rta), mac, ETHER_ADDR_LEN);
+       memcpy(RTA_DATA(&req.rta), mac, RTE_ETHER_ADDR_LEN);
        req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
                RTA_ALIGN(req.rta.rta_len);
        ret = mlx5_nl_send(fd, &req.hdr, sn);
@@ -496,7 +496,7 @@ error:
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
                     uint32_t index)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
@@ -524,7 +524,7 @@ mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
                        uint32_t index)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
@@ -542,7 +542,7 @@ mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct ether_addr *mac,
 void
 mlx5_nl_mac_addr_sync(struct rte_eth_dev *dev)
 {
-       struct ether_addr macs[MLX5_MAX_MAC_ADDRESSES];
+       struct rte_ether_addr macs[MLX5_MAX_MAC_ADDRESSES];
        int macs_n = 0;
        int i;
        int ret;
@@ -555,14 +555,14 @@ mlx5_nl_mac_addr_sync(struct rte_eth_dev *dev)
 
                /* Verify the address is not in the array yet. */
                for (j = 0; j != MLX5_MAX_MAC_ADDRESSES; ++j)
-                       if (is_same_ether_addr(&macs[i],
+                       if (rte_is_same_ether_addr(&macs[i],
                                               &dev->data->mac_addrs[j]))
                                break;
                if (j != MLX5_MAX_MAC_ADDRESSES)
                        continue;
                /* Find the first entry available. */
                for (j = 0; j != MLX5_MAX_MAC_ADDRESSES; ++j) {
-                       if (is_zero_ether_addr(&dev->data->mac_addrs[j])) {
+                       if (rte_is_zero_ether_addr(&dev->data->mac_addrs[j])) {
                                dev->data->mac_addrs[j] = macs[i];
                                break;
                        }
@@ -583,7 +583,7 @@ mlx5_nl_mac_addr_flush(struct rte_eth_dev *dev)
        int i;
 
        for (i = MLX5_MAX_MAC_ADDRESSES - 1; i >= 0; --i) {
-               struct ether_addr *m = &dev->data->mac_addrs[i];
+               struct rte_ether_addr *m = &dev->data->mac_addrs[i];
 
                if (BITFIELD_ISSET(priv->mac_own, i))
                        mlx5_nl_mac_addr_remove(dev, m, i);