From owner-svn-src-head@freebsd.org Thu Jul 27 15:06:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 797D7DCCFE1; Thu, 27 Jul 2017 15:06:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 472AE7D7C9; Thu, 27 Jul 2017 15:06:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6RF6YXA030586; Thu, 27 Jul 2017 15:06:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6RF6YxM030585; Thu, 27 Jul 2017 15:06:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707271506.v6RF6YxM030585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 27 Jul 2017 15:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321621 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 321621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2017 15:06:35 -0000 Author: andrew Date: Thu Jul 27 15:06:34 2017 New Revision: 321621 URL: https://svnweb.freebsd.org/changeset/base/321621 Log: Always set the receive mask in loader.efi. Some UEFI implementations set this to be too restrictive. We need to have both broadcast and unicast enabled for loader to work. Set them in all cases to ensure this is true. This allows the Cavium ThunderX 2s in the netperf cluster to netboot using a USB NIC. PR: 221001 Reviewed by: emaste, tsoome Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11732 Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Thu Jul 27 14:34:57 2017 (r321620) +++ head/sys/boot/efi/libefi/efinet.c Thu Jul 27 15:06:34 2017 (r321621) @@ -187,6 +187,7 @@ efinet_init(struct iodesc *desc, void *machdep_hint) EFI_SIMPLE_NETWORK *net; EFI_HANDLE h; EFI_STATUS status; + UINT32 mask; if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) { printf("Invalid network interface %d\n", nif->nif_unit); @@ -220,16 +221,14 @@ efinet_init(struct iodesc *desc, void *machdep_hint) } } - if (net->Mode->ReceiveFilterSetting == 0) { - UINT32 mask = EFI_SIMPLE_NETWORK_RECEIVE_UNICAST | - EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST; + mask = EFI_SIMPLE_NETWORK_RECEIVE_UNICAST | + EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST; - status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL); - if (status != EFI_SUCCESS) { - printf("net%d: cannot set rx. filters (status=%lu)\n", - nif->nif_unit, EFI_ERROR_CODE(status)); - return; - } + status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL); + if (status != EFI_SUCCESS) { + printf("net%d: cannot set rx. filters (status=%lu)\n", + nif->nif_unit, EFI_ERROR_CODE(status)); + return; } #ifdef EFINET_DEBUG