linux/net/smc/smc_pnet.c
/* PNET table analysis for a given sock:
 * determine ib_device and port belonging to used internal TCP socket
 * ethernet interface.
 */
PNET table analysis for a given sock:
determine ib_device and port belonging to used internal TCP socket
ethernet interface.
PNET table analysis for a given sock : determine ib_device and port belonging to used internal TCP socket ethernet interface .
void smc_pnet_find_roce_resource(struct sock *sk,
				 struct smc_ib_device **smcibdev, u8 *ibport,
				 unsigned short vlan_id, u8 gid[])
{
	struct dst_entry *dst = sk_dst_get(sk);
	*smcibdev = NULL;
	*ibport = 0;
	if (!dst)
		goto out;
	if (!dst->dev)
		goto out_rel;
	smc_pnet_find_roce_by_pnetid(dst->dev, smcibdev, ibport, vlan_id, gid);
	if (*smcibdev)
		goto out_rel;
	smc_pnet_find_roce_by_table(dst->dev, smcibdev, ibport, vlan_id, gid);
out_rel:
	dst_release(dst);
out:
	return;
}
void smc_pnet_find_roce_resource ( struct sock * sk , struct smc_ib_device * * smcibdev , u8 * ibport , unsigned short vlan_id , u8 gid [ ] ) { struct dst_entry * dst = sk_dst_get ( sk ) ; * smcibdev = NULL ; * ibport = 0 ; if ( ! dst ) goto out ; if ( ! dst -> dev ) goto out_rel ; smc_pnet_find_roce_by_pnetid ( dst -> dev , smcibdev , ibport , vlan_id , gid ) ; if ( * smcibdev ) goto out_rel ; smc_pnet_find_roce_by_table ( dst -> dev , smcibdev , ibport , vlan_id , gid ) ; out_rel : dst_release ( dst ) ; out : return ; }
PNET table analysis for a given sock:
 determine ib_device and port belonging to used internal TCP socket
 ethernet interface.
PNET table analysis for a given sock : determine ib_device and port belonging to used internal TCP socket ethernet interface .
/* if possible, lookup via hardware-defined pnetid */ /* lookup via SMC PNET table */