Bug 247111 - pxeboot very slow with i219LM
Summary: pxeboot very slow with i219LM
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-net (Nobody)
URL:
Keywords: IntelNetworking, needs-qa, performance
Depends on:
Blocks:
 
Reported: 2020-06-09 13:53 UTC by Michel Popp
Modified: 2023-05-05 16:07 UTC (History)
7 users (show)

See Also:
koobs: maintainer-feedback? (michel.popp)
koobs: mfc-stable13?
koobs: mfc-stable12?
koobs: mfc-stable11?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Popp 2020-06-09 13:53:33 UTC
I have a problem with the binary PXEBOOT and the nfs / diskless setup setup. Unfortunately, PXEBOOT loads the kernel with i219LM NICs very slowly. It takes up to 15 minutes to load the kernel. Compared to a Realtek or i210 / i211 NIC, it only takes 2 minutes to load the kernel.


```
BTX loader 1.00 BTX version is 1.02
...
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0xed9008 data=0x117d28+0x176650 syms=[0x8+0x137988+0x8+0x1515f8]

```
Comment 1 longwitz 2020-06-18 20:22:04 UTC
Are you really sure your problem is caused by different NICs ?

I had the same problem and the slowness came from incoming ARPs. In a network without ARP traffic pxeboot had normal speed.

I could solve my problem with the following patch for V12.1 Stable:

--- pxe.c.orig  2019-01-13 08:25:55.000000000 +0100
+++ pxe.c       2020-06-15 21:30:19.000000000 +0200
@@ -424,7 +424,7 @@
        if (undi_open_p == NULL)
                return;
        bzero(undi_open_p, sizeof(*undi_open_p));
-       undi_open_p->PktFilter = FLTR_DIRECTED | FLTR_BRDCST;
+       undi_open_p->PktFilter = FLTR_DIRECTED;
        pxe_call(PXENV_UNDI_OPEN, undi_open_p);
        if (undi_open_p->Status != 0)
                printf("undi open failed: %x\n", undi_open_p->Status);

For more info see
  https://lists.freebsd.org/pipermail/freebsd-net/2020-June/056025.html

Andreas Longwitz
Comment 2 Kyle Evans freebsd_committer freebsd_triage 2021-08-30 00:24:58 UTC
(In reply to Michel Popp from comment #0)

I suspect that
https://cgit.freebsd.org/src/commit/stand/i386?id=3daa8e165c661c1b45e759f4997f447384c15446 is the actual cause of this, can you please test with that patch applied or let me know if you'd accept a pxeboot binary to try it?
Comment 3 longwitz 2021-08-30 20:36:17 UTC
I can confirm the patch worked for me in V12.2, my kernel of 20 MB loads in 32 seconds. Because now ERESTART is used I have the line
   #define _WANT_KERNEL_ERRNO      1
included in the sourcefile pxe.c.
Comment 4 Toomas Soome freebsd_committer freebsd_triage 2021-08-30 20:38:20 UTC
(In reply to longwitz from comment #3)

What method was used to load kernel, tftp or nfs?
Comment 5 Kyle Evans freebsd_committer freebsd_triage 2021-08-30 20:41:11 UTC
(In reply to longwitz from comment #3)

Yup, sorry, I MFC'd 0c35b8609138 to stable/11 and stable/12 just last week which will remove the need for it in the future.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-31 01:41:35 UTC
@Kyle Is this then assignable and In Progress? Anything left to do post commits / merges that have already occurred?
Comment 7 Kyle Evans freebsd_committer freebsd_triage 2021-08-31 05:04:45 UTC
(In reply to Kubilay Kocak from comment #6)

I am/was hoping to get confirmation from the original reporter as well that the referenced commit fixes their issue before I commit to touching this PR -- it's been sitting for over a year, though, so it might be better to just assume it's the same problem (it probably is) and it can be reopened if the problem recurs after it makes its way through the release process.
Comment 8 longwitz 2021-08-31 08:31:14 UTC
On pxeboot my kernel is loaded with nfs. My nfs server runs on an older system with FreeBSD 10.4 Stable and without nfsv4.

And of course with commit 0c35b8609138 I do not need the #define anymore.
Comment 9 Michel Popp 2021-08-31 09:04:06 UTC
(In reply to Kyle Evans from comment #7)
Thanks for reply. I have tested the patch, but unfortunately the btx is stopped if I try to boot pxeboot on a Intel server with i219LM.. on a AMD server is it working fine.
Comment 10 Toomas Soome freebsd_committer freebsd_triage 2021-08-31 10:24:55 UTC
(In reply to Michel Popp from comment #9)

Would need BTX screen dump and information, which version of pxeboot binary was used.