+static int
+eth_dev_macaddr_set(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
+{
+ struct pmd_internals *internals = dev->data->dev_private;
+ struct ifreq ifr = { };
+ int sockfd = internals->rx_queue[0].sockfd;
+ int ret;
+
+ if (sockfd == -1) {
+ PMD_LOG(ERR, "receive socket not found");
+ return -EINVAL;
+ }
+
+ strlcpy(ifr.ifr_name, internals->if_name, IFNAMSIZ);
+ ifr.ifr_hwaddr.sa_family = ARPHRD_ETHER;
+ memcpy(ifr.ifr_hwaddr.sa_data, addr, sizeof(*addr));
+ ret = ioctl(sockfd, SIOCSIFHWADDR, &ifr);
+
+ if (ret < 0) {
+ PMD_LOG_ERRNO(ERR, "ioctl(SIOCSIFHWADDR) failed");
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int