aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2018-11-28 10:19:47 -0800
committerJason Gunthorpe <jgg@mellanox.com>2018-12-06 19:50:09 -0700
commitff8b67fccdb65402df78a1695c38be805252cf8e (patch)
tree42d7acb42c5972105f57940bc1dad894a6b73d01 /drivers/infiniband
parentIB/hfi1: Incorrect sizing of sge for PIO will OOPs (diff)
downloadlinux-dev-ff8b67fccdb65402df78a1695c38be805252cf8e.tar.xz
linux-dev-ff8b67fccdb65402df78a1695c38be805252cf8e.zip
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 <michael.j.ruhl@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hfi1/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c
index d5277c23cba6..a8ad70730203 100644
--- a/drivers/infiniband/hw/hfi1/driver.c
+++ b/drivers/infiniband/hw/hfi1/driver.c
@@ -1426,7 +1426,7 @@ static int hfi1_bypass_ingress_pkt_check(struct hfi1_packet *packet)
if ((!(hfi1_is_16B_mcast(packet->dlid))) &&
(packet->dlid !=
opa_get_lid(be32_to_cpu(OPA_LID_PERMISSIVE), 16B))) {
- if (packet->dlid != ppd->lid)
+ if ((packet->dlid & ~((1 << ppd->lmc) - 1)) != ppd->lid)
return -EINVAL;
}