Skip to content

Commit ff8b67f

Browse files
ashutoshxjgunthorpe
authored andcommitted
IB/hfi1: Consider LMC in 16B/bypass ingress packet check
Ingress packet check for 16B/bypass packets should consider the port LMC. Not doing this will result in packets sent to the LMC LIDs getting dropped. The check is implemented in HW for 9B packets. Reviewed-by: Mike Ruhl <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent dbc2970 commit ff8b67f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/hfi1/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ static int hfi1_bypass_ingress_pkt_check(struct hfi1_packet *packet)
14261426
if ((!(hfi1_is_16B_mcast(packet->dlid))) &&
14271427
(packet->dlid !=
14281428
opa_get_lid(be32_to_cpu(OPA_LID_PERMISSIVE), 16B))) {
1429-
if (packet->dlid != ppd->lid)
1429+
if ((packet->dlid & ~((1 << ppd->lmc) - 1)) != ppd->lid)
14301430
return -EINVAL;
14311431
}
14321432

0 commit comments

Comments
 (0)