mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[ipoib] Resimplify test for received broadcast packets
Commit e62e52b ("[ipoib] Simplify test for received broadcast
packets") relies upon the multicast LID being present in the
destination address vector as passed to ipoib_complete_recv().
Unfortunately, this information is not present in many Infiniband
devices' completion queue entries.
Fix by testing instead for the presence of a multicast GID.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -671,8 +671,8 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
|
||||
ethhdr->h_protocol = net_proto;
|
||||
|
||||
/* Construct destination address */
|
||||
if ( IB_LID_MULTICAST ( dest->lid ) ) {
|
||||
/* Multicast LID; use the Ethernet broadcast address */
|
||||
if ( dest->gid_present && IB_GID_MULTICAST ( &dest->gid ) ) {
|
||||
/* Multicast GID: use the Ethernet broadcast address */
|
||||
memcpy ( ðhdr->h_dest, eth_broadcast,
|
||||
sizeof ( ethhdr->h_dest ) );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user