- fix typo: use ring size from the rx ring, not the tx one (they should be
  the same, but just in case);
- reuse the previously computed len-1 value


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274361 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
in the Linux section, properly define the NMG_LOCK type.
Also import WITH_GENERIC in preparation to adding fine-grained
options to disable specific netmap components.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f