Lines Matching refs:pnetid
76 /* Check if the pnetid is set */
77 bool smc_pnet_is_pnetid_set(u8 *pnetid)
79 if (pnetid[0] == 0 || pnetid[0] == _S)
99 /* Remove a pnetid from the pnet table.
127 "pnetid %.16s\n",
148 ibdev->pnetid[ibport]))) {
151 "pnetid %.16s\n",
154 ibdev->pnetid[ibport]);
155 memset(ibdev->pnetid[ibport], 0,
168 smc_pnet_match(pnet_name, smcd->pnetid))) {
170 "erased user defined pnetid "
173 smcd->pnetid);
174 memset(smcd->pnetid, 0, SMC_MAX_PNETID_LEN);
205 "user defined pnetid %.16s\n",
236 "user defined pnetid %.16s\n",
246 /* Apply pnetid to ib device when no pnetid is set.
254 if (!smc_pnet_is_pnetid_set(ib_dev->pnetid[ib_port - 1])) {
255 memcpy(ib_dev->pnetid[ib_port - 1], pnet_name,
264 /* Apply pnetid to smcd device when no pnetid is set.
271 if (!smc_pnet_is_pnetid_set(smcd_dev->pnetid)) {
272 memcpy(smcd_dev->pnetid, pnet_name, SMC_MAX_PNETID_LEN);
280 /* The limit for pnetid is 16 characters.
285 static bool smc_pnetid_valid(const char *pnet_name, char *pnetid)
300 *pnetid++ = islower(*bf) ? toupper(*bf) : *bf;
303 *pnetid = '\0';
354 /* check if (base) netdev already has a pnetid. If there is one, we do
399 "applied user defined pnetid %.16s\n",
419 /* try to apply the pnetid to active devices */
425 "applied user defined pnetid "
428 ib_dev->pnetid[ib_port - 1]);
436 "applied user defined pnetid "
438 smcd->pnetid);
441 /* Apply fails when a device has a hardware-defined pnetid set, do not
475 /* Append a pnetid to the end of the pnet table if not already on this list.
602 u32 seq, u8 *pnetid, int start_idx)
616 if (pnetid && !smc_pnet_match(pnetelem->pnet_name, pnetid))
726 bool smc_pnet_is_ndev_pnetid(struct net *net, u8 *pnetid)
734 if (smc_pnet_match(pnetid, pe->pnetid)) {
745 static int smc_pnet_add_pnetid(struct net *net, u8 *pnetid)
756 if (smc_pnet_match(pnetid, pe->pnetid)) {
763 memcpy(pe->pnetid, pnetid, SMC_MAX_PNETID_LEN);
771 static void smc_pnet_remove_pnetid(struct net *net, u8 *pnetid)
778 if (smc_pnet_match(pnetid, pe->pnetid)) {
945 u8 *pnetid)
960 /* get pnetid of netdev device */
961 memcpy(pnetid, pnetelem->pnet_name, SMC_MAX_PNETID_LEN);
990 /* find a roce device for the given pnetid */
1007 if (smc_pnet_match(ibdev->pnetid[i - 1], pnet_id) &&
1070 * If nothing found, check pnetid table.
1085 return; /* pnetid could not be determined */
1100 return; /* pnetid could not be determined */
1104 if (smc_pnet_match(ismdev->pnetid, ndev_pnetid) &&