IB/hfi1: Add 16B trace support
Add trace support to 16B bypass packets during send and receive. Sample input header trace: <idle>-0 [000] d.h. 271742.509477: input_ibhdr: [0000:05:00.0] (16B) len:24 sc:0 dlid:0xf0000b slid:0x10002 age:0 becn:0 fecn:0 l4:10 rc:0 sc:0 pkey:0x8001 entropy:0x0000 op:0x65,UD_SEND_ONLY_WITH_IMMEDIATE se:0 m:1 pad:3 tver:0 qpn:0xffffff a:0 psn:0x00000001 hlen:248 deth qkey 0x01234567 sqpn 0x000004 Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

zatwierdzone przez
Doug Ledford

rodzic
88733e3b84
commit
863cf89d47
@@ -381,6 +381,11 @@ struct hfi1_packet {
|
||||
#define OPA_16B_PKEY_SHIFT 16
|
||||
#define OPA_16B_LEN_MASK 0x7FF00000ull
|
||||
#define OPA_16B_LEN_SHIFT 20
|
||||
#define OPA_16B_RC_MASK 0xE000000ull
|
||||
#define OPA_16B_RC_SHIFT 25
|
||||
#define OPA_16B_AGE_MASK 0xFF0000ull
|
||||
#define OPA_16B_AGE_SHIFT 16
|
||||
#define OPA_16B_ENTROPY_MASK 0xFFFFull
|
||||
|
||||
/*
|
||||
* OPA 16B L2/L4 Encodings
|
||||
@@ -434,6 +439,26 @@ static inline u16 hfi1_16B_get_pkey(struct hfi1_16b_header *hdr)
|
||||
return (u16)((hdr->lrh[2] & OPA_16B_PKEY_MASK) >> OPA_16B_PKEY_SHIFT);
|
||||
}
|
||||
|
||||
static inline u8 hfi1_16B_get_rc(struct hfi1_16b_header *hdr)
|
||||
{
|
||||
return (u8)((hdr->lrh[1] & OPA_16B_RC_MASK) >> OPA_16B_RC_SHIFT);
|
||||
}
|
||||
|
||||
static inline u8 hfi1_16B_get_age(struct hfi1_16b_header *hdr)
|
||||
{
|
||||
return (u8)((hdr->lrh[3] & OPA_16B_AGE_MASK) >> OPA_16B_AGE_SHIFT);
|
||||
}
|
||||
|
||||
static inline u16 hfi1_16B_get_len(struct hfi1_16b_header *hdr)
|
||||
{
|
||||
return (u16)((hdr->lrh[0] & OPA_16B_LEN_MASK) >> OPA_16B_LEN_SHIFT);
|
||||
}
|
||||
|
||||
static inline u16 hfi1_16B_get_entropy(struct hfi1_16b_header *hdr)
|
||||
{
|
||||
return (u16)(hdr->lrh[3] & OPA_16B_ENTROPY_MASK);
|
||||
}
|
||||
|
||||
/*
|
||||
* BTH
|
||||
*/
|
||||
|
Reference in New Issue
Block a user