src/dpdk/drivers/net/sfc/sfc_sriov.c
static bool
sriov_mac_addr_assigned(const efx_vport_config_t *vport_config,
			unsigned int num, const uint8_t *mac_addr)
{
	unsigned int i;

	/* Check PF's MAC address as well as explained above */
	for (i = 0; i < num; ++i) {
		if (memcmp(mac_addr, vport_config[i].evc_mac_addr,
			   sizeof(vport_config[i].evc_mac_addr)) == 0)
			return true;
	}

	return false;
}
/*
 * Check if a MAC address is already assigned to one of previously
 * configured vPorts (either PF itself or one of already configured VFs).
 *
 * Typically the first vPort which corresponds to PF has globally
 * administered unicast address, but it still could be locally
 * administered if user assigned it or in the case of unconfigured NIC.
 * So, it is safer to include it as well in uniqueness check.
 */
Check if a MAC address is already assigned to one of previously
configured vPorts (either PF itself or one of already configured VFs).

Typically the first vPort which corresponds to PF has globally
administered unicast address, but it still could be locally
administered if user assigned it or in the case of unconfigured NIC.
So, it is safer to include it as well in uniqueness check.
Check if a MAC address is already assigned to one of previously configured vPorts ( either PF itself or one of already configured VFs ) . Typically the first vPort which corresponds to PF has globally administered unicast address but it still could be locally administered if user assigned it or in the case of unconfigured NIC . So it is safer to include it as well in uniqueness check .
static bool
sriov_mac_addr_assigned(const efx_vport_config_t *vport_config,
			unsigned int num, const uint8_t *mac_addr)
{
	unsigned int i;
	for (i = 0; i < num; ++i) {
		if (memcmp(mac_addr, vport_config[i].evc_mac_addr,
			   sizeof(vport_config[i].evc_mac_addr)) == 0)
			return true;
	}
	return false;
}
static bool sriov_mac_addr_assigned ( const efx_vport_config_t * vport_config , unsigned int num , const uint8_t * mac_addr ) { unsigned int i ; for ( i = 0 ; i < num ; ++ i ) { if ( memcmp ( mac_addr , vport_config [ i ] . evc_mac_addr , sizeof ( vport_config [ i ] . evc_mac_addr ) ) == 0 ) return true ; } return false ; }
Check if a MAC address is already assigned to one of previously
 configured vPorts (either PF itself or one of already configured VFs).
Check if a MAC address is already assigned to one of previously configured vPorts ( either PF itself or one of already configured VFs ) .
/* Check PF's MAC address as well as explained above */