Lines Matching refs:pkey
392 u16 pkey;
1020 u16 pkey;
1750 u16 pkey, u32 slid, u32 dlid, u8 sc5,
1753 u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
1756 u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
1760 int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey,
1797 * ingress_pkey_matches_entry - return 1 if the pkey matches ent (ent
1802 static inline int ingress_pkey_matches_entry(u16 pkey, u16 ent)
1804 u16 mkey = pkey & PKEY_LOW_15_MASK;
1809 * If pkey[15] is clear (limited partition member),
1813 if (!(pkey & PKEY_MEMBER_MASK))
1821 * ingress_pkey_table_search - search the entire pkey table for
1822 * an entry which matches 'pkey'. return 0 if a match is found,
1825 static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
1830 if (ingress_pkey_matches_entry(pkey, ppd->pkeys[i]))
1837 * ingress_pkey_table_fail - record a failure of ingress pkey validation,
1841 static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
1850 dd->err_info_rcv_constraint.pkey = pkey;
1855 * ingress_pkey_check - Return 0 if the ingress pkey is valid, return 1
1859 * of performance reasons. On datapath pkey check is expected to be done
1862 static inline int ingress_pkey_check(struct hfi1_pportdata *ppd, u16 pkey,
1868 /* If SC15, pkey[0:14] must be 0x7fff */
1869 if ((sc5 == 0xf) && ((pkey & PKEY_LOW_15_MASK) != PKEY_LOW_15_MASK))
1872 /* Is the pkey = 0x0, or 0x8000? */
1873 if ((pkey & PKEY_LOW_15_MASK) == 0)
1876 /* The most likely matching pkey has index 'idx' */
1877 if (ingress_pkey_matches_entry(pkey, ppd->pkeys[idx]))
1881 if (!ingress_pkey_table_search(ppd, pkey))
1885 ingress_pkey_table_fail(ppd, pkey, slid);
1890 * rcv_pkey_check - Return 0 if the ingress pkey is valid, return 1
1891 * otherwise. It only ensures pkey is vlid for QP0. This function
1893 * as on data path, pkey check is done by HW (except for QP0).
1895 static inline int rcv_pkey_check(struct hfi1_pportdata *ppd, u16 pkey,
1901 /* If SC15, pkey[0:14] must be 0x7fff */
1902 if ((sc5 == 0xf) && ((pkey & PKEY_LOW_15_MASK) != PKEY_LOW_15_MASK))
1907 ingress_pkey_table_fail(ppd, pkey, slid);
2672 u16 len, u16 pkey,
2691 lrh2 = (lrh2 & ~OPA_16B_PKEY_MASK) | ((u32)pkey << OPA_16B_PKEY_SHIFT);