aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ntb/ntb_transport.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2017-08-31 21:37:22 +0000
committerAlexander Motin <mav@FreeBSD.org>2017-08-31 21:37:22 +0000
commit84f8cfec2f79281e95e9eff136758a9e4e87a42f (patch)
treed3f92c064145ff6cdf3ec091229491b6ab5c3917 /sys/dev/ntb/ntb_transport.c
parent5ea26aec6e50722ad2298d11fdd258f0748fb361 (diff)
downloadsrc-84f8cfec2f79281e95e9eff136758a9e4e87a42f.tar.gz
src-84f8cfec2f79281e95e9eff136758a9e4e87a42f.zip
Clear doorbell bits after masking them before processing.
In theory this allows to avoid one more expensive doorbell register read later in some scenarios. But in practice it also significantly increases packet rate on PLX hardware, that I can't explain yet, possibly work- arounding some interrupt delays. MFC after: 13 days Sponsored by: iXsystems, Inc.
Notes
Notes: svn path=/head/; revision=323074
Diffstat (limited to 'sys/dev/ntb/ntb_transport.c')
-rw-r--r--sys/dev/ntb/ntb_transport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ntb/ntb_transport.c b/sys/dev/ntb/ntb_transport.c
index 521fd058c320..bb3287d5f058 100644
--- a/sys/dev/ntb/ntb_transport.c
+++ b/sys/dev/ntb/ntb_transport.c
@@ -1012,8 +1012,10 @@ ntb_transport_doorbell_callback(void *data, uint32_t vector)
vec_mask &= nt->qp_bitmap;
if ((vec_mask & (vec_mask - 1)) != 0)
vec_mask &= ntb_db_read(nt->dev);
- if (vec_mask != 0)
+ if (vec_mask != 0) {
ntb_db_set_mask(nt->dev, vec_mask);
+ ntb_db_clear(nt->dev, vec_mask);
+ }
while (vec_mask != 0) {
qp_num = ffsll(vec_mask) - 1;