Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure that na->nm_register() is called at least once
Some adapters (e.g., generic) do all their initialization the first time nm_register(,1) is called. Before this patch, however nm_register(,1) was not called at all when only host rings where beeing put in netmap mode. On the other end, nm_register(,0) is always called when the adapter is released, irrespective of the kind of rings that were beeing used. This caused the generic adapter (and possibily others) to try to release resources that had never been allocated, resulting in warnings and panics. This patch makes sure that nm_register(0,1) is called at least once when any ring of the adapter is put in netmap mode, thus restoring symmetry with the release path.
- Loading branch information