Lines Matching full:lid
589 #define HFI1_IB_CFG_LIDLMC 0 /* LID (LS16b) and Mask (MS16b) */
844 /* LID programmed for this instance */
845 u32 lid; member
861 /* LID mask control */
1939 int hfi1_set_lid(struct hfi1_pportdata *ppd, u32 lid, u8 lmc);
2497 (ppd->lid >= be16_to_cpu(IB_MULTICAST_LID_BASE))) && in hfi1_update_ah_attr()
2509 * hfi1_check_mcast- Check if the given lid is
2512 * The LID might either reside in ah.dlid or might be
2516 static inline bool hfi1_check_mcast(u32 lid) in hfi1_check_mcast() argument
2518 return ((lid >= opa_get_mcast_base(OPA_MCAST_NR)) && in hfi1_check_mcast()
2519 (lid != be32_to_cpu(OPA_LID_PERMISSIVE))); in hfi1_check_mcast()
2522 #define opa_get_lid(lid, format) \ argument
2523 __opa_get_lid(lid, OPA_PORT_PACKET_FORMAT_##format)
2525 /* Convert a lid to a specific lid space */
2526 static inline u32 __opa_get_lid(u32 lid, u8 format) in __opa_get_lid() argument
2528 bool is_mcast = hfi1_check_mcast(lid); in __opa_get_lid()
2534 return (lid - opa_get_mcast_base(OPA_MCAST_NR) + in __opa_get_lid()
2536 return lid & 0xFFFFF; in __opa_get_lid()
2539 return (lid - opa_get_mcast_base(OPA_MCAST_NR) + in __opa_get_lid()
2541 return lid & 0xFFFFFF; in __opa_get_lid()
2544 return (lid - in __opa_get_lid()
2548 return lid & 0xFFFF; in __opa_get_lid()
2550 return lid; in __opa_get_lid()
2554 /* Return true if the given lid is the OPA 16B multicast range */
2555 static inline bool hfi1_is_16B_mcast(u32 lid) in hfi1_is_16B_mcast() argument
2557 return ((lid >= in hfi1_is_16B_mcast()
2559 (lid != opa_get_lid(be32_to_cpu(OPA_LID_PERMISSIVE), 16B))); in hfi1_is_16B_mcast()
2567 /* Modify ah_attr.dlid to be in the 32 bit LID space. in hfi1_make_opa_lid()
2570 * 32 bit permissive LID = 0xFFFFFFFF in hfi1_make_opa_lid()
2571 * Multicast LID range = 0xFFFFFFFE to 0xF0000000 in hfi1_make_opa_lid()
2572 * Unicast LID range = 0xEFFFFFFF to 1 in hfi1_make_opa_lid()
2573 * Invalid LID = 0 in hfi1_make_opa_lid()
2588 static inline u8 hfi1_get_packet_type(u32 lid) in hfi1_get_packet_type() argument
2590 /* 9B if lid > 0xF0000000 */ in hfi1_get_packet_type()
2591 if (lid >= opa_get_mcast_base(OPA_MCAST_NR)) in hfi1_get_packet_type()
2594 /* 16B if lid > 0xC000 */ in hfi1_get_packet_type()
2595 if (lid >= opa_get_lid(opa_get_mcast_base(OPA_MCAST_NR), 9B)) in hfi1_get_packet_type()
2601 static inline bool hfi1_get_hdr_type(u32 lid, struct rdma_ah_attr *attr) in hfi1_get_hdr_type() argument
2616 * or source lid is extended. in hfi1_get_hdr_type()
2621 return hfi1_get_packet_type(lid); in hfi1_get_hdr_type()