summaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap.c
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2015-02-14 19:03:11 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2015-02-14 19:03:11 +0000
commit6641c68bcd000859562372535e1f8335afdbd1a6 (patch)
tree853180a3e0b1e267a9ba84e523075b703e734bc1 /sys/dev/netmap/netmap.c
parentc929ca72c93bc519ac32790778525394ee4bb446 (diff)
Notes
Diffstat (limited to 'sys/dev/netmap/netmap.c')
-rw-r--r--sys/dev/netmap/netmap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
index 4f4d6c6108ca..5401df384914 100644
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -656,9 +656,8 @@ netmap_update_config(struct netmap_adapter *na)
u_int txr, txd, rxr, rxd;
txr = txd = rxr = rxd = 0;
- if (na->nm_config) {
- na->nm_config(na, &txr, &txd, &rxr, &rxd);
- } else {
+ if (na->nm_config == NULL ||
+ na->nm_config(na, &txr, &txd, &rxr, &rxd)) {
/* take whatever we had at init time */
txr = na->num_tx_rings;
txd = na->num_tx_desc;
@@ -2168,7 +2167,7 @@ netmap_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
error = ENXIO;
break;
}
- rmb(); /* make sure following reads are not from cache */
+ mb(); /* make sure following reads are not from cache */
na = priv->np_na; /* we have a reference */