svn commit: r278774 - head/sys/dev/netmap
Luigi Rizzo
luigi at FreeBSD.org
Sat Feb 14 19:03:12 UTC 2015
Author: luigi
Date: Sat Feb 14 19:03:11 2015
New Revision: 278774
URL: https://svnweb.freebsd.org/changeset/base/278774
Log:
two minor changes from the master netmap version:
1. handle errors from nm_config(), if any (none of the FreeBSD drivers
currently returns an error on this function, so this change
is a no-op at this time
2. use a full memory barrier on ioctls
Modified:
head/sys/dev/netmap/netmap.c
Modified: head/sys/dev/netmap/netmap.c
==============================================================================
--- head/sys/dev/netmap/netmap.c Sat Feb 14 18:59:31 2015 (r278773)
+++ head/sys/dev/netmap/netmap.c Sat Feb 14 19:03:11 2015 (r278774)
@@ -656,9 +656,8 @@ netmap_update_config(struct netmap_adapt
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 cm
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 */
More information about the svn-src-all
mailing list