mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
IB/hfi1: Optimize packet type comparison using 9B and bypass code paths
The packet type comparison used to find out if a packet is a bypass packet in the hot path is an expensive operation as seen in a profile. Determine packet's pkey and migration bit through the bypass and 9B code paths instead. Reviewed-by: Don Hiatt <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Sebastian Sanchez <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
This commit is contained in:
parent
f150e2736f
commit
6d6b8848c8
5 changed files with 18 additions and 13 deletions
|
|
@ -335,4 +335,9 @@ static inline bool ib_bth_is_solicited(struct ib_other_headers *ohdr)
|
|||
{
|
||||
return ohdr->bth[0] & cpu_to_be32(IB_BTH_SOLICITED);
|
||||
}
|
||||
|
||||
static inline bool ib_bth_is_migration(struct ib_other_headers *ohdr)
|
||||
{
|
||||
return ohdr->bth[0] & cpu_to_be32(IB_BTH_MIG_REQ);
|
||||
}
|
||||
#endif /* IB_HDRS_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue