linux/net/smc/smc_pnet.c
/* Lookup of coupled ib_device via SMC pnet table */
Lookup of coupled ib_device via SMC pnet table
Lookup of coupled ib_device via SMC pnet table
static void smc_pnet_find_roce_by_table(struct net_device *netdev,
					struct smc_ib_device **smcibdev,
					u8 *ibport, unsigned short vlan_id,
					u8 gid[])
{
	struct smc_pnetentry *pnetelem;
	read_lock(&smc_pnettable.lock);
	list_for_each_entry(pnetelem, &smc_pnettable.pnetlist, list) {
		if (netdev == pnetelem->ndev) {
			if (smc_ib_port_active(pnetelem->smcibdev,
					       pnetelem->ib_port) &&
			    !smc_ib_determine_gid(pnetelem->smcibdev,
						  pnetelem->ib_port, vlan_id,
						  gid, NULL)) {
				*smcibdev = pnetelem->smcibdev;
				*ibport = pnetelem->ib_port;
			}
			break;
		}
	}
	read_unlock(&smc_pnettable.lock);
}
static void smc_pnet_find_roce_by_table ( struct net_device * netdev , struct smc_ib_device * * smcibdev , u8 * ibport , unsigned short vlan_id , u8 gid [ ] ) { struct smc_pnetentry * pnetelem ; read_lock ( & smc_pnettable . lock ) ; list_for_each_entry ( pnetelem , & smc_pnettable . pnetlist , list ) { if ( netdev == pnetelem -> ndev ) { if ( smc_ib_port_active ( pnetelem -> smcibdev , pnetelem -> ib_port ) && ! smc_ib_determine_gid ( pnetelem -> smcibdev , pnetelem -> ib_port , vlan_id , gid , NULL ) ) { * smcibdev = pnetelem -> smcibdev ; * ibport = pnetelem -> ib_port ; } break ; } } read_unlock ( & smc_pnettable . lock ) ; }
Lookup of coupled ib_device via SMC pnet table
Lookup of coupled ib_device via SMC pnet table