Module Name: src Committed By: msaitoh Date: Wed Mar 27 03:29:50 UTC 2019
Modified Files: src/sys/dev/pci: if_bnx.c Log Message: Apply OpenBSD rev. 1.94: > ido not disable interrupts in the isr and then enable them again > when leaving. when you're handling an interrupt it is masked. > whacking the chip is work for no gain. > > modify the interrupt handler so it only processes the rings once > rather than looping over them until it runs out of work to do > > looping in the isr is bad for several reasons: > > firstly, the chip does interrupt mitigation so you have a > decent/predictable amount of work to do in the isr. your first loop > will do that chunk of work (ie, it pulls off 50ish packets), and > then the successive looping aggressively pull one or two packets > off the rx ring. these extra loops work against the benefit that > interrupt mitigation provides. > > bus space reads are slow. we should avoid doing them where possible > (but we should always do them when necessary). > > doing the loop 5 times per isr works against the mclgeti semantics. > it knows a nic is busy and therefore needs more rx descriptors by > watching to see when the nic uses all of its descriptors between > interrupts. if we're aggressively pulling packets off by looping > in the isr then we're skewing this check. > > ok deraadt@ To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/if_bnx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.