Lines Matching defs:pkey

351 	u16 pkey;
969 u16 pkey;
1698 u16 pkey, u32 slid, u32 dlid, u8 sc5,
1701 u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
1704 u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
1708 int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey,
1745 * ingress_pkey_matches_entry - return 1 if the pkey matches ent (ent
1750 static inline int ingress_pkey_matches_entry(u16 pkey, u16 ent)
1752 u16 mkey = pkey & PKEY_LOW_15_MASK;
1757 * If pkey[15] is clear (limited partition member),
1761 if (!(pkey & PKEY_MEMBER_MASK))
1769 * ingress_pkey_table_search - search the entire pkey table for
1770 * an entry which matches 'pkey'. return 0 if a match is found,
1773 static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
1778 if (ingress_pkey_matches_entry(pkey, ppd->pkeys[i]))
1785 * ingress_pkey_table_fail - record a failure of ingress pkey validation,
1789 static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
1798 dd->err_info_rcv_constraint.pkey = pkey;
1803 * ingress_pkey_check - Return 0 if the ingress pkey is valid, return 1
1807 * of performance reasons. On datapath pkey check is expected to be done
1810 static inline int ingress_pkey_check(struct hfi1_pportdata *ppd, u16 pkey,
1816 /* If SC15, pkey[0:14] must be 0x7fff */
1817 if ((sc5 == 0xf) && ((pkey & PKEY_LOW_15_MASK) != PKEY_LOW_15_MASK))
1820 /* Is the pkey = 0x0, or 0x8000? */
1821 if ((pkey & PKEY_LOW_15_MASK) == 0)
1824 /* The most likely matching pkey has index 'idx' */
1825 if (ingress_pkey_matches_entry(pkey, ppd->pkeys[idx]))
1829 if (!ingress_pkey_table_search(ppd, pkey))
1833 ingress_pkey_table_fail(ppd, pkey, slid);
1838 * rcv_pkey_check - Return 0 if the ingress pkey is valid, return 1
1839 * otherwise. It only ensures pkey is vlid for QP0. This function
1841 * as on data path, pkey check is done by HW (except for QP0).
1843 static inline int rcv_pkey_check(struct hfi1_pportdata *ppd, u16 pkey,
1849 /* If SC15, pkey[0:14] must be 0x7fff */
1850 if ((sc5 == 0xf) && ((pkey & PKEY_LOW_15_MASK) != PKEY_LOW_15_MASK))
1855 ingress_pkey_table_fail(ppd, pkey, slid);
2619 u16 len, u16 pkey,
2638 lrh2 = (lrh2 & ~OPA_16B_PKEY_MASK) | ((u32)pkey << OPA_16B_PKEY_SHIFT);