summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/ipoib.c
diff options
context:
space:
mode:
authorMichael Brown2016-03-08 11:11:19 +0100
committerMichael Brown2016-03-08 13:23:30 +0100
commite62e52b2b9d09bee8e30f54fa225eb381813fc9a (patch)
treed0eef748799d0ed29733cf22e495ab49ffeb642d /src/drivers/net/ipoib.c
parent[ipoib] Avoid unnecessary path record lookup for broadcast address (diff)
downloadipxe-e62e52b2b9d09bee8e30f54fa225eb381813fc9a.tar.gz
ipxe-e62e52b2b9d09bee8e30f54fa225eb381813fc9a.tar.xz
ipxe-e62e52b2b9d09bee8e30f54fa225eb381813fc9a.zip
[ipoib] Simplify test for received broadcast packets
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/ipoib.c')
-rw-r--r--src/drivers/net/ipoib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index d8c4efad..66e72ac1 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -671,10 +671,8 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
ethhdr->h_protocol = net_proto;
/* Construct destination address */
- if ( dest->gid_present &&
- ( memcmp ( &dest->gid, &ipoib->broadcast.mac.gid,
- sizeof ( dest->gid ) ) == 0 ) ) {
- /* Broadcast GID; use the Ethernet broadcast address */
+ if ( IB_LID_MULTICAST ( dest->lid ) ) {
+ /* Multicast LID; use the Ethernet broadcast address */
memcpy ( &ethhdr->h_dest, eth_broadcast,
sizeof ( ethhdr->h_dest ) );
} else {