#define IB_PMA_PORT_COUNTERS_CONG cpu_to_be16(0xFF00) #define LINK_SPEED_25G 1 #define LINK_SPEED_12_5G 2 #define LINK_WIDTH_DEFAULT 4 #define DECIMAL_FACTORING 1000 /* * The default link width is multiplied by 1000 * to get accurate value after division.
*/ #define FACTOR_LINK_WIDTH (LINK_WIDTH_DEFAULT * DECIMAL_FACTORING)
struct cc_table_shadow {
u16 ccti_limit; /* max CCTI for cc table */ struct ib_cc_table_entry_shadow entries[CC_TABLE_SHADOW_MAX];
} __packed;
/* * struct cc_state combines the (active) per-port congestion control * table, and the (active) per-SL congestion settings. cc_state data * may need to be read in code paths that we want to be fast, so it * is an RCU protected structure.
*/ struct cc_state { struct rcu_head rcu; struct cc_table_shadow cct; struct opa_congestion_setting_attr_shadow cong_setting;
};
/* * The PortSamplesControl.CounterMasks field is an array of 3 bit fields * which specify the N'th counter's capabilities. See ch. 16.1.3.2. * We support 5 counters which only count the mandatory quantities.
*/ #define COUNTER_MASK(q, n) (q << ((9 - n) * 3)) #define COUNTER_MASK0_9 \
cpu_to_be32(COUNTER_MASK(1, 0) | \
COUNTER_MASK(1, 1) | \
COUNTER_MASK(1, 2) | \
COUNTER_MASK(1, 3) | \
COUNTER_MASK(1, 4))
void hfi1_event_pkey_change(struct hfi1_devdata *dd, u32 port); void hfi1_handle_trap_timer(struct timer_list *t);
u16 tx_link_width(u16 link_width);
u64 get_xmit_wait_counters(struct hfi1_pportdata *ppd, u16 link_width,
u16 link_speed, int vl); /** * get_link_speed - determine whether 12.5G or 25G speed * @link_speed: the speed of active link * @return: Return 2 if link speed identified as 12.5G * or return 1 if link speed is 25G. * * The function indirectly calculate required link speed * value for convert_xmit_counter function. If the link * speed is 25G, the function return as 1 as it is required * by xmit counter conversion formula :-( 25G / link_speed). * This conversion will provide value 1 if current * link speed is 25G or 2 if 12.5G.This is done to avoid * 12.5 float number conversion.
*/ staticinline u16 get_link_speed(u16 link_speed)
{ return (link_speed == 1) ?
LINK_SPEED_12_5G : LINK_SPEED_25G;
}
/** * convert_xmit_counter - calculate flit times for given xmit counter * value * @xmit_wait_val: current xmit counter value * @link_width: width of active link * @link_speed: speed of active link * @return: return xmit counter value in flit times.
*/ staticinline u64 convert_xmit_counter(u64 xmit_wait_val, u16 link_width,
u16 link_speed)
{ return (xmit_wait_val * 2 * (FACTOR_LINK_WIDTH / link_width)
* link_speed) / DECIMAL_FACTORING;
} #endif/* _HFI1_MAD_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.26 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.