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
This commit is contained in:
parent
25a9544367
commit
cc7b7b78d7
@ -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 */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user