src/dpdk/lib/librte_kni/rte_kni.c
static int
kni_config_mac_address(uint16_t port_id, uint8_t mac_addr[])
{
	int ret = 0;

	if (!rte_eth_dev_is_valid_port(port_id)) {
		RTE_LOG(ERR, KNI, "Invalid port id %d\n", port_id);
		return -EINVAL;
	}

	RTE_LOG(INFO, KNI, "Configure mac address of %d", port_id);

	ret = rte_eth_dev_default_mac_addr_set(port_id,
					(struct rte_ether_addr *)mac_addr);
	if (ret < 0)
		RTE_LOG(ERR, KNI, "Failed to config mac_addr for port %d\n",
			port_id);

	return ret;
}
/* default callback for request of configuring device mac address */
default callback for request of configuring device mac address
default callback for request of configuring device mac address
static int
kni_config_mac_address(uint16_t port_id, uint8_t mac_addr[])
{
	int ret = 0;
	if (!rte_eth_dev_is_valid_port(port_id)) {
		RTE_LOG(ERR, KNI, "Invalid port id %d\n", port_id);
		return -EINVAL;
	}
	RTE_LOG(INFO, KNI, "Configure mac address of %d", port_id);
	ret = rte_eth_dev_default_mac_addr_set(port_id,
					(struct rte_ether_addr *)mac_addr);
	if (ret < 0)
		RTE_LOG(ERR, KNI, "Failed to config mac_addr for port %d\n",
			port_id);
	return ret;
}
static int kni_config_mac_address ( uint16_t port_id , uint8_t mac_addr [ ] ) { int ret = 0 ; if ( ! rte_eth_dev_is_valid_port ( port_id ) ) { RTE_LOG ( ERR , KNI , " \n " , port_id ) ; return - EINVAL ; } RTE_LOG ( INFO , KNI , " " , port_id ) ; ret = rte_eth_dev_default_mac_addr_set ( port_id , ( struct rte_ether_addr * ) mac_addr ) ; if ( ret < 0 ) RTE_LOG ( ERR , KNI , " \n " , port_id ) ; return ret ; }
default callback for request of configuring device mac address
default callback for request of configuring device mac address