Lines Matching refs:pnetid
75 /* Check if the pnetid is set */
76 bool smc_pnet_is_pnetid_set(u8 *pnetid)
78 if (pnetid[0] == 0 || pnetid[0] == _S)
98 /* Remove a pnetid from the pnet table.
125 "pnetid %.16s\n",
146 ibdev->pnetid[ibport]))) {
149 "pnetid %.16s\n",
152 ibdev->pnetid[ibport]);
153 memset(ibdev->pnetid[ibport], 0,
166 smc_pnet_match(pnet_name, smcd_dev->pnetid))) {
168 "erased user defined pnetid "
170 smcd_dev->pnetid);
171 memset(smcd_dev->pnetid, 0, SMC_MAX_PNETID_LEN);
202 "user defined pnetid %.16s\n",
233 "user defined pnetid %.16s\n",
243 /* Apply pnetid to ib device when no pnetid is set.
251 if (!smc_pnet_is_pnetid_set(ib_dev->pnetid[ib_port - 1])) {
252 memcpy(ib_dev->pnetid[ib_port - 1], pnet_name,
261 /* Apply pnetid to smcd device when no pnetid is set.
268 if (!smc_pnet_is_pnetid_set(smcd_dev->pnetid)) {
269 memcpy(smcd_dev->pnetid, pnet_name, SMC_MAX_PNETID_LEN);
277 /* The limit for pnetid is 16 characters.
282 static bool smc_pnetid_valid(const char *pnet_name, char *pnetid)
297 *pnetid++ = islower(*bf) ? toupper(*bf) : *bf;
300 *pnetid = '\0';
351 /* check if (base) netdev already has a pnetid. If there is one, we do
393 "applied user defined pnetid %.16s\n",
413 /* try to apply the pnetid to active devices */
419 "applied user defined pnetid "
422 ib_dev->pnetid[ib_port - 1]);
429 "applied user defined pnetid "
431 smcd_dev->pnetid);
433 /* Apply fails when a device has a hardware-defined pnetid set, do not
467 /* Append a pnetid to the end of the pnet table if not already on this list.
594 u32 seq, u8 *pnetid, int start_idx)
608 if (pnetid && !smc_pnet_match(pnetelem->pnet_name, pnetid))
717 bool smc_pnet_is_ndev_pnetid(struct net *net, u8 *pnetid)
725 if (smc_pnet_match(pnetid, pe->pnetid)) {
736 static int smc_pnet_add_pnetid(struct net *net, u8 *pnetid)
747 if (smc_pnet_match(pnetid, pe->pnetid)) {
754 memcpy(pe->pnetid, pnetid, SMC_MAX_PNETID_LEN);
762 static void smc_pnet_remove_pnetid(struct net *net, u8 *pnetid)
769 if (smc_pnet_match(pnetid, pe->pnetid)) {
931 u8 *pnetid)
946 /* get pnetid of netdev device */
947 memcpy(pnetid, pnetelem->pnet_name, SMC_MAX_PNETID_LEN);
956 /* find a roce device for the given pnetid */
972 if (smc_pnet_match(ibdev->pnetid[i - 1], pnet_id) &&
1034 * If nothing found, check pnetid table.
1047 return; /* pnetid could not be determined */
1062 return; /* pnetid could not be determined */
1066 if (smc_pnet_match(ismdev->pnetid, ndev_pnetid) &&