IB/hfi1: Remove unnecessary fecn and becn fields
packet->fecn and packet->becn are calculated in the hot path and are never used. Remove these fields as they show to be costly in a profile. Also, remove initialization for becn and fecn in process_ecn() as they're unconditionally assigned in the function and ensure fecn and becn variables use a boolean type. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
bdaf96f650
commit
ca85bb1ca9
@@ -313,16 +313,14 @@ static inline u32 ib_bth_get_qpn(struct ib_other_headers *ohdr)
|
||||
return (u32)((be32_to_cpu(ohdr->bth[1])) & IB_QPN_MASK);
|
||||
}
|
||||
|
||||
static inline u8 ib_bth_get_becn(struct ib_other_headers *ohdr)
|
||||
static inline bool ib_bth_get_becn(struct ib_other_headers *ohdr)
|
||||
{
|
||||
return (u8)((be32_to_cpu(ohdr->bth[1]) >> IB_BECN_SHIFT) &
|
||||
IB_BECN_MASK);
|
||||
return (ohdr->bth[1]) & cpu_to_be32(IB_BECN_SMASK);
|
||||
}
|
||||
|
||||
static inline u8 ib_bth_get_fecn(struct ib_other_headers *ohdr)
|
||||
static inline bool ib_bth_get_fecn(struct ib_other_headers *ohdr)
|
||||
{
|
||||
return (u8)((be32_to_cpu(ohdr->bth[1]) >> IB_FECN_SHIFT) &
|
||||
IB_FECN_MASK);
|
||||
return (ohdr->bth[1]) & cpu_to_be32(IB_FECN_SMASK);
|
||||
}
|
||||
|
||||
static inline u8 ib_bth_get_tver(struct ib_other_headers *ohdr)
|
||||
|
||||
Reference in New Issue
Block a user